Docker deploy a Bitwarden server


In this tutorial, How to deploy an in-house password manager server.

Bitwarden is an integrated open source password management solution for individuals, teams, and business organizations.

Install Docker on Ubuntu

sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-compose

Obtain Bitwarden’s Installation key and ID

you via Bitwarden page get key and ID as the picture below

The display picture as below as below

Docker deploy a Bitwarden
Docker deploy a Bitwarden

Create the Bitwarden user

sudo mkdir /opt/bituser
sudo adduser bituser
sudo chmod -R 700 /opt/bituser
sudo chown -R bituser:bituser /opt/bituser
sudo usermod -aG docker bituser

Change to the Bitwarden user with the command below

su bituser

Download the script and deploy Bitwarden

Download the script with the command below

curl -Lso && chmod 700

Bitwarden use on port 80, If you start apache/Nginx then stop it.

sudo systemctl stop apache2
# Redhat
sudo systemctl stop httpd
# Stop Nginx
sudo systemctl stop nginx

Installer Bitwarden

./ install

The output terminal as below

Docker deploy a Bitwarden

Finally, we need to configure the SMTP server that Bitwarden will use it.

After installing Bitwarden, open the configuration file with:

nano /home/bituser/bwdata/env/global.override.env

You will replace every REPLACE with your SMTP Server.

adminSettings__admins= ADMIN_EMAIL

Start the Bitwarden server.

./ start

Access your Bitwarden server

Open a web browser and point it to https://SERVER

The display picture as below as below

Docker deploy a Bitwarden

Note: Create a new account to login into Bitwarden


You have to deploy a Bitwarden server. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.