I am trying to run a bitwarden self-hosted installation and I am running into this issue where I go to create an account but fail to create the account due to the error message below. Any help would be greatly appreciated.
An error has occurred. <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html>
Please let me know what commands to run such as logs to better help visualize the error and get to the solution faster.
I’ve found a similar article in the community forums for this issue. I ran the below commands and unfortunately I am still unable to create an account.
Double-check the values you have set for the base service uris, and especially the internal service uris. The configuration for these is not well-documented.
Which exact setup are you using and what values do you have?
I have a Docker nginx activ as a reverse proxy. Then I have several (docker) web-services as nginx server in the same docker network, bitwarden is one of them. Then I have as well the ACME companion to have the HTTPS certifcates automated.
You say you’re using docker imageS - so not the unified setup? In that case I suspect that the localhost:500x urls for the services won’t work, unless you configure them to be reachable by each other. In my current understanding, those would be the correct values for the unified setup, where they share a single image/machine.
What do you mean by unified setup? If I get it correctly here:Install and Deploy - Unified (Beta) | Bitwarden Help Center this is nothing else than a docker image. At least I’m using this exact docker image mentioned there. The only difference I see is that I “hide” everything behind a reverse proxy.
There are at least two ways to self-host Bitwarden. One is the “unified” deployment, where you have a single image that contains all the microservices.
I finally was able to solve it… it was because I did not specify BW_INSTALLATION_ID and BW_INSTALLATION_KEY. Because of that, some services did not start and that’s why they could not have been conected by the frontend.
I provided the variables once in the beginning but then somehow they got lost. Was able to figure that out having a look at the log-files.