Deploy a Self-hosted Bitwarden Server on Ubuntu 20.04

Updated on February 2, 2021
Deploy a Self-hosted Bitwarden Server on Ubuntu 20.04 header image


This article explains how to deploy a self-hosted Bitwarden server at Vultr. Bitwarden is a popular open-source password manager.


This guide uses as an example server name. Substitute your server and domain name.

Bitwarden needs a Hosting Installation Id and Key to install. Please Request your Hosting Installation ID and Key before performing the steps in this guide.

1. Create a Bitwarden User

Create a user to run Bitwarden. Use bash as the default terminal and /opt/bitwarden as the home directory.

$ sudo useradd -s /bin/bash -d /opt/bitwarden bitwarden

Add user bitwarden to group docker so it can access Docker.

$ sudo usermod -aG docker bitwarden

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

$ sudo mkdir -p /opt/bitwarden
$ sudo chown bitwarden: /opt/bitwarden
$ sudo chmod 700 /opt/bitwarden

Switch to the new user.

$ sudo su - bitwarden

2. 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 Y to get a free SSL certificate from Let's Encrypt.
  3. Enter an email address to receive Let's Encrypt reminders.
  4. Enter the installation id that you got from Step 1.
  5. Enter the installation key that you got from Step 1
  6. Wait for the installation to finish.

3. 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:


Run the following command to apply your changes:

./ restart

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

4. Create an Account

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

Next Steps

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.

More Resources