Installing self-hosted Bitwarden on server with existing nginx

I want to install Bitwarden on a server that already has a few services running, like Gitea, NextCloud, and a few other services for which I already have running. Also, certbot is already running and issuing LetsEncrypt certs regularly as well.

My question is this: Running the scripts to follow simple Docker install at Install and Deploy - Linux | Bitwarden Help Center , will that interfere with anything, or is there anything I should be looking out for. I don’t want to damage any of the services I already have running.

From what I can see in the instructions, To avoid any conflicts with the ports that Nginx is listening on, I may need to adjust the port numbers as per these instructions at the link above:

Some installation scenarios (e.g. installations behind a proxy with alternate ports) may require adjustments to config.yml that were not provided during standard installation.

Is this correct? Are there instructions for using my existing Nginx daemon using 443 (setting up a Server block to proxy requests to the dockerized Bitwarden services) to service the Bitwarden services?

If all of my existing services, along with Bitwarden, are being handled by Nginx over TCP 443, I won’t need to make any changes to the firewall in front of the server, and certbot can just add the new site in the server block as usual for LetsEncrypt (that’s my thinking, anyway) What are the best practices for what I’m looking to do here?

Hi @tallship did you manage to sort this out?

I am in the same situation… I am changing self-hosted servers at AWS and have moved my Bitwarden first but now need the standalone system wide NginX to be able to host my web sites!

I think you can change the port that Bitwarden will run on - like 8443 - and then I would change the config in my various apps and web browser extensions…

e.g.

https://vault.mydomain.com:8443

Any ideas?

Not to dig up an old thread, as I too have this problem and have posted in an alternate thread, but were you able to do anything with this? I was able to get the installation completed after changing around my existing services. I can access bitwarden webvault just fine, however I cannot connect desktop app to the instance.

Hi Matt,

I fixed it by changing my infrastructure to use Docker containers and a proxy in front of it all. I was thinking about using Dockers anyway but this gave me the push I needed.

More information here at my wiki - Docker - Indie IT Wiki

Bitwarden (Vaultwarden to be precise) runs in a Docker container which maps port 8100 on the server side to port 80 on the container side (8100:80).

More information is here - Bitwarden - Indie IT Wiki

I started by using the point-and-click Nginx Proxy Manager (NPM - https://nginxproxymanager.com/) to handle all the traffic to each of the Docker containers for web sites and Bitwarden.

So, NPM would handle all the https traffic to my Bitwarden vault using a web browser plugin.

Then, any other web projects, NPM would deal with those for each domain name.

However, about 2 months ago, I changed from NPM to Traefik Proxy Manager - a far superior app which works inherently and automagically with Docker to proxy and route all traffic.

More information is here on my wiki - Traefik - Indie IT Wiki

Please get in touch of you need more help - https://paully.co.uk/Paul_Littlefield_CV.pdf

All the best.

Regards,

Paul Littlefield

PS: Bitwarden is the best and I pay the annual charge for the extra features :slight_smile: