In this tutorial, we will show you how to install Bitwarden on Ubuntu 20.04 LTS. For those of you who didn’t know, Bitwarden is password management open-source software. The source code for Bitwarden is hosted on GitHub and everyone is free to review, audit, and contribute to the Bitwarden codebase. Bitwarden helps you to not only create and manage your passwords but also sync them across all devices. It offers several client applications including mobile apps, a CLI, a web interface, browser extensions, and desktop applications.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of Bitwarden Password Manager on a Ubuntu 20.04 LTS Focal Fossa.
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, and any other Debian-based distribution like Linux Mint or elementary OS.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Bitwarden on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following
apt commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Installing Required Dependencies.
We need to install some dependencies in your server:
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Step 3. Installing Docker.
Bitwarden will be deployed and run on your machine using an array of Docker containers. Bitwarden will work equally well with Docker Community (free) and Enterprise editions:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
Next, add the Docker repository with the following command:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Once done, install the Docker and Docker Compose using the following command:
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose
Step 4. Installing Bitwarden Password Manager on Ubuntu 20.04.
Now we download the Bitwarden installation script from their official website:
curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh chmod +x bitwarden.sh
Before installing Bitwarden, you will need to enter your email ID, click submit. Such a page is loaded.
After that, start the Bitwarden installation with the following command:
Enter your system hostname:
_ _ _ _ | |__ (_) |___ ____ _ _ __ __| | ___ _ __ | '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ | |_) | | |_ \ V V / (_| | | | (_| | __/ | | | |_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| Open source password management solutions Copyright 2015-2020, 8bit Solutions LLC https://bitwarden.com, https://github.com/bitwarden =================================================== Docker version 19.03.12, build 48a66213fe docker-compose version 1.25.0, build unknown (!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): 192.168.77.21 (!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): n 1.36.1: Pulling from bitwarden/setup 6ec8c9369e08: Pull complete fe8522826504: Pull complete 658bf4619169: Pull complete 0392978bbc2e: Pull complete 33dd02257803: Pull complete 2a69859c8164: Pull complete d68079cd71ee: Pull complete 7c08df4e94b0: Pull complete 653a8af878c4: Pull complete d252f877c4a2: Pull complete Digest: sha256:5b2c43b46c03da54aecc6d19098b0pengen019725kimpoif29 Status: Downloaded newer image for bitwarden/setup:1.36.1 docker.io/bitwarden/setup:1.36.1 (!) Enter your installation id (get at https://bitwarden.com/host): bmwe46325e-f0e7-47cf-9667-ac0f008645b9 (!) Enter your installation key: tloMmeilanamariaSC5 (!) Do you have a SSL certificate to use? (y/n): n (!) Do you want to generate a self-signed SSL certificate? (y/n): y Generating self signed SSL certificate. Generating a RSA private key ........................++++ ..................++++ writing new private key to '/bitwarden/ssl/self/18.104.22.168/private.key' ----- Generating key for IdentityServer. Generating a RSA private key .........++++ .......................++++ writing new private key to 'identity.key' ----- !!!!!!!!!! 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. 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: `./bitwarden.sh rebuild` or `./bitwarden.sh update` Next steps, run: `./bitwarden.sh start`
Once the installation has been completed, start the Bitwarden service with the following command:
Step 5. Accessing Bitwarden Web Interface.
Now, You can access the web interface the Bitwarden using the URL
http://your-server-ip. You should see the Bitwarden login screen:
Congratulations! You have successfully installed Bitwarden. Thanks for using this tutorial for installing Bitwarden Password Manager on Ubuntu 20.04 Focal Fossa. For additional help or useful information, we recommend you to check the official Bitwarden website.