Jump to content

Self host: How to install Bitwarden password manager on Ubuntu 22.04


brent

Recommended Posts

This article is for those looking for a detailed and straightforward guide on installing Bitwarden on Ubuntu Server 22.04 LTS.

Bitwarden is a free open-source password manager with the ability to sync your account information across all devices.

In this guide, we will consider the case when you already have a server running Ubuntu Server 22.04 LTS.

prerequisites:

  • Please note: that you will need to open the following TCP ports to access your server:
  • TCP port 80 - to receive a free cryptographic certificate through the Let’s Encrypt CA.
  • TCP port 443 - to access the Bitwarden dashboard.
  • gmail app password created Create the password here.

 

 

First, you need to request an installation ID and installation key to host Bitwarden on your server. You must use a unique ID and key for each Bitwarden installation.

  • Follow the link, enter your email address in the “Admin Email Address” field and click on the “Submit” button.

image.png

Save the resulting “Installation Id” and “Installation Key”. These values will be required during Bitwarden installation.

image.png

 

We connect to the server on which you plan to install Bitwarden.

Download the Bitwarden installation script using the command:

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

image.png

Let’s enable the execution of the file “bitwarden.sh” using the command:

chmod +x bitwarden.sh

image.png

 

Now let’s start the Bitwarden installation using the command:

sudo ./bitwarden.sh install

image.png

 

Now you need to specify the domain name that you plan to use to access the Bitwarden dashboard.

Specify the domain name to access Bitwarden and press the “Enter” button.

image.png

 

This tutorial walks you through obtaining a free cryptographic certificate through the Let’s Encrypt CA.

Press the “y” button, then “Enter”.

image.png

 

We indicate the email address to which Let’s Encrypt will send notifications about the expiration of the certificate and press the “Enter” button.

image.png

 

Specify the database name for the Bitwarden instance and press the “Enter” button.

image.png

 

Specify the “Installation Id” obtained earlier and press the “Enter” button.

image.png

 

We indicate the “Installation Key” obtained earlier and press the “Enter” button.

image.png

 

Bitwarden installed successfully.

Now let’s start Bitwarden using the command:

sudo ./bitwarden.sh start

image.png

 

Bitwarden launched successfully.

image.png

 

To access the Bitwarden control panel, you need to go from the workstation to the link https://subdomain.domain.com, where subdomain.domain.com is the name of your server. Accordingly, you need to specify the name of your server with Bitwarden installed.

Next, you need to register to start using the Bitwarden dashboard.

image.png

 

At this point your Bitwarden installation is complete.

 

 

How to setup the SMTP Server in BitWarden

Problem

How to setup a Mail Relay in BitWarden?
How to setup the SMTP Server in BitWarden?

Solution

Follow the guide below to configure BitWarden to use outMail as a Internet Mail Relay.

This article assumes you are running a self-hosted version of BitWarden and that you have already installed it and its working.

In order for BitWarden to send emails via outMail you need to change the SMTP Server settings.  This can be achieved by editing the global override environment variables.

 

Edit the file called bwdata/env/global.override.env and change the following lines

[email protected]
globalSettings__mail__smtp__host=smtpgmail.com
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=false
[email protected]
globalSettings__mail__smtp__password=gmail password (This is the gmail app password you created) 

While in the file it's best to configure the following:

globalSettings__disableUserRegistration=true (if you don't want people to register for an account).

[email protected] to access the admin console via https://subdomain.domain.com/admin

 

Once settings have been made restart bitward.

 sudo ./bitwarden.sh restart

 

For more information on the BitWarden global vars please see the documentation - bitwarden.com/help/article/environment-variables

 

 

 

image.png

Link to comment
Share on other sites

  • brent changed the title to Self host: How to install Bitwarden password manager on Ubuntu 22.04

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...