The best way to deploy the Bitwarden self-hosted server with Docker

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

Picture: STOATPHOTO/Adobe Inventory

Bitwarden is among the greatest open-source password managers available on the market. I would even go as far as to say it’s one of the best password supervisor interval. One of many many the explanation why that is so is due to the device’s flexibility, and an ideal illustration of that’s the skill to deploy your very personal Bitwarden server utilizing Docker.

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

Why would you need to deploy your individual Bitwarden server? You may need extremely delicate data that you simply solely entrust to your inside groups. If that’s the case, why fear that knowledge might be saved on a third-party host?

What you’ll must deploy a Bitwarden server

I’ll be demonstrating on an occasion of Ubuntu Server 22.04, however you’ll be able to deploy the Bitwarden vault server on any platform that helps Docker.

The best way to set up Docker

The very first thing we’ll do is set up the newest launch of Docker. First, add the GPG key with the command:

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

Subsequent, add the repository:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) secure" | sudo tee /and so on/apt/sources.listing.d/docker.listing > /dev/null

Set up the required dependencies with the command:

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

Lastly, we are able to set up the newest model of the Docker engine:

sudo apt-get replace
sudo apt-get set up docker-ce docker-ce-cli -y

Be certain that your consumer is a member of the docker group with the command:

sudo usermod -aG docker $USER

Log off and log again in for the modifications to take impact.

The best way to deploy the Bitwarden server

Earlier than we set up, let’s create a brand new consumer with the command:

sudo add consumer bitwarden

Subsequent, create a brand new listing with;

sudo mkdir /choose/bitwarden

Set the permissions and possession of the brand new listing with:

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

Fortunately, the builders of Bitwarden have created a helpful set up script, which you’ll obtain with the command:

curl -Lso && chmod 700

As soon as the file has been downloaded, launch it with:

./ set up

Reply the required questions — akin to area and SSL particulars — and the script will then begin flattening the required Docker photos. In the course of the set up, you’ll be requested in your set up ID and key. You may entry these keys from the Bitwarden host web page, the place you’ll be requested to enter an electronic mail deal with.

When that command completes, begin the server with:

./bitwarden begin

When the beginning command completes, it’s best to be capable to open a browser and level it to https://SERVER, the place SERVER is the IP deal with or area of the internet hosting server. You need to see the login immediate (Determine A), the place you’ll be able to create a brand new account.

Determine A

The Bitwarden server login immediate.

Earlier than you create your account, you’ll must first configure SMTP.

The best way to configure SMTP for Bitwarden

Earlier than you try to create a brand new account on the server, you’ll must configure SMTP settings, in any other case, you can not verify your new account. To do that, open the setting variables file with the command:

nano ~/bwdata/env/international.override.env

In that file, search for (and configure) the next strains:

  • globalSettings__mail__replyToEmail= - the reply-to deal with
  • 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 shut the file. When you’ve made modifications, challenge the command:

./ rebuild

As soon as every little thing has been rebuilt, head again to the login web page, create your account and also you’re good to go.

Congratulations, you’ve simply deployed your very personal Bitwarden server. Now you can retailer all that staff safety data with out internet hosting it on a third-party platform.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise execs from Jack Wallen.

You May Also Like

Leave a Reply

Your email address will not be published.