Self hosted Bitwarden on Debian 12

I need a password manager – I simply have too many passwords. For a very long time my weapon of choice was Locko. However, due to it’s lack of sharing passwords locally (e.g. via some personal cloud) I have decided to look for something else. Bitwarden seemed like a good idea. Open Sourced, allows self hosting (this is my preferred way of storing passwords – locally), Docker based.

Installation of Docker


1. Docker

I have decided to use Docker installation based on deb packages. Quite simple and straightforward: deb based Docker. From there, you have to simply follow steps here: Bitwarden at Linux.


2. domain and SSL certificates

There are two major issues with the Bitwarden self hosted installation – domain name and SSL certificate. If you already have some hosting running this is not such a big problem. After all, you already have a domain. You probably have a certificate as well (for example wildcard one). But still, you have to open your machine for the world with a DNS record A modification. Fortunately, there is a solution here. After successful installation you can make your Bitwarden local again. Just take a look below.

1. Setup A - DNS record and point at your machine (ideally with a public IP)
2. Get your SSL certificate into machine (if you have one – you can use Let's Encrypt as well)
3. You will have to add port forwarding inside your router for the installation time
4. Setup Bitwarden at target machine


3. making Bitwarden local again

1. Disable port forwarding
2. Add entries inside /etc/hosts

This way, you will be able to access your Bitwarden instance locally, without exposing it to the outside world. And all of that with a minimal effort required. Happy password sharing between different machines :)