mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
Help needed - 502 error behind nginx reverse proxy #1522
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jannomag on GitHub.
Hi,
I'm currently trying to get bitwarden_rs to run on a raspberry pi which already runs nginx.
So I set up a reverse proxy, like I did on my homeserver running Ubuntu 20.04 (x85_64 system).
But I get 502 error and couldn't find a fix for this.
I'm not very good in such things, so I'm sorry when something is completely wrong...
My nginx config for bitwarden using a wildcard ssl certificate with letsencrypt:
`server {
listen 80;
server_name bw.example.de;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name bw.example.de;
index index.html index.php;
ssl_certificate /etc/letsencrypt/live/example.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.de/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}`
And this is how I start the docker container:
docker run -d --name bitwarden \ -e ROCKET_TLS='{certs="/ssl/archive/example.de/fullchain2.pem",key="/ssl/archive/example.de/privkey2.pem"}' \ -e LOG_FILE=/data/bitwarden.log \ -e 'SIGNUPS_ALLOWED'='true' \ -e 'DOMAIN'='https://bw.example.de/' \ -v /etc/letsencrypt/:/ssl/ \ -v /bw-data/:/data/:rw \ -p 8083:80/tcp \ -p 3012:3012/tcp \ --restart always \ bitwardenrs/server:raspberryThe certificate works, the web browser shows the site a secure. But I get the 502 nginx error.
Any solution for this?
@cooling75 commented on GitHub:
Hi,
I could be wrong but from a quick look into the nginx documentation I miss the 'upstream' section?
@Jannomag commented on GitHub:
I got it to work with this tutorial and it's linked web-vault:
https://www.reddit.com/r/Bitwarden/comments/dg78bi/building_selfhosted_bitwarden_via_bitwarden_rs/?utm_source=amp&utm_medium=&utm_content=post_body
I just forgot to close this issue, sorry!