How to Self-Host Bitwarden Password Manager on Raspberry Pi Zero
Many users create simple passwords or use the same ones while signing up for any service or product online, as they are easy to remember. Some users do use complex passwords but save the credentials in the web browser, which is neither recommended nor safe. Instead of using a web browser to manage your passwords, you’re able to build a self-hosted modern password manager using Bitwarden with Multi-Factor Authentication (MFA), backups, SSL certificate, remote access, and enhanced security.
Things You Will Need
You can set up a Bitwarden server on an old laptop, PC, or Raspberry Pi 3, 4, or 400. However, in this guide we will show how to host Bitwarden anduse the password manageron a Raspberry Pi Zero 2 W, which works well as it’s small and runs on low power and resources. You’ll need the following items:
Step 1: Install Raspberry Pi OS Lite (64-bit)
Insert the microSD card into the card reader and connect it to your computer system. Then follow these steps to write the 64-bit Lite version of Raspberry Pi OS to it.
Step 2: Connect Over SSH
Since we enabled the SSH at the time of writing the OS, we can connect to your Raspberry Pi over SSH using the Terminal app on macOS or Linux, and PuTTY on Windows. To connect to the Pi, we must know the IP of the Raspberry Pi. You can use the Fing app on your smartphone or check the DHCP settings of your router to find the IP.
If you are using the Terminal app on macOS or Linux, run the following command,

For instance:
Type your password and press theReturn/Enterkey.

If using PuTTY instead:
You will be logged in to the Pi over SSH successfully. If not, check the network connection, your username, and your password.

Run the following command to update and upgrade software packages. This may take a while to finish.
Step 3: Install Docker
To install Docker on Raspberry Pi, run the following command in the SSH terminal window.
This will run a script and install Docker on your Raspberry Pi. Check the Docker version installed using the following command.

Next, we will permit our default pi user to access this Docker installation. The command is as follows:
Once this is done, reboot the Raspberry Pi using thesudo rebootcommand, and then continue following the steps given below to install Portainer.

Step 4: Install Portainer
Although you can manage Docker containers via the command line, Portainer provides a user-friendly GUI interface for deploying and managing our Docker containers on Raspberry Pi. To install Portainer, run the following command in the SSH terminal window.
To run Portainer, we need to create a new Docker container at port 9000.
Once done, open the web browser and visit the IP address of Raspberry Pi at port 9000 to open and access the Portainer container:
http://[RaspberryPi-IP-Address]:9000
Enter the desired Username and Password to create a Portainer user account and log in.
Step 5: Install and Set Up Bitwarden RS (Vaultwarden)
After logging into Portainer, follow these steps to deploy and set up a self-hosted BitWarden server on Raspberry Pi.
Step 6: Set Up a Cloudflare Tunnel
To access and use Bitwarden, you must set up a reverse proxy. you could deploy and use Nginx Proxy Manager to add and set up a proxy host. However, we will use a completely different approach and instead use the Cloudflare Tunnel service to access Bitwarden remotely from anywhere with a secure SSL connection.
To set it up, you must have a registered domain. Add your domain to Cloudflare and then follow these steps to install and set up the Cloudflare Tunnel.
Step 7: Log In and Create Users
You can now access your self-hosted Bitwarden server from anywhere in the world at the hostname you set up in the Cloudflare Tunnel.Enable the admin panelto manage the users and vaults in your Bitwarden server.
You can also create multiple accounts of your friends and family to allow them to save their passwords in their Bitwarden vaults in encrypted form, generate passwords, etc. Make sure to enable 2-Factor Authentication for better security.
After creating the account, you or users can log in to Bitwarden and import their passwords from the web browser (.csv) to their Bitwarden accounts or vaults to safeguard the passwords. Refer to theBitwarden documentationto learn more about how to use it. In addition, you may alsoself-host Bitwarden at (nearly) no cost using Google Cloud.
DIY Password Manager with Complete Privacy
This is how you deploy a secure self-hosted Bitwarden server on a Raspberry Pi Zero 2 W. The steps are the same as discussed in this guide if you want to set up a Bitwarden server on Raspberry Pi 3 or Raspberry Pi 4/400.
After deploying the Bitwarden server, you can install the Bitwarden extension in the web browser, or app on your Android or iOS device, to create and manage passwords. Since we are using Cloudflare Tunnel, we do not expose our public IP, which makes it more secure than other methods. Your passwords and login information remain safe, secure, and private in your Bitwarden vaults.
If you can nail this DIY project, you may never have to pay for cloud storage again.
Who asked for these upgrades?
Lose your laptop without this feature, and you’ll wish you had turned it on.
Some subscriptions are worth the recurring cost, but not these ones.
Flagship price, mid-range phone.
The key is not to spook your friends with over-the-top shenanigans.