Introduction

Bitwarden is an open-source password manager that can be self-hosted at home to keep your passwords and other private data secure. The official Bitwarden image only supports the amd64 architecture and I needed a container that I could run on my Raspberry Pi 4 cluster. Luckily I found Bitwarden_rs which is not as resource intensive as the official image and is perfect for small self-hosted environments. You can check out my Bitwarden review here. If you do not have Docker installed on your Raspberry Pi you can view the steps to get it up and running here.

In order to locate which container to run I checked their Github Wiki and found that I need the bitwardenrs/server:raspberry image which is armv7hf compatible. This container image also includes an SQLite database which works well for one or two users.

Creating a Volume to Store Data

First, create a docker volume specifically for Bitwarden:

docker volume create bitwarden

Run command for Bitwarden_RS

Then, run the following command:

docker run \ -p 8005:80 \ -v bitwarden:/config \ --name bitwarden \ --restart always \ bitwardenrs/server:raspberry

Once the container is running, you can access your installation by visiting http://RASPBERRYPIIP:8005 . You should see this screen:

Create your account and login. Because this installation is pre-configured to use an SQLite back end, no additional configuration is needed.

Enabling the Admin Page

If you want to enable the Bitwarden admin page to make changes to the configuration you need to redeploy the container and add -e ADMIN_TOKEN=random_token to your run command. It is recommended that you generate a random token by opening your terminal app and running openssl rand -base64 48 . Keep that code and place it in place of random_token in the below docker run command:

docker run \ -p 8005:80 \ -e ADMIN_TOKEN=random_token \ -v bitwarden:/config \ --name bitwarden \ --restart always \ bitwardenrs/server:raspberry