How-to for Bitbucket Mirror in Docker container

This question is in reference to the docker Bitbucket server project here: .  I'm running in "mirror mode" like this "APPLICATION_MODE=mirror" via a docker-compose environment setting.

By default, the container exposes ports 7990 and 7999 (http and ssh).  No mention of https.  When running as a mirror, however, https and a valid ssl cert is a firm requirement.

How do I configure the container to support https?

I'm using the current latest version (5.5.0).

Thanks for any help or tips.

2 answers

1 accepted

1 vote
Answer accepted

Hi Trask,

Those settings are controlled in the file (see Bitbucket Server configuration properties for details), but the good news is that they are also exposed via environment variables.

For instance server.ssl.enabled=true becomes SERVER_SSL_ENABLED=true, likewise server.ssl.key-store becomes SERVER_SSL_KEY_STORE, etc.



Premier Support Engineer


Thanks Christian.  That lead me down the right path.  Below is my [redacted] {{docker-compose.yml}} file that might help others in the future.

I dug through a lot of documentation and wasn't aware that this was a way to accomplish setting up https-enabled mirror via docker.


Example for a BitBucket server in Mirror mode


version: '2'
    restart: always
    image: atlassian/bitbucket-server:5.5.0
      - ""
      - ""
      - "/media/RAID/bitbucket/bitbucket-server:/var/atlassian/application-data/bitbucket"
      - APPLICATION_MODE=mirror
      - SERVER_SECURE=true
      - SERVER_SSL_KEY_ALIAS=tomcat
      - SERVER_SSL_KEY_STORE=/var/atlassian/application-data/bitbucket/shared/config/ssl-keystore

I should mention I have valid certs and can handle the certificate configuration once I find out how to configure https support in the built-in http server.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

220 views 0 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you