Documentation for Drone behind SSL reverse proxy


#1

Hi,

Is there any documentation on the best way of running Drone behind a reverse proxy (nginx)?

Does anyone have a sample docker compose and nginx config file they can share? I want to be able to run drone on ssl through nginx.

At the moment I’m exposing 443 to 20443 and then trying to proxy it but drone doesn’t respond on 20443 when curling from local host.


#2

I deployed (successfully, I guess) Drone CI behind an nginx reverse proxy which runs on the host machine. This nginx is used to deploy TLS :slight_smile:

I did this: I exposed port 80 of the container which runs drone/drone to port 40080 on the host. I also set the following environment variables:

In my nginx configuration I use this:

upstream drone {
        server 127.0.0.1:40080;
}
server {
        server_name drone.example.com;
        
        # ...

        location / {
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host drone.example.com;
                proxy_pass http://drone;
                proxy_redirect off;
                proxy_http_version 1.1;
                proxy_buffering off;
                chunked_transfer_encoding off;
        }
}

See: https://0-8-0.docs.drone.io/setup-with-nginx/ (I know that this is actually for 0.8…)