1.9 KB

nginx-proxy stack

  1. nginx-proxy acts as reverse proxy for other containers.

  2. acme-companion obtains certificates from letsencrypt used by the revsers proxy.

Both monitor the docker daemon via /var/run/docker.sock for newly created containers. Based on specific environment variables, see example below, the required configuration gets generated.


Important: Make sure the container is connected to the reverse-proxy_default network.

    image: jwilder/whoami
    container_name: whoami
docker run
docker run --rm --name whoami \
           --env VIRTUAL_HOST=$fqdn \
           --env LETSENCRYPT_HOST=$fqdn \
           --network reverse-proxy_default \


To activate the configuration for mailcow:

  • cd in ./data/conf.d/ and
  • create a hardlink ln ../mailcow_proxy.conf mailcow_proxy.conf
  • The volume with certs obtained by mailcow is already part of docker-compose.yml, comment if not needed


To set proper headers for ejabberd:

  • cd in ./data/vhost.d/ and
  • create a hardlink ln ../ejabberd-vhost

Basic Auth

echo "someusername:"echo "somepassword" openssl passwd -stdin> ./data/htpasswd/ to enable basic auth for a vhost or use the bash script in ./utils/

Notes and pitfalls

When changing domains while moving from development to production, perform a docker system prune prior to restarting the service.