Install Bitwarden on Ubuntu 20.04

This guide intends to teach you to Install Bitwarden Password Manager on Ubuntu 20.04.

Bitwarden is an open-source password manager. This means the source code is subject to constant audits from Bitwarden’s community of developers, researchers, users, and, ultimately, the public. With more eyes on the code, bugs are easier to spot, and that makes the app more secure.

Steps To Install Bitwarden on Ubuntu 20.04

To set up Bitwarden, you need some requirements.

Requirements

You must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Ubuntu 20.04.

Also, you need to have Docker and Docker Compose installed on your server. To do these, you can visit the following guides:

Install and Use Docker on Ubuntu 20.04

Install and Use Docker Compose on Ubuntu 20.04

Now follow the steps below to complete this guide.

Create Bitwarden User on Ubuntu 20.04

It is recommended to run Bitwarden as a dedicated user. To create the user you can use the following command:

sudo useradd -G docker,sudo -s /bin/bash -m -d /opt/bitwarden bitwarden

This will add the user to the sudo and Docker groups.

Then, set a password for your user by using the command below:

sudo passwd bitwarden
Output
New password:
Retype new password:
passwd: password updated successfully

Set the correct permission for the /opt/bitwarden directory:

sudo chown -R bitwarden: /opt/bitwarden

Install Bitwarden Password Manager on Ubuntu 20.04

At this point, you need to visit the Bitwarden hosting page and get the Installation ID and Key.

Next, switch to Bitwarden user and download the Bitwarden installation script with the following curl command:

# su - bitwarden
# sudo curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh

Then, set the correct permission for your script:

sudo chmod +x bitwarden.sh

And install the Bitwarden password manager with the following command:

sudo ./bitwarden.sh install

You will be asked to provide your domain or IP, SSL information, database name, installation ID and key, and self-signed SSL, as shown below:

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

Open source password management solutions
Copyright 2015-2023, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2023.3.0
Docker version 23.0.3, build 3e7cbfd
Docker Compose version v2.11.2

(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): bit.orcacore.net

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

(!) Enter the database name for your Bitwarden instance (ex. vault): bitdb

2023.3.0: Pulling from bitwarden/setup
3f9582a2cbe7: Pull complete
d866aec6058e: Pull complete
11332129480d: Pull complete
9f9b514859b0: Pull complete
b709e83c5e9e: Pull complete
1f8900615ea1: Pull complete
47137b35c8bf: Pull complete
b7b87e36a4d9: Pull complete
223d50917a39: Pull complete
23ee09621502: Pull complete
Digest: sha256:e09da2acdedd62819dd1fe774935d1a215058244cc6e1c18203bb65cf845f70c
Status: Downloaded newer image for bitwarden/setup:2023.3.0
docker.io/bitwarden/setup:2023.3.0

(!) Enter your installation id (get at https://bitwarden.com/host): 89c6b904-d1c1-42ff-9f99-afe501342444

(!) Enter your installation key: VUzFlxjaZzn4mevt6vvN

(!) 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/bit.orcacore.net/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`

Start Bitwarden

Now you can start your Bitwarden by using the command below on Ubuntu 20.04:

sudo ./bitwarden.sh start
Output
2023.3.0: Pulling from bitwarden/setup
Digest: sha256:e09da2acdedd62819dd1fe774935d1a215058244cc6e1c18203bb65cf845f70c
Status: Image is up to date for bitwarden/setup:2023.3.0
docker.io/bitwarden/setup:2023.3.0


Bitwarden is up and running!
===================================================

Update Bitwarden

To update Bitwarden, you can use the following commands:

# sudo ./bitwarden.sh updateself
# sudo ./bitwarden.sh update

Access Bitwarden Web Interface

At this point, you can access your Bitwarden Web interface by typing your domain name in your web browser:

https://your-domain

You will see the Bitwarden login screen, Click Create Account.

bitwarden account

Then, provide the information and click create account.

create bitwarden account

You will be redirected to the Bitwarden login page. Enter the Email and master password and click login with a master password.

bitwarden login page

You should see the Bitwarden dashboard on Ubuntu 20.04.

Bitwarden dashboard ubuntu 20.04

You can now add your passwords and share them between multiple devices.

Conclusion

At this point, you have learned to Install Bitwarden Password Manager on Ubuntu 20.04.

Hope you enjoy it. You may be interested in these articles on the orcacore website:

Use AWK Command with Examples on Linux

Check and Install Security Updates on Centos 7

Install and Configure Jenkins on AlmaLinux 9

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Stay informed and not overwhelmed, subscribe now!