I am having some difficulties with getting Bitwarden (local docker) to work behind an nginx reverse proxy (jwilder docker).
I have seen the docker-compose.overwrite.yml suggestions on other threads and that doesn’t seem to work.
- Configure nginx on main linux account:
docker network create proxnet
version: "3.7"
services:
reverse-proxy:
image: "jwilder/nginx-proxy:latest"
container_name: "reverse-proxy"
volumes:
- "html:/usr/share/nginx/html"
- "dhparam:/etc/nginx/dhparam"
- "vhost:/etc/nginx/vhost.d"
- "certs:/etc/nginx/certs"
- "/run/docker.sock:/tmp/docker.sock:ro"
restart: "always"
networks:
- "proxnet"
ports:
- "80:80"
- "443:443"
letsencrypt:
image: "jrcs/letsencrypt-nginx-proxy-companion:latest"
container_name: "letsencrypt-helper"
volumes:
- "html:/usr/share/nginx/html"
- "dhparam:/etc/nginx/dhparam"
- "vhost:/etc/nginx/vhost.d"
- "certs:/etc/nginx/certs"
- "/run/docker.sock:/var/run/docker.sock:ro"
environment:
NGINX_PROXY_CONTAINER: "reverse-proxy"
DEFAULT_EMAIL: "[email protected]"
restart: "always"
depends_on:
- "reverse-proxy"
networks:
- "proxnet"
volumes:
certs:
html:
vhost:
dhparam:
networks:
proxnet:
external: true
docker-compose up -d
- Switching to bitwarden account install following the local/on-prem install:
Pull the bitwarden.sh
./bitwarden.sh install
Entered value info:
(Insert my sub.domain here)
Let’s Encrypt - no
Have SSL cert - no
I followed the setup in this post for the docker-compose.overwrite.yml replacing domain values for my own and network name to proxnet to match my setup.
After everything is set and ./bitwarden.sh rebuild && ./bitwarden.sh start
I get a 503 nginx page when I try to view in a browser. I’m not sure what’s going on, when I run a test basic nginx container it shows the page.
Example:
docker run --rm --name nginx-dummy -e VIRTUAL_HOST=sub.domain.com -e LETSENCRYPT_HOST=sub.domain.com -e VIRTUAL_PORT=8081 --network proxnet -d nginx:latest
I’m at a loss and can’t figure out what isn’t setup correctly.