Install Bitwarden Password Manager on Ubuntu 20.04

Last Updated:

In this tutorial, you will learn how to install Bitwarden password manager on Ubuntu 20.04. Bitwarden is an “open-source password manager which provides an easiest and safest way for individuals to store, share and secure sensitive data”. Bitwarden is available for individual and organizational use in both free and paid plans. In this tutorial, we will be learning how to install and setup free version of Bitwarden on Ubuntu 20.04 for individual use.

Installing Bitwarden Password Manager on Ubuntu

In order to install Bitwarden on Ubuntu 20.04;

Minimum System Requirements

Before you can install Bitwarden password manager, below are the minimum recommended system requirements that your system should meet;

  • Processor: x64, 2 GHz dual core
  • Memory: 4 GB RAM (system memory)
  • Storage: 25 GB
  • Docker: Engine 19+ and Compose 1.24+

Run System Update

Ensure that your system package cache is up-to-date.

apt update

Set System Domain Name

Bitwarden requires a system domain name while being installed. Therefore, set your system FQDN as follows. Be sure to replace the domain accordingly.

hostnamectl set-hostname

Install Docker and Docker Compose on Ubuntu 20.04

Bitwarden is deployed using Docker containers through the use of Docker compose. In this tutorial, we are using the community Docker edition. Follow the links below to install both Docker and Docker compose on Ubuntu 20.04.

Install Docker CE on Ubuntu 20.04

Install Docker Compose on Ubuntu 20.04

Installing Bitwarden Password Manager

Once the above procedures are done, you can now install Bitwarden password manager.

Obtain Bitwarden Hosting Installation ID and Key

Navigate to Bitwarden hosting page and provide your email ID to get the hosting installation ID and key.

Once you enter your email ID, click submit. Such a page is loaded.

bitwarden install host id key

Keep the installation ID and Key as we will need it later in the installation.

Download Bitwarden Installation Script

Run the command below to download the Bitwarden installation script.

apt install curl
curl -Lso

Make the script executable;

chmod +x

Next, install Bitwarden password manager;

./ install

Enter your system hostname;

 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2020, 8bit Solutions LLC,


Docker version 19.03.12, build 48a66213fe
docker-compose version 1.27.2, build 18f557f9

(!) Enter the domain name for your Bitwarden instance (ex.

Choose whether you want to use Let’s Encrypt to generate a free SSL certificate. In our case, this is a local setup and hence, we chose no.

(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): n

The script will then proceed to pull Bitwarden containers.

Once the container download is done, you are prompted to enter the hosting installation id and key you obtained from the Bitwarden hosting page.

Digest: sha256:d53aa2bc97c9bfdb5609cf9ec7cbee8cfedac536a7b101e039db2e0d733c60e0
Status: Downloaded newer image for bitwarden/setup:1.37.0

(!) Enter your installation id (get at 23b..............................2fb40d

(!) Enter your installation key: 6trsD........................g85

Next, if you have an SSL certificate, say yes otherwise, say no and generate self signed one;

(!) Do you have a SSL certificate to use? (y/n): n

(!) Do you want to generate a self-signed SSL certificate? (y/n): y

The self signed SSL cert is generated with such a warning;

!!!!!!!!!! WARNING !!!!!!!!!!
You are using an untrusted SSL certificate. This certificate will not be 
trusted by Bitwarden client applications. You must add this certificate to 
the trusted store on each device or else you will receive errors when trying 
to connect to your installation.

And the installation of Bitwarden on Ubuntu 20.04 is now done;

Building nginx config.
Building docker environment files.
Building docker environment override files.
Building FIDO U2F app id.
Building docker-compose.yml.

Installation complete

If you need to make additional configuration changes, you can modify
the settings in `./bwdata/config.yml` and then run:
`./ rebuild` or `./ update`

Next steps, run:
`./ start`

Running Bitwarden Password Manager

You can now start Bitwarden Docker containers;

./ start
Creating bitwarden-web           ... done
Creating bitwarden-icons         ... done
Creating bitwarden-events        ... done
Creating bitwarden-attachments   ... done
Creating bitwarden-api           ... done
Creating bitwarden-identity      ... done
Creating bitwarden-sso           ... done
Creating bitwarden-notifications ... done
Creating bitwarden-mssql         ... done
Creating bitwarden-admin         ... done
Creating bitwarden-portal        ... done
Creating bitwarden-nginx         ... done
1.37.0: Pulling from bitwarden/setup
Digest: sha256:d53aa2bc97c9bfdb5609cf9ec7cbee8cfedac536a7b101e039db2e0d733c60e0
Status: Image is up to date for bitwarden/setup:1.37.0

Bitwarden is up and running!

to update, run `./ updateself` and then `./ update`

You can now check Bitwarden containers;

docker ps

Accessing Bitwarden Web Interface

The installation of Bitwarden is now complete. You can access the web interface using the https://bitwarden-server-fqdn. Replace the bitwarden-server-fqdn with your system fully qualified domain name.

Ensure that from the workstation you are accessing Bitwarden from can resolve the Bitwarden hostname. Otherwise use the hosts file if you do not have DNS.

bitwarden login

Create a new account to access your Bitwarden secure vault by clicking Create Account.

create accnt

Once you have created an account, login to your Bitwarden vault.

bitwarden interface 1

Verifying Self-hosted Bitwarden Email

In order to verify Self-hosted Bitwarden email, we are going to use local Postfix relay via Gmail SMTP. Therefore, install and configure Postfix to use Gmail SMTP relay by following the guide below;

Configure Postfix to Use Gmail SMTP on Ubuntu 20.04

Next, configure Postfix to allow Bitwarden docker containers to sent emails through it. How I did this, i just greped the docker IP addresses;

ip add | grep 172.
    inet brd scope global docker0
    inet brd scope global br-a8c84f91fe15
    inet brd scope global br-d5da6fd7075c

Then, edit postfix main conf and add the Bitwarden docker container networks to mynetworks variable.

vim /etc/postfix/
mydestination = $myhostname,,, , localhost
relayhost = []:587
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +

Restart postfix;

systemctl restart postfix

Next, configure Postfix SMTP mail server IP address and Port settings by editing the environment settings file, ./bwdata/env/global.override.env.

vim ./bwdata/env/global.override.env

In our setup, we are using Postfix on the localhost, hence only the lines, highlighted we used.


Save and exit the file.

You should now be able to sent the verification mail.

Check your inbox and do the account verification.

Once you have verified the email, the verify email notification on the dashboard should now be gone.

bitwarden verified

You can now safely store your passwords in your safe vault. Enjoy.


Installing and Deploying Bitwarden

Install and Setup Passbolt Password Manager on Ubuntu 20.04

Configure OpenLDAP Password Expiry Email Notification

Install sysPass Password Manager on Ubuntu 18.04

Import Saved Passwords From Firefox to Chrome on Ubuntu 18.04

Disable SSH Password Login for Specific Users in Ubuntu 18.04


We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
I am the Co-founder of, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment