> ## Content Index
> Fetch the complete content index at: https://horrell.ca/llms.txt
> Use this file to discover other available public pages before exploring further.

# Nginx reverse proxy settings for Jenkins CLI
- URL: https://horrell.ca/2018/12/20/recommended-nginx-reverse-proxy-settings-for-jenkins-cli/
- Published: 2018-12-20T20:55:29.000Z
- Updated: 2019-01-29T15:16:02.000Z
- Author: Christopher Horrell
- Tags: nginx, jenkins, #Import 2024-10-01 02:36

If you run Jenkins in the cloud or locally, chances are good that you have it behind a reverse proxy, typicaly Nginx. Nginx is the goto for this sort of thing and the Jenkins docs have decent recommendation for [setting it up](https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy?ref=horrell.ca).

If you want to connect to Jenkins remotely via the [Jenkins CLI](https://jenkins.io/doc/book/managing/cli/?ref=horrell.ca#using-the-cli-client) there are two settings you need to disable in your Nginx config:

```
proxy_request_buffering    off; # Required for HTTP CLI commands in Jenkins > 2.54
proxy_buffering            off; # Required for HTTP CLI commands in Jenkins > 2.54

```

The [Jenkins docs](https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy?ref=horrell.ca) recommend[ proxy\_request\_buffering](http://nginx.org/en/docs/http/ngx%5Fhttp%5Fproxy%5Fmodule.html?ref=horrell.ca#proxy%5Frequest%5Fbuffering) but not [proxy\_buffering](http://nginx.org/en/docs/http/ngx%5Fhttp%5Fproxy%5Fmodule.html?ref=horrell.ca#proxy%5Fbuffering). I've found that CLI connections just won't work unless both are disabled. It's also worth noting that you should also set `proxy_http_version 1.1` as well per the wiki example.