How to release the Bitwarden self-hosted server with Docker


Jack Wallen walks you through the procedure of deploying a Bitwarden vault server with the assistance of Docker containers.

Password Management. Colorful wooden letters on cardboard Image: STOATPHOTO/Adobe Stock Bitwarden is among the best open-source password managers on the market. I may even go so far regarding say it’s the best password manager period. Among the many reasons why this is so is because of the tool’s flexibility, and an ideal illustration of that is the ability to deploy your very own Bitwarden server utilizing Docker.

SEE: Password breach: Why popular culture and passwords don’t blend (complimentary PDF) (TechRepublic)

Why would you want to release your own Bitwarden server? You might have incredibly delicate info that you only entrust to your internal groups. If that holds true, why concern that information will be saved on a third-party host?

What you’ll require to release a Bitwarden server

I’ll be demonstrating on an instance of Ubuntu Server 22.04, however you can deploy the Bitwarden vault server on any platform that supports Docker.

How to set up Docker

The very first thing we’ll do is set up the latest release of Docker. First, add the GPG secret with the command:

curl -fsSL|sudo gpg– dearmor -o/ usr/share/keyrings/ docker-archive-keyring. gpg

Open source: Must-read protection

Next, include the repository:

echo “deb [arch=amd64 signed-by=/ usr/share/keyrings/ docker-archive-keyring. gpg] $(lsb_release -cs) stable”|sudo tee/ etc/apt/sources. list.d/ docker.list >/ dev/null

Set up the necessary reliances with the command:

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y

Finally, we can install the latest variation of the Docker engine:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli -y

Make certain your user belongs to the docker group with the command:

sudo usermod -aG docker $USER

Log out and log back in for the modifications to work.

How to deploy the Bitwarden server

Before we install, let’s produce a brand-new user with the command:

sudo add user bitwarden

Next, produce a new directory site with;

sudo mkdir/ opt/bitwarden

Set the consents and ownership of the new directory site with:

sudo chmod -R 700/ opt/bitwarden
sudo chown -R bitwarden: bitwarden/ opt/bitwarden

The good news is, the designers of Bitwarden have actually created an useful setup script, which you can download with the command:

curl -Lso & & chmod 700

When the file has been downloaded, launch it with:

./ install

Answer the required questions– such as domain and SSL details– and the script will then start taking down the required Docker images. During the setup, you’ll be requested for your installation ID and key. You can access those keys from the Bitwarden host page, where you’ll be asked to get in an e-mail address.

When that command finishes, start the server with:

./ bitwarden start

When the start command completes, you should be able to open a web browser and point it to https://SERVER, where SERVER is the IP address or domain of the hosting server. You must see the login timely (Figure A), where you can create a brand-new account.

Figure A

The Bitwarden server login prompt. Prior to you produce your account, you’ll need to very first configure SMTP.

How to set up SMTP for Bitwarden

Before you try to create a new account on the server, you’ll need to configure SMTP settings, otherwise, you can not confirm your brand-new account. To do this, open the environment variables submit with the command:

nano ~/ bwdata/env/global. override.env

In that file, try to find (and configure) the following lines:

  • globalSettings __ mail __ replyToEmail= – the reply-to address
  • globalSettings __ mail __ smtp __ host= – your SMTP host
  • globalSettings __ mail __ smtp __ port= – your SMTP port
  • globalSettings __ mail __ smtp __ ssl= – true is for SSL false is for TLS
  • globalSettings __ mail __ smtp __ username= – username for the SMTP host
  • globalSettings __ mail __ smtp __ password= – password for SMTP host

Save and close the file. As soon as you have actually made changes, issue the command:

./ rebuild

As soon as everything has actually been reconstructed, head back to the login page, create your account and you’re good to go.

Congratulations, you’ve simply deployed your really own Bitwarden server. You can now keep all that team security details without hosting it on a third-party platform.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the current tech guidance for company pros from Jack Wallen.


Leave a Reply

Your email address will not be published. Required fields are marked *