{"id":6931,"date":"2020-09-15T00:48:20","date_gmt":"2020-09-14T21:48:20","guid":{"rendered":"https:\/\/kifarunix.com\/?p=6931"},"modified":"2024-03-14T22:57:29","modified_gmt":"2024-03-14T19:57:29","slug":"install-bitwarden-password-manager-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-bitwarden-password-manager-on-ubuntu-20-04\/","title":{"rendered":"Install Bitwarden Password Manager on Ubuntu 20.04"},"content":{"rendered":"\n
In this tutorial, you will learn how to install Bitwarden password manager on Ubuntu 20.04. Bitwarden<\/a> is an “open-source password manager which provides an easiest and safest way for individuals to store, share and secure sensitive data”<\/em>. Bitwarden is available for individual and organizational use in both free and paid plans. In this tutorial, we will be learning how to install and setup free version of Bitwarden on Ubuntu 20.04 for individual use.<\/p>\n\n\n\n In order to install Bitwarden on Ubuntu 20.04;<\/p>\n\n\n\n Before you can install Bitwarden password manager, below are the minimum recommended system requirements that your system should meet;<\/p>\n\n\n\n Ensure that your system package cache is up-to-date.<\/p>\n\n\n\n Bitwarden requires a system domain name while being installed. Therefore, set your system FQDN as follows. Be sure to replace the domain accordingly.<\/p>\n\n\n\n Bitwarden is deployed using Docker containers through the use of Docker compose. In this tutorial, we are using the community Docker edition. Follow the links below to install both Docker and Docker compose on Ubuntu 20.04.<\/p>\n\n\n\n Install Docker CE on Ubuntu 20.04<\/a><\/p>\n\n\n\n Install Docker Compose on Ubuntu 20.04<\/a><\/p>\n\n\n\n Once the above procedures are done, you can now install Bitwarden password manager.<\/p>\n\n\n\n Navigate to Bitwarden hosting page<\/a> and provide your email ID to get the hosting installation ID and key.<\/p>\n\n\n\n Once you enter your email ID, click submit. Such a page is loaded.<\/p>\n\n\n\n Keep the installation ID and Key as we will need it later in the installation.<\/p>\n\n\n\n Run the command below to download the Bitwarden installation script.<\/p>\n\n\n\n Make the script executable;<\/p>\n\n\n\n Next, install Bitwarden password manager;<\/p>\n\n\n\n Enter your system hostname;<\/p>\n\n\n\n Choose whether you want to use Let’s Encrypt to generate a free SSL certificate. In our case, this is a local setup and hence, we chose no.<\/p>\n\n\n\n The script will then proceed to pull Bitwarden containers.<\/p>\n\n\n\n Once the container download is done, you are prompted to enter the hosting installation id and key you obtained from the Bitwarden hosting page.<\/p>\n\n\n\n Next, if you have an SSL certificate, say yes<\/strong> otherwise, say no and generate self signed one;<\/p>\n\n\n\n The self signed SSL cert is generated with such a warning;<\/p>\n\n\n\n And the installation of Bitwarden on Ubuntu 20.04 is now done;<\/p>\n\n\n\n You can now start Bitwarden Docker containers;<\/p>\n\n\n\n You can now check Bitwarden containers;<\/p>\n\n\n\n The installation of Bitwarden is now complete. You can access the web interface using the Ensure that from the workstation you are accessing Bitwarden from can resolve the Bitwarden hostname. Otherwise use the hosts file if you do not have DNS.<\/p>\n\n\n Create a new account to access your Bitwarden secure vault by clicking Create Account<\/strong>.<\/p>\n\n\n Once you have created an account, login to your Bitwarden vault.<\/p>\n\n\n\n In order to verify Self-hosted Bitwarden email, we are going to use local Postfix relay via Gmail SMTP. Therefore, install and configure Postfix to use Gmail SMTP relay by following the guide below;<\/p>\n\n\n\n Configure Postfix to Use Gmail SMTP on Ubuntu 20.04<\/a><\/p>\n\n\n\n Next, configure Postfix to allow Bitwarden docker containers to sent emails through it. How I did this, i just greped the docker IP addresses;<\/p>\n\n\n\n Then, edit postfix main conf and add the Bitwarden docker container networks to mynetworks variable.<\/p>\n\n\n\n Restart postfix;<\/p>\n\n\n\n Next, configure Postfix SMTP mail server IP address and Port settings by editing the environment settings file, In our setup, we are using Postfix on the localhost, hence only the lines, highlighted we used.<\/p>\n\n\n\n Save and exit the file.<\/p>\n\n\n\n You should now be able to sent the verification mail.<\/p>\n\n\n\n Check your inbox and do the account verification.<\/p>\n\n\n\n Once you have verified the email, the verify email notification on the dashboard should now be gone.<\/p>\n\n\n\n You can now safely store your passwords in your safe vault. Enjoy.<\/p>\n\n\n\n Installing and Deploying Bitwarden<\/a><\/p>\n\n\n\n Install and Setup Passbolt Password Manager on Ubuntu 20.04<\/a><\/p>\n\n\n\n Configure OpenLDAP Password Expiry Email Notification<\/a><\/p>\n\n\n\n Install sysPass Password Manager on Ubuntu 18.04<\/a><\/p>\n\n\n\n Import Saved Passwords From Firefox to Chrome on Ubuntu 18.04<\/a><\/p>\n\n\n\nInstalling Bitwarden Password Manager on Ubuntu<\/h2>\n\n\n\n
Minimum System Requirements<\/a><\/h3>\n\n\n\n
\n
Run System Update<\/a><\/h3>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
Set System Domain Name<\/a><\/h3>\n\n\n\n
hostnamectl set-hostname bitwarden.kifarunix-demo.com<\/code><\/pre>\n\n\n\n
Install Docker and Docker Compose on Ubuntu 20.04<\/a><\/h3>\n\n\n\n
Installing Bitwarden Password Manager<\/a><\/h3>\n\n\n\n
Obtain Bitwarden Hosting Installation ID and Key<\/a><\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Download Bitwarden Installation Script<\/a><\/h4>\n\n\n\n
apt install curl<\/code><\/pre>\n\n\n\n
curl -Lso bitwarden.sh https:\/\/go.btwrdn.co\/bw-sh<\/code><\/pre>\n\n\n\n
chmod +x bitwarden.sh<\/code><\/pre>\n\n\n\n
.\/bitwarden.sh install<\/code><\/pre>\n\n\n\n
_ _ _ _ \n| |__ (_) |___ ____ _ _ __ __| | ___ _ __ \n| '_ \\| | __\\ \\ \/\\ \/ \/ _` | '__\/ _` |\/ _ \\ '_ \\ \n| |_) | | |_ \\ V V \/ (_| | | | (_| | __\/ | | |\n|_.__\/|_|\\__| \\_\/\\_\/ \\__,_|_| \\__,_|\\___|_| |_|\n\nOpen source password management solutions\nCopyright 2015-2020, 8bit Solutions LLC\nhttps:\/\/bitwarden.com, https:\/\/github.com\/bitwarden\n\n===================================================\n\nDocker version 19.03.12, build 48a66213fe\ndocker-compose version 1.27.2, build 18f557f9\n\n(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): bitwarden.kifarunix-demo.com\n<\/code><\/pre>\n\n\n\n
(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y\/n): n<\/code><\/pre>\n\n\n\n
...\nDigest: sha256:d53aa2bc97c9bfdb5609cf9ec7cbee8cfedac536a7b101e039db2e0d733c60e0\nStatus: Downloaded newer image for bitwarden\/setup:1.37.0\ndocker.io\/bitwarden\/setup:1.37.0\n\n(!) Enter your installation id (get at https:\/\/bitwarden.com\/host): 23b..............................2fb40d<\/strong>\n\n(!) Enter your installation key: 6trsD........................g85<\/strong>\n<\/code><\/pre>\n\n\n\n
...\n(!) Do you have a SSL certificate to use? (y\/n): n\n\n(!) Do you want to generate a self-signed SSL certificate? (y\/n): y<\/code><\/pre>\n\n\n\n
!!!!!!!!!! WARNING !!!!!!!!!!\nYou are using an untrusted SSL certificate. This certificate will not be \ntrusted by Bitwarden client applications. You must add this certificate to \nthe trusted store on each device or else you will receive errors when trying \nto connect to your installation.<\/strong>\n<\/code><\/pre>\n\n\n\n
Building nginx config.\nBuilding docker environment files.\nBuilding docker environment override files.\nBuilding FIDO U2F app id.\nBuilding docker-compose.yml.\n\nInstallation complete\n\nIf you need to make additional configuration changes, you can modify\nthe settings in `.\/bwdata\/config.yml` and then run:\n`.\/bitwarden.sh rebuild` or `.\/bitwarden.sh update`\n\nNext steps, run:\n`.\/bitwarden.sh start`\n<\/code><\/pre>\n\n\n\n
Running Bitwarden Password Manager<\/a><\/h3>\n\n\n\n
.\/bitwarden.sh start<\/code><\/pre>\n\n\n\n
...\nCreating bitwarden-web ... done\nCreating bitwarden-icons ... done\nCreating bitwarden-events ... done\nCreating bitwarden-attachments ... done\nCreating bitwarden-api ... done\nCreating bitwarden-identity ... done\nCreating bitwarden-sso ... done\nCreating bitwarden-notifications ... done\nCreating bitwarden-mssql ... done\nCreating bitwarden-admin ... done\nCreating bitwarden-portal ... done\nCreating bitwarden-nginx ... done\n1.37.0: Pulling from bitwarden\/setup\nDigest: sha256:d53aa2bc97c9bfdb5609cf9ec7cbee8cfedac536a7b101e039db2e0d733c60e0\nStatus: Image is up to date for bitwarden\/setup:1.37.0\ndocker.io\/bitwarden\/setup:1.37.0\n\n\nBitwarden is up and running!\n===================================================\n\nvisit https:\/\/bitwarden.kifarunix-demo.com\nto update, run `.\/bitwarden.sh updateself` and then `.\/bitwarden.sh update`\n<\/code><\/pre>\n\n\n\n
docker ps<\/code><\/pre>\n\n\n\n
Accessing Bitwarden Web Interface<\/h3>\n\n\n\n
https:\/\/bitwarden-server-fqdn<\/strong><\/code>. Replace the
bitwarden-server-fqdn<\/code><\/strong> with your system fully qualified domain name.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\n
<\/figure>\n\n\n\n
Verifying Self-hosted Bitwarden Email<\/a><\/h3>\n\n\n\n
ip add | grep 172.<\/code><\/pre>\n\n\n\n
inet 172.17.0.1\/16 brd 172.17.255.255 scope global docker0\n inet 172.28.0.1\/16 brd 172.28.255.255 scope global br-a8c84f91fe15\n inet 172.29.0.1\/16 brd 172.29.255.255 scope global br-d5da6fd7075c<\/code><\/pre>\n\n\n\n
vim \/etc\/postfix\/main.cf<\/code><\/pre>\n\n\n\n
...\nmydestination = $myhostname, bitwarden.kifarunix-demo.com, localhost.kifarunix-demo.com, , localhost\nrelayhost = [smtp.gmail.com]:587\nmynetworks = 127.0.0.0\/8 172.17.0.0\/16 172.28.0.0\/16 172.29.0.0\/16 [::ffff:127.0.0.0]\/104 [::1]\/128\n<\/strong>mailbox_size_limit = 0\nrecipient_delimiter = +\n...\n<\/code><\/pre>\n\n\n\n
systemctl restart postfix<\/code><\/pre>\n\n\n\n
.\/bwdata\/env\/global.override.env<\/strong><\/code>.<\/p>\n\n\n\n
vim .\/bwdata\/env\/global.override.env<\/code><\/pre>\n\n\n\n
...\nglobalSettings__mail__replyToEmail=no-reply@bitwarden.kifarunix-demo.com\nglobalSettings__mail__smtp__host=192.168.57.3\nglobalSettings__mail__smtp__port=25<\/strong>\nglobalSettings__mail__smtp__ssl=false\nglobalSettings__mail__smtp__username=REPLACE\nglobalSettings__mail__smtp__password=REPLACE\n....\n<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n
Reference<\/h3>\n\n\n\n
Related Tutorials<\/h3>\n\n\n\n