Good Evening All,

I am struggling with getting Gerrit to work on Docker with Nginx Reverse Proxy, I am using the following Nginx & LetsEncrypt configuration: https://github.com/jwilder/nginx-proxy

The Gerrit docker image I am using is: https://hub.docker.com/r/gerritcodereview/gerrit

When I run the Gerrit docker image, it successfully starts but when checking the Nginx configuration, the upstream server shows the IP address of the docker container but without the port number i.e. DOCKER CONTAINER IP:PORT NUMBER but instead as "down".

The goal is to be able to access Gerrit via https://gerrit.domainname.com, I have tried the official documentation from Gerrit but it doesn't seem to work.

Any help or advice will be much appreciated.

Kind Regards, Mo

1 Answer 1


I was able to do similar config. Nginx snippet:

upstream gerrit {
 server my_gerrit_ip:8080 fail_timeout=0;

server {
 listen 8080;   
 server_name my-gerrit-site.com;   
 return 301

server {   
  listen 443 ssl;   
  server_name my-gerrit-site.com;
  ssl_certificate /share/certs/localhost.pem;   
  ssl_certificate_key /share/certs/localhost.key;

  location / {

        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  Host $host;
        proxy_redirect      http:// https://;
        proxy_pass  http://gerrit;   } }

Gerrit snippet (gerrit.conf)

    canonicalWebUrl = https://my-gerrit-sice.com
    listenUrl = proxy-https://*:8080/

Remember to run gerrit with "CANONICAL_WEB_URL=https://my-gerrit-site.com" set in environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.