Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence in docker with nginx proxy

I'm trying to use the atlassian/confluence-server image to run confluence.  I want to use nginx as a reverse proxy so that it work with

I have nginx configured, but what I'm having trouble with is the environment variables I need to specify in the docker-compose file to get it to work. 

Can somebody help?

3 answers

1 accepted

0 votes
Answer accepted


Could you clarify, please, nginx in docker or not ?

If not, when you run you can set host ip as upstream.

Because docker you run with mapping with some specific port, I hope

docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server



nginx IS also running in a container.



Now nginx - work for where upstream is , 

1. ATL is correct. 

2. Base URL -

Ok, I understand I have to set the Base URL, but I'm not sure where to do it.  The documentation doesn't mention that environment variable.

So, here's what I had to do to fix this.

1. I needed to set

2. I needed to set ATL_PROXY_PORT=443 (ssl is handled at the proxy level)

3. I needed to set ATL_TOMCAT_SCHEME=https

I had to muddle my way through the UI, removing the :8090 from the address at each click and change the Server Base URL to

Everything is finally working.  Thanks so much for your help Gonchik! 

Like # people like this

You are welcome!

I should say, it "mostly" works.  When I hit, I'm redirected to

If I remove the :8090, I get the confluence login page.  I have to keep removing the :8090 from the url.

Then, I see the error:

Confluence's base URL is set to but you are accessing from

Aha, let's proxy name in server.xml :) and rerun docker :)

Looking at the instructions here:

I've set the ATL_PROXY_NAME variable to

version: "2"
container_name: confluence
image: atlassian/confluence-server
restart: unless-stopped
- 8090:8090
- 8091:8091
- /opt/confluence/data:/var/atlassian/application-data/confluence

Like Gonchik Tsymzhitov likes this


The idea is taken from

server { 
# very important for installation, can be commented after!
   proxy_read_timeout 600s;

   location / {
       client_max_body_size 100m;
       proxy_set_header X-Forwarded-Host $host;
       proxy_set_header X-Forwarded-Server $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   location /synchrony {
       client_max_body_size 100m;
       proxy_set_header X-Forwarded-Host $host;
       proxy_set_header X-Forwarded-Server $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

   listen [::]:443 ssl; # managed by Certbot
   listen 443 ssl; # managed by Certbot
   ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
   if ($host = {
       return 301 https://$host$request_uri;
   } # managed by Certbot


   listen [::]:80;
   listen 80;
   return 404; # managed by Certbot



version: '2' 

   image: atlassian/confluence-server
   container_name: confluence
     - confluencenet
     - /b100pro/atlassian/confluence/data:/var/atlassian/application-data/confluence
     - ATL_PROXY_PORT=443
     - ATL_TOMCAT_SCHEME=https

   image: postgres:10.14-alpine
   container_name: confluence-postgres
     - .env
     - confluencenet
     - /b100pro/atlassian/confluence/db:/var/lib/postgresql/data
     - POSTGRES_USER=confluencedb
# password taken from .env file
     - POSTGRES_DB=confluencedb

   external: false


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

408 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you