[GH-ISSUE #935] "Bad Gateway" with Traefik v2 #661

Closed
opened 2026-03-03 02:01:55 +03:00 by kerem · 3 comments
Owner

Originally created by @damienclerc on GitHub (Mar 27, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/935

Hi all !

I have following this wiki : https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples for enable HTTPS with Traefik V2 but i get "Bad Gateway" when I try to access on my URL bitwarden.mydomain.com.

The certificate is correctly create by lets enscript on my file "acme.json".

My Traefik configuration :
image

My Bitwarden configuration :
image

The Traefik's logs when I try to access to my "bitwarden.mydomain.com" :
image

And the page than I get :
image

I don't see where the problem can come... We can see in the logs that Traefik redirects the url to the docker address of my container...

Thanks a lot for your help !

Originally created by @damienclerc on GitHub (Mar 27, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/935 Hi all ! I have following this wiki : https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples for enable HTTPS with Traefik V2 but i get "Bad Gateway" when I try to access on my URL bitwarden.mydomain.com. The certificate is correctly create by lets enscript on my file "acme.json". My Traefik configuration : ![image](https://user-images.githubusercontent.com/62769755/77794385-1471c280-706c-11ea-9413-edbd02f58cb9.png) My Bitwarden configuration : ![image](https://user-images.githubusercontent.com/62769755/77794535-5e5aa880-706c-11ea-99e7-5e348ca2608b.png) The Traefik's logs when I try to access to my "bitwarden.mydomain.com" : ![image](https://user-images.githubusercontent.com/62769755/77795198-73840700-706d-11ea-8351-df953be66155.png) And the page than I get : ![image](https://user-images.githubusercontent.com/62769755/77795414-c78eeb80-706d-11ea-867d-db6e776f1e5d.png) I don't see where the problem can come... We can see in the logs that Traefik redirects the url to the docker address of my container... Thanks a lot for your help !
kerem 2026-03-03 02:01:55 +03:00
Author
Owner

@dennisgerding commented on GitHub (Mar 29, 2020):

Hi, I guess its because you have to map Traefik to Bitwarden's internal ports (80 and 3012). I'm also unsure why you would open ports directly if you are using a reverse proxy.
Dennis

<!-- gh-comment-id:605618510 --> @dennisgerding commented on GitHub (Mar 29, 2020): Hi, I guess its because you have to map Traefik to Bitwarden's internal ports (80 and 3012). I'm also unsure why you would open ports directly if you are using a reverse proxy. Dennis
Author
Owner

@damienclerc commented on GitHub (Mar 29, 2020):

Hi Dennis,

Thank you very much ! It's work !
I am a beginner with Traefik and also Docker... You just made me understand a new notion :)
I did not understand that the redirection must be done on the internal port of the docker and not on the redirected port.

Thanks again !

<!-- gh-comment-id:605638083 --> @damienclerc commented on GitHub (Mar 29, 2020): Hi Dennis, Thank you very much ! It's work ! I am a beginner with Traefik and also Docker... You just made me understand a new notion :) I did not understand that the redirection must be done on the internal port of the docker and not on the redirected port. Thanks again !
Author
Owner

@mregni commented on GitHub (Mar 11, 2021):

Hi @Daams13, sorry for replying to a closed issue here. But I have the exact same issue.

Can you tell me how you fixed this Bad Gateway problem?

<!-- gh-comment-id:796659435 --> @mregni commented on GitHub (Mar 11, 2021): Hi @Daams13, sorry for replying to a closed issue here. But I have the exact same issue. Can you tell me how you fixed this Bad Gateway problem?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#661
No description provided.