How to deploy a Bitwarden server with Docker

Are you seeking to deploy an in-house password supervisor server? Jack Wallen exhibits you the way with Bitwarden and Docker.

security.jpg

Picture: BeeBright/Shutterstock

Bitwarden is one in every of my favourite password managers. However should you’re significantly involved about safety and would relatively not save your password database on a third-party server, you may wish to take into account deploying your personal Bitwarden server.

That may sound like a critical problem however, because of Docker, it is really fairly easy. I will present you methods to just do that.

SEE: Password breach: Why popular culture and passwords do not combine (free PDF) (TechRepublic)

What you may want

The one belongings you’ll must make this occur are a server that helps Docker and a person with sudo privileges. I will be demonstrating on Ubuntu Server 20.04.

Prepared? Okay.

Easy methods to set up Docker

On the off likelihood you do not have Docker put in, let’s accomplish that now. We’ll be utilizing Docker Compose, so there’s extra to the set up than ordinary. 

First, set up the mandatory dependencies with:

sudo apt set up apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

Subsequent, add the Docker GPG key with:

curl -fsSL https://obtain.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Be aware: The above methodology of including a key’s deprecated however nonetheless works.

Add the proper repository:

sudo add-apt-repository "deb [arch=amd64] https://obtain.docker.com/linux/ubuntu $(lsb_release -cs) steady"

Replace apt and set up with the next:

sudo apt replace
sudo apt set up docker-ce docker-ce-cli containerd.io docker-compose

Easy methods to create the Bitwarden person

To be protected, we’ll run all of this with a selected person. First, we’ll create a listing for the person with:

sudo mkdir /choose/bitwarden

Create the person with:

sudo adduser bitwarden

Give the newly created listing the right permission and possession with:

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

Add the bitwarden person to the docker group with:

sudo usermod -aG docker bitwarden

Change to the bitwarden person with:

su bitwarden

Easy methods to obtain the installer script and deploy Bitwarden

Obtain the helpful installer script with:

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

Earlier than we run the installer script, be sure you haven’t got an online server already operating (as a result of Bitwarden goes to run on port 80 and it will not begin if that port is already taken). Kill Apache with:

sudo systemctl cease apache2

If this can be a Crimson Hat-based machine, that command can be:

sudo systemctl cease httpd

When you’re utilizing NGINX, cease it with the command:

sudo systemctl cease nginx

Run the installer with:

./bitwarden.sh set up

You can be requested for an FQDN. When you do not plan on accessing Bitwarden from outdoors your LAN, you may at all times simply use an IP tackle for that.

This may take a while for all the containers to tug and deploy.

Subsequent, we have to configure the SMTP server that Bitwarden will use. After the deployment completes, open the configuration file with:

nano ~/bwdata/env/world.override.env

In that file, seek for and configure the next sections, utilizing an obtainable SMTP server (I used Google’s):

globalSettings__mail__smtp__host=REPLACE
globalSettings__mail__smtp__port=REPLACE
globalSettings__mail__smtp__ssl=REPLACE
globalSettings__mail__smtp__username=REPLACE
globalSettings__mail__smtp__password=REPLACE
adminSettings__admins= ADMIN_EMAIL

Be certain that to interchange each occasion of REPLACE together with your SMTP server settings and ADMIN_EMAIL with an e mail tackle for the admin person. Save and shut the file. 

Lastly, begin the Bitwarden server with:

./bitwarden.sh begin

Easy methods to entry your Bitwarden server

Open an online browser and level it to https://SERVER (the place SERVER is the IP tackle or area of the machine internet hosting your Bitwarden server). You need to be offered with the Bitwarden internet UI (Determine A).

Determine A

bitwardenservera.jpg

The Bitwarden internet UI is a simple-to-use password supervisor.

Click on Create Account to create your Bitwarden account. As soon as you’ve got created it, log in with the credentials and you can begin utilizing your Bitwarden server to deal with your passwords … all of which is able to stay by yourself {hardware}.

Additionally see

Recent Articles

spot_img

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox