I have a DSM918 running a number of containers in Docker. I have set up linuxserver’s swag as my secure nginx, and I seem to be having a lot of trouble getting bitwarden_rs behind it.
Here’s my docker-compose for bitwarden (I have to docker-compose up --no-start because I’ve set up a custom bridge network and can’t fathom how to get the right syntax to connect the container to it when created, then re-edit the network settings container in portainer, then start):
version: "3"
services:
bitwarden:
container_name: bitwarden
image: bitwardenrs/server:latest
ports:
- "680:80/tcp"
- "3012:3012/tcp"
environment:
TZ: 'Europe/Somewhere'
# DOMAIN: 'https://sub.mydomain.com/bitwarden'
ADMIN_TOKEN: 'noneofyourbloodybusiness'
WEBSOCKET_ENABLED: 'true'
volumes:
- '/volume1/docker/bitwarden/:/data/'
restart: unless-stopped
the DOMAIN is hashed out because every time I leave it in, I get 404 error whenever I got to the HTTP://DSM_IP:680. Hashed out, I can get to it. I have the same issue when I put the DOMAIN in the admin page or in config.json. If I docker exec into swag, I can ping the hostname bitwarden…
Here’s my swag subfolder config for the reverse:
location /bitwarden {
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 64;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Front-End-Https on;
proxy_pass http://bitwarden:680;
}
location /notifications/hub {
proxy_pass http://bitwarden:3012;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
going to https://sub.mydomain.com/bitwarden just gives me a 502 error. in the nginx log, it says
[error] 410#410: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 172.10.1.1, server: _, request: "GET /bitwarden/ HTTP/2.0", upstream: "http://172.10.1.136:680//", host: "sub.mydomain.com"
I’m at my wit’s end with this - I’ve tried multiple different subfolder configs, multiple different docker-compose setups, and the best I can do is to access bitwarden from within my network, which is pretty useless…
Would be eternally grateful for any help! ‍♂