{"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<p>In this tutorial, you will learn how to install Bitwarden password manager on Ubuntu 20.04. <a href=\"https:\/\/bitwarden.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bitwarden<\/a> is an <em>&#8220;open-source password manager which provides an easiest and safest way for individuals to store, share and secure sensitive data&#8221;<\/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<h2 class=\"wp-block-heading\" id=\"install-bitwarden-password-manager-on-ubuntu-20-04\">Installing Bitwarden Password Manager on Ubuntu<\/h2>\n\n\n\n<p>In order to install Bitwarden on Ubuntu 20.04;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bitwarden-minimum-system-requirements\"><a href=\"#bitwarden-minimum-system-requirements\">Minimum System Requirements<\/a><\/h3>\n\n\n\n<p>Before you can install Bitwarden password manager, below are the minimum recommended system requirements that your system should meet;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Processor: x64, 2 GHz dual core<\/li>\n\n\n\n<li>Memory: 4 GB RAM (system memory)<\/li>\n\n\n\n<li>Storage: 25 GB<\/li>\n\n\n\n<li>Docker: Engine 19+ and Compose 1.24+<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"run-system-update\"><a href=\"#run-system-update\">Run System Update<\/a><\/h3>\n\n\n\n<p>Ensure that your system package cache is up-to-date.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"system-hostname\"><a href=\"#system-hostname\">Set System Domain Name<\/a><\/h3>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>hostnamectl set-hostname bitwarden.kifarunix-demo.com<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-docker-n-docker-compose-ubuntu-20.04\"><a href=\"#install-docker-n-docker-compose-ubuntu-20.04\">Install Docker and Docker Compose on Ubuntu 20.04<\/a><\/h3>\n\n\n\n<p>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<p><a href=\"https:\/\/kifarunix.com\/install-docker-ce-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Docker CE on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/deploy-a-single-node-elastic-stack-cluster-on-docker-containers\/#install-docker-compose\" target=\"_blank\" rel=\"noreferrer noopener\">Install Docker Compose on Ubuntu 20.04<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-bitwarden-ubuntu-20.04\"><a href=\"#install-bitwarden-ubuntu-20.04\">Installing Bitwarden Password Manager<\/a><\/h3>\n\n\n\n<p>Once the above procedures are done, you can now install Bitwarden password manager.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"obtain-bitwarden-hosting-installation-id-and-key\"><a href=\"#bitwarden-install-id-n-key\">Obtain Bitwarden Hosting Installation ID and Key<\/a><\/h4>\n\n\n\n<p id=\"bitwarden-install-id-n-key\">Navigate to <a href=\"https:\/\/bitwarden.com\/host\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bitwarden hosting page<\/a> and provide your email ID to get the hosting installation ID and key.<\/p>\n\n\n\n<p>Once you enter your email ID, click submit. Such a page is loaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1464\" height=\"358\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden_install_host_id_key.png\" alt=\"\" class=\"wp-image-6947\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden_install_host_id_key.png 1464w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden_install_host_id_key-768x188.png 768w\" sizes=\"(max-width: 1464px) 100vw, 1464px\" \/><\/figure>\n\n\n\n<p>Keep the installation ID and Key as we will need it later in the installation.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"download-bitwarden-install-script\"><a href=\"#download-bitwarden-install-script\">Download Bitwarden Installation Script<\/a><\/h4>\n\n\n\n<p>Run the command below to download the Bitwarden installation script.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install curl<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -Lso bitwarden.sh https:\/\/go.btwrdn.co\/bw-sh<\/code><\/pre>\n\n\n\n<p>Make the script executable;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chmod +x bitwarden.sh<\/code><\/pre>\n\n\n\n<p>Next, install Bitwarden password manager;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>.\/bitwarden.sh install<\/code><\/pre>\n\n\n\n<p>Enter your system hostname;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code> _     _ _                         _            \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<p>Choose whether you want to use Let&#8217;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<pre class=\"wp-block-code\"><code>(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y\/n): n<\/code><\/pre>\n\n\n\n<p>The script will then proceed to pull Bitwarden containers.<\/p>\n\n\n\n<p>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<pre class=\"scroll-box\"><code>...\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): <strong>23b..............................2fb40d<\/strong>\n\n(!) Enter your installation key: <strong>6trsD........................g85<\/strong>\n<\/code><\/pre>\n\n\n\n<p>Next, if you have an SSL certificate, say <strong>yes<\/strong> otherwise, say no and generate self signed one;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\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<p>The self signed SSL cert is generated with such a warning;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code><strong>!!!!!!!!!! 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<p>And the installation of Bitwarden on Ubuntu 20.04 is now done;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>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<h3 class=\"wp-block-heading\" id=\"starting-bitwarden-containers\"><a href=\"#starting-bitwarden-containers\">Running Bitwarden Password Manager<\/a><\/h3>\n\n\n\n<p>You can now start Bitwarden Docker containers;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>.\/bitwarden.sh start<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\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<p>You can now check Bitwarden containers;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>docker ps<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-bitwarden-web-interface\">Accessing Bitwarden Web Interface<\/h3>\n\n\n\n<p>The installation of Bitwarden is now complete. You can access the web interface using the <code><strong>https:\/\/bitwarden-server-fqdn<\/strong><\/code>. Replace the <strong><code>bitwarden-server-fqdn<\/code><\/strong> with your system fully qualified domain name.<\/p>\n\n\n\n<p>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<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"997\" height=\"729\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-login.png\" alt=\"\" class=\"wp-image-6941\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-login.png?v=1600118941 997w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-login-768x562.png?v=1600118941 768w\" sizes=\"(max-width: 997px) 100vw, 997px\" \/><\/figure><\/div>\n\n\n<p>Create a new account to access your Bitwarden secure vault by clicking <strong>Create Account<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"933\" height=\"864\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/create-accnt.png\" alt=\"\" class=\"wp-image-6949\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/create-accnt.png?v=1600119669 933w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/create-accnt-768x711.png?v=1600119669 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/figure><\/div>\n\n\n<p>Once you have created an account, login to your Bitwarden vault.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1269\" height=\"751\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-interface-1.png\" alt=\"\" class=\"wp-image-6944\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-interface-1.png?v=1600119210 1269w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-interface-1-768x455.png?v=1600119210 768w\" sizes=\"(max-width: 1269px) 100vw, 1269px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"verify-self-hosted-bitwarden-mail\"><a href=\"#verify-self-hosted-bitwarden-mail\">Verifying Self-hosted Bitwarden Email<\/a><\/h3>\n\n\n\n<p>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<p><a href=\"https:\/\/kifarunix.com\/configure-postfix-to-use-gmail-smtp-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure Postfix to Use Gmail SMTP on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>ip add | grep 172.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>    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<p>Then, edit postfix main conf and add the Bitwarden docker container networks to mynetworks variable.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/postfix\/main.cf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\nmydestination = $myhostname, bitwarden.kifarunix-demo.com, localhost.kifarunix-demo.com, , localhost\nrelayhost = [smtp.gmail.com]:587\n<strong>mynetworks = 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<p>Restart postfix;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart postfix<\/code><\/pre>\n\n\n\n<p>Next, configure Postfix SMTP mail server IP address and Port settings by editing the environment settings file, <code><strong>.\/bwdata\/env\/global.override.env<\/strong><\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim .\/bwdata\/env\/global.override.env<\/code><\/pre>\n\n\n\n<p>In our setup, we are using Postfix on the localhost, hence only the lines, highlighted we used.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\nglobalSettings__mail__replyToEmail=no-reply@bitwarden.kifarunix-demo.com\n<strong>globalSettings__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<p>Save and exit the file.<\/p>\n\n\n\n<p>You should now be able to sent the verification mail.<\/p>\n\n\n\n<p>Check your inbox and do the account verification.<\/p>\n\n\n\n<p>Once you have verified the email, the verify email notification on the dashboard should now be gone.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1260\" height=\"701\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-verified.png\" alt=\"\" class=\"wp-image-6943\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-verified.png?v=1600119161 1260w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/09\/bitwarden-verified-768x427.png?v=1600119161 768w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/figure>\n\n\n\n<p>You can now safely store your passwords in your safe vault. Enjoy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reference\">Reference<\/h3>\n\n\n\n<p><a href=\"https:\/\/bitwarden.com\/help\/article\/install-on-premise\/#tldr\" target=\"_blank\" rel=\"noreferrer noopener\">Installing and Deploying Bitwarden<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-setup-passbolt-password-manager-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Setup Passbolt Password Manager on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-openldap-password-expiry-email-notification\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure OpenLDAP Password Expiry Email Notification<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-syspass-password-manager-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install sysPass Password Manager on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/import-saved-passwords-from-firefox-to-chrome-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Import Saved Passwords From Firefox to Chrome on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/disable-ssh-password-login-for-specific-users-in-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Disable SSH Password Login for Specific Users in Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to install Bitwarden password manager on Ubuntu 20.04. Bitwarden is an &#8220;open-source password manager which provides an easiest<\/p>\n","protected":false},"author":1,"featured_media":11580,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,339],"tags":[2065,2067,2068,2064,2063,341,2066,1200],"class_list":["post-6931","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-password-managers","tag-bitwarden","tag-bitwarden-gmail-smtp","tag-bitwarden-postfix","tag-bitwarden-ubuntu-install","tag-install-bitwarden-ubuntu","tag-password-manager","tag-setup-bitwarden-docker-container","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6931"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=6931"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6931\/revisions"}],"predecessor-version":[{"id":21513,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6931\/revisions\/21513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11580"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=6931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=6931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=6931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}