How to Install Bitwarden on Ubuntu 24.04

Bitwarden is a free and open-source password manager that can be used to store passwords for any device and browser. This application helps you not only create and manage passwords but also sync them across all devices. Bitwarden offers multiple client applications including mobile apps, CLI, web interface, browser extensions, and desktop apps. In this tutorial, we will show you how to install Bitwarden on Ubuntu 24.04.

Prerequisites

  • A clean server with Ubuntu 24.04 VPS
  • You need SSH root access or a user with sudo privileges
Conventions
# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user

Step 1. Log in to your server via SSH

First, you will need to log in to your Ubuntu 24.04 VPS via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges. Subsequently, let us ensure that we are operating on Ubuntu 24.04. You may verify this by executing the command provided below.

# lsb_release -a

You should get this as the output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

Run the following command to update all installed packages on the server to their latest available versions:

# apt update

Step 2. Install Dependencies

We need to install some dependencies to proceed with installing Odoo in our system. Let’s install them by running this command below.

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

Step 3. Install Docker and Docker Compose

First, download and add the GPG key with the following command:

# 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"

The system will prompt you to hit ENTER to continue.

After adding the repository, install Docker and Docker Compose using the following command:

# apt update
# apt install docker-ce docker-ce-cli containerd.io docker-compose -y

Check the installed Docker version with the following command after installing the packages:

# docker --version

You will get the following output:

Docker version 28.0.1, build 068a01e

Now, you can verify the Docker Compose version with the following command:

# docker-compose --version

You will see an output like this:

docker-compose version 1.29.2, build unknown

Step 4. Add a System User

In this article, we will use a specific system user to run Bitwarden. Let’s create a new user called ‘bitwarden’

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

Now, let’s give the user a password

# passwd bitwarden

You will need to give a strong password, type the password then you will be prompted to retype it.

Now, get an installation ID and KEY. At that page, you will be prompted to type your email address and choose the data region. After typing your email address and choosing the data region, you can click on the Submit button. The Bitwarden system will print the installation ID and key. Please save a note for the installation ID and KEY, we need them to be able to install Bitwarden on our Ubuntu system.

Installation ID:
ab05c81b-bcb5-409b-a1c5-b29a00b10499

Installation Key:
bULbhFtUm8tisbAH56cN

Step 5. Install Bitwarden

In this step, let’s switch to the bitwarden user we created earlier.

$ su - bitwarden

Then, download the installation script.

$ wget https://go.btwrdn.co/bw-sh -O bitwarden.sh

The downloaded file should be given a permission to be executed.

$ chmod +x bitwarden.sh

This installation requires an empty server, the installation script will install the webserver on docker. So, make sure you do not have an active webserver. We can now start the installation.

$ ./bitwarden.sh install

In this step, you will be asked to type the domain name you want to use to connect to bitwarden from bitwarden client. Make sure to use an FQDN that is already pointing to your server. And, in the end of the installation you would need to provide the installer with the installation ID and key, which you already got from https://bitwarden.com/host/ in the previous step. Once completed, you will see this similar output:

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

As seen in the output, we can run this command:

$ ./bitwarden.sh start

It will take some time to get started, and you will get a message when Bitwarden finally runs. At this point, you should be able to access your Bitwarden installation at https://bitwarden.yourdomain.com

Step 6. Access Bitwarden

To configure Bitwarden, you can create a new account at https://bitwarden.yourdomain.com. A user account has been created now, you can use this credential to log in to Bitwarden backend.

install bitwarden on ubuntu 24.04

In this dashboard, you can configure your Bitwarden installation.

bitwarden vault on ubuntu 24.04

That’s it, you have successfully installed Bitwarden on Ubuntu 24.04.

To use Bitwarden, you can install Bitwarden client like Bitwarden extension for Chrome.

bitwarden browser extension

To connect to your Bitwarden server, you can change it to use your own URL at https://bitwarden.yourdomain.com

self-hosted bitwarden on ubuntu 24.04

You’re Done!

That is all! You have successfully installed Bitwarden on Ubuntu 24.04 and connect to it using a Bitwarden client.

If you want to host a Bitwarden server with high-end hardware at an affordable price, you can check our Ubuntu 22.04 VPS hosting plans and start hosting any software you want with dedicated resources.

PS. If you liked this post on how to install Bitwarden server on Ubuntu 24.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

Leave a Comment