How to Install Bitwarden on Ubuntu 20.04

In this article, we’ll explain how to install Bitwarden on Ubuntu 20.04.

Bitwarden is open source password manager. It stores sensitive information such as website credentials in an encrypted vault. The Bitwarden platform offers a variety of client applications including a web interface, desktop applications, browser extensions, mobile apps, and a CLI.

This article will guide you to install self-hosted Bitwarden on Ubuntu 20.04 server.


Let’s get started with the installation process.

Install Bitwarden on Ubuntu 20.04

1. Keep the server up to date

# apt update -y

# apt upgrade -y

2. Install Docker CE

Bitwarden will be deployed and run on your machine using an array of Docker containers. Bitwarden can be run with any Docker Edition or plan. Evaluate which edition is best for your installation.

Install repository over HTTPS using following command:

# apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Add Docker’s official GPG key:

# curl -fsSL | sudo apt-key add -

Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 by searching for the last 8 characters of the fingerprint:

# apt-key fingerprint 0EBFCD88

Use the following command to set up the stable repository:

# add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"

Update the apt package index:

# apt-get update

Install the latest version of Docker CE and containerd:

# apt-get install docker-ce docker-ce-cli -y

Start and enable docker service

# systemctl start docker

# systemctl enable docker

3. Install Docker Compose

Docker Compose requires Python and the pip package manager.

# apt install -y python3 python3-pip -y

Install Docker Compose with pip.

# pip3 install docker-compose

4. Create a Bitwarden User (Optional)

# adduser bitwarden

Set password for bitwarden user (strong password):

# passwd bitwarden

Add the bitwarden user to the docker group:

# usermod -aG docker bitwarden

Create a working directory and grant user bitwarden full permission for it.

# mkdir -p /opt/bitwarden
# chown bitwarden: /opt/bitwarden
# chmod 700 /opt/bitwarden

Switch to the new user.

# su - bitwarden

5. Install Bitwarden Server

Download the official Bitwarden deployment script:

# wget -O
# chmod +x

Execute the script.

# ./ install

  1. Enter your domain, such as
  2. Enter the installation id.
  3. Enter the installation key.
  4. Enter Y to get a free SSL certificate from Let’s Encrypt.
  5. Enter an email address to receive Let’s Encrypt reminders.
  6. Wait for the installation to finish.

6. Configure the Environment

Run ./ start to start the Bitwarden Server.

Note: Some Bitwarden features are not configured by the installer, and must be configured in the environment file, located at ./bwdata/env/global.override.env. At a minimum, you should configure:


[email protected]

Run the following command to apply your changes:

./ restart

See the official docs for more configuration information specific to your needs.

7. Create an Account

Visit your domain in a web browser, then click the button Create Account to register an account on your server.

The installation has been completed successfully. Now install Bitwarden Client on your devices. Set the server address to your domain by clicking the Setting button in the login page’s upper left corner.

In this article, we have shown how to install Bitwarden on Ubuntu 20.04.

Related Articles