Installing on-premise Bitwarden on Ubuntu 22.04 (2024)

In this guide, we will be going through local installation of Bitwarden, that means this password manager is within your local network, and not in the cloud. This guide also won’t cover any type of connecting your password manager to the internet – have that in mind.

Ok, let’s start with basic stuff – all of the data I’m going to talk about here can be found – https://bitwarden.com/help/install-on-premise-linux/

This is going to be completely local installation without internet access – however, I will be using public certificate I have for a specially bought domain only for my internal network and I will use PiHole as local DNS server.

(HUGE) DOWNSIDE OF THIS APPROACH – if you have Bitwarden only in local network, it won’t be available to you always. It will work on your mobile devices, but in write mode (adding, modifying items in vault) only when your are connected to local network. When you are outside in the world, you will only be able to read your Bitwarden entries, there will be no option to edit current or add new items to your vault.

So, continue only if something like this is acceptable for your use case.

Also, have in mind – you are responsible for your installation and Bitwarden – I would suggest that the machine on which Bitwarden is installed is encrypted and well maintained – completely offline if not used.

I also cannot be responsible for any kind of damage that is done by following this guide – loss of data, health, or any other issues possible.

Minimum requirements for this installation are x64 1.4Ghz CPU, 2GB of RAM, 12GB of disk space…

I will be using Ubuntu Server 22.04.3 LTS for this guide.

First, during setup of the VM or host on which you will host Bitwarden containers, extremely smart would be that the machine is encrypted. So, during setup – encrypt your drive.

I’m doing this on Hyper-V, so be aware that maybe in some cases this machine won’t boot automatically – you will need to enter decryption password on boot.

Updates

First step would be to do

sudo apt updatesudo apt upgrade

Firewall

When everything is up to date, we will add two rules to our firewall (if you plan to access machine via SSH three rules). For SSH hardening please have a look here – https://www.informaticar.net/security-hardening-ubuntu-20-04/

You should also allow port 25 or 587 depending on what port your email is.

sudo ufw allow 80sudo ufw allow 443sudo ufw allow 22sudo ufw allow 25sudo ufw enable

Set fixed IP for your Bitwarden machine

Please change below values to your local network.

Addresses – 192.168.44.202 is address of our Linux machine which will host Bitwarden

Gateway – 192.168.44.1 – gateway for my local network

DNS – 192.168.44.10 – address of my local DNS server.

sudo nano /etc/netplan/01-network-manager-all.yamlnetwork: version: 2 renderer: networkd ethernets: ens18: dhcp4: no addresses: [192.168.44.202/24] gateway4: 192.168.44.1 nameservers: addresses: [192.168.44.10]

Reboot server after these changes.

Set hostname for your Bitwarden VM

Check you machine hostname by typing in:

hostname
sudo hostnamectl set-hostname machinename.your.domainIt would be nice to reboot the machine after all the changessudo reboot

In my case machinename.your.domain is bitwardentest1.informaticar.net

Certificate – for this guide I will be using my informaticar.net public certificate. What I found working best is to buy completely new domain and use it only for your local network. That way, you won’t have to mess with local PKI infrastructure which can be complex for a one man band and local network with home services. Also, self-signed certificates are the option, but if you wish to use Bitwarden on your mobile devices, this can be the issue. It will work, but I find this very hard. You can go with Let’s encrypt, and if you use your own certificate, make sure it is wildcard one!

I’ll be using following – bitwardentest1.informaticar.net – again, buy separate domain, and use it only locally, within your home network.

bitwarden.yourdomain.local

Local DNS – for your home network you’ll need local DNS. I’m long overdue on writing on PiHole, and I will make that soon right. We will need local DNS, to point IP address to the bitwarden by name – that way our certificate will work the way it should and we’ll get no errors.

So, in my case, address 192.168.244.202 will be pointed to bitwardentest1.informaticar.net

Email for sending notifications – You can use gmail or some other mail provider, in recent years I use more and more transactional services like Brevo or Postmark for generic emails. It all depends or how critical or confidential service is. Bitwarden won’t work correctly without ability to send emails.

I will be using Postmark for this guide. It has 100 emails per month in free tier, which is more than enough for what I need here.

First we need to install Docker Engine & Compose. First we will go through Docker Engine.

You can always find actual Docker Install procedure for Ubuntu here – https://docs.docker.com/engine/install/ubuntu/

First we need to add Docker repo to apt

First we will resolve GPG part

sudo apt-get updatesudo apt-get install ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.asc

Then apt part

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get update

Don’t be alarmed by extra space in command, just copy it and execute

Let’s now install Docker. This command will install Docker Engine and Compose

 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

We will test it by running

sudo docker run hello-world

Docker generated message and then made an exit. We are done.

To check installed version run

docker versiondocker compose version

We will now add bitwarden user to system

sudo adduser bitwarden

Add extra long and hard password for that user, although first command will already make you add password for the user

sudo passwd bitwarden

We will now create Docker group, add bitwarden user to it, and create bitwarden directories and permissions on it. I will also add my user (zeljko) to docker group (sudo usermod -aG docker zeljko)

sudo groupadd dockersudo usermod -aG docker bitwardensudo mkdir /opt/bitwardensudo chmod -R 700 /opt/bitwardensudo chown -R bitwarden:bitwarden /opt/bitwarden

Reboot server

Now, since I also added my local user (zeljko) into Docker group, in theory if I run now Docker without sudo, it should work.

 docker run hello-world

It works! Great, we can go to the next step.

We already set DNS record for our Bitwarden,

I already have SSL certificate at hand, and you should have it also ready. You can find more on certificates on Bitwarden here – you can go with some other option – https://bitwarden.com/help/certificates/

For our use case, we have create certificate with three parts, private key (.key), public key (.crt) and CA key from certificate authority (.crt). I usually buy certs from Sectigo, and they send you CA bundle. It is important that certificates are ok, otherwise you will get errors. Below you can read more about this scenario. Private key should be without password.

But, we need to do one more thing – request installation ID using valid email. We will do it here – https://bitwarden.com/host/

Enter email, select your region and press Submit

Copy you installation ID and Key to safe place

Ok, let’s start – we will now download installer script.

curl -Lso bitwarden.sh "https://func.bitwarden.com/api/dl/?app=self-host&platform=linux" && chmod 700 bitwarden.sh

And we will start the installer by running

./bitwarden.sh install

You will be asked for domain name for your instance, I will use bitwarden1.informaticar.net I defined at the beginning.

I don’t want Let’s Encrypt certificates, but you can go with that if you wish. I will enter database name as WardenVault

After some containers are pulled, you’ll have to enter Installation ID and Installation Key taht we got earlier from BitWarden site. And then Enter your region.

In the end, I will confirm with Y that I have a certificate to use, and that it is trusted SSL certificate, which means I need ca.crt also. Now, we WON’T START BITWARDEN UNTIL WE IMPORT CERTIFICATES!!

Certificates

You .key certificate should be named private.key . Public part should be named certificate.crt and CA key from your certificate authority should be named ca.crt. So make sure you rename your certificates

private.key

certificate.crt

ca.crt

Now, all three certificates should be copied to ./bwdata/ssl/yourdomainname

In my case I will copy all to ./bwdata/ssl/bitwardentest1.informaticar.net

SMTP settings

We won’t start our installation just yet, we will also define email settings, that will be needed

sudo nano ./bwdata/env/global.override.env

Unfortunately, there is no universal setup here, so check settings of your email provider and enter them here. Save when you are done.

Start

We will finally run start command

./bitwarden.sh start

It will take some time…

After some time you will get following if everything is ok

And if I run https://bitwardentest1.informaticar.net in web browser…

Success!! And without error

I will immediately also test account registration and SMTP by clicking on Create account

I got registration email!!!

I was able to login

I had to verify email, and that also worked perfectly

I was also able to log in to Bitwarden app on mobile device and connect to the vault and create new item. Important thing is that this will only work when you are in local network.

It is already mentioned above in the screenshot, run in order listed below

./bitwarden.sh updateself./bitwarden.sh update

This is already too long, we now learned to install and make simple configuration of Bitwarden. If there is enough interest, I will make a few more guides on the topic.

Disclaimer

Installing on-premise Bitwarden on Ubuntu 22.04 (2024)

FAQs

Installing on-premise Bitwarden on Ubuntu 22.04? ›

Start a self-hosted organization

Self-hosted Bitwarden organizations will be able to utilize all paid features provided by their chosen plan. Only Families and Enterprise organizations can be imported to self-hosted servers. Learn more here.

How to install Bitwarden on premise? ›

TL;DR
  1. Configure your domain. ...
  2. Install and setup Docker Desktop on your machine.
  3. Create a Bitwarden user & directory from which to complete the installation.
  4. Install Bitwarden on your machine.
  5. Configure your environment by adjusting settings in \bwdata\env\global. ...
  6. Start your instance.

How to install Bitwarden on terminal? ›

If you opt to go the binary route installation, it can be accomplished with these steps:
  1. Download the zipped file from the Bitwarden download page.
  2. Install unzip with sudo apt-get install unzip -y.
  3. Unzip the downloaded file with unzip bw-linux-X. ...
  4. Give the binary executable permissions with chmod u+x bw.
Sep 20, 2022

How to install Bitwarden offline? ›

Installing Bitwarden offline
  1. Transfer the downloaded files to the offline machine and place them in the same directory.
  2. Run the installer (for example, Bitwarden-Installer-1.32. 1.exe ). If the required asset bundle is in the same directory, Bitwarden will be installed without requiring internet access.

Can you self host Bitwarden? ›

Start a self-hosted organization

Self-hosted Bitwarden organizations will be able to utilize all paid features provided by their chosen plan. Only Families and Enterprise organizations can be imported to self-hosted servers. Learn more here.

Does Bitwarden require Docker? ›

Bitwarden can be run with any Docker edition or plan. Evaluate which edition is best for your installation. Deployment of containers is orchestrated using Docker Compose. Docker Compose is automatically installed as a plugin when you download Docker Engine.

Is Passbolt better than Bitwarden? ›

Passbolt facilitates granular and scalable password collaboration among team members due to its state-of-the-art architecture. Conversely, Bitwarden needs to work around a legacy monolithic architecture which imposes trade-offs on security and flexibility.

Is Bitwarden better than 1Password? ›

Determining if 1Password is better than Bitwarden depends on your specific needs. 1Password is better if you need an easy-to-use option with monitoring, large document storage limits and travel capabilities. Bitwarden is better if you're looking for an open-source option with free and lower-priced tiers.

Is the Bitwarden flatpak safe? ›

Bitwarden is the easiest and safest way to store all of your logins and passwords while conveniently keeping them synced between all of your devices.

Is Bitwarden cloud based? ›

Bitwarden processes and stores all vault data securely in the Microsoft Azure Cloud in the US or EU using services that are managed by the team at Microsoft. Since Bitwarden only uses service offerings provided by Azure, there is no server infrastructure to manage and maintain.

How to install Bitwarden in Ubuntu? ›

How to Install Bitwarden on Ubuntu 22.04
  1. Update the System.
  2. Install Docker CE.
  3. Install Docker Compose.
  4. Install Bitwarden on Ubuntu.
  5. Finish Bitwarden Installation.
Feb 21, 2024

Does Bitwarden work on Linux? ›

Desktop Applications

Access Bitwarden on Windows, macOS, and Linux desktops with native applications.

Is Bitwarden stored locally? ›

Bitwarden stores encrypted versions of your passwords that only you can unlock. Your sensitive information is encrypted locally on your personal device before ever being sent to our cloud servers.

Is Bitwarden on Prem free? ›

Self-hosting Bitwarden is free, however some features must be unlocked in your self-hosted instance with a registered license file. A license file can be obtained from the Bitwarden-hosted web app by either an account with a premium individual subscription or by the owner of an organization.

What is the drawback of Bitwarden? ›

Yet, Bitwarden's auto-filling feature is not the best solution a password manager can offer. There's no one-click filling option, as you have to access everything through the browser extension. Additionally, desktop apps aren't as convenient as web applications as they don't offer as many features.

What's better than Bitwarden? ›

In terms of security, while both earned full marks for robust security, I like that NordPass takes things one step above AES 256-bit encryption by using XChaCha20. It also offers better breach monitoring than Bitwarden.

Does Bitwarden have a desktop client? ›

The Bitwarden desktop app brings a full vault experience straight out of your browser and into your desktop. The desktop app supports up to five logged-in accounts at a time, making it easy to switch between personal and work accounts at any moment (learn more).

How to set up Bitwarden? ›

Bitwarden Learning
  1. Create an Account. Use your email (ex. ...
  2. Create your Master Password. On the create your account screen, you will be prompted to set up a Master Password which you will use to access your vault. ...
  3. Get to know your vault. ...
  4. Install the browser extension. ...
  5. Import your passwords. ...
  6. Start creating new items.

How do I get Bitwarden to autofill on my computer? ›

Inline auto-fill menu
  1. Log in and unlock the Bitwarden browser extension.
  2. Select  Settings → Auto-fill, then locate the Show auto-fill menu on form fields dropdown. Select your preferred auto-fill menu behavior.
  3. Next, we recommend you disable your browser's autofill option.

References

Top Articles
UFC Vegas 75 start time, full fight details | Vettori vs. Cannonier
Fantasy Football Veteran Quarterback Fallers - Post-NFL Draft 2024
Dragon Age Inquisition War Table Operations and Missions Guide
Farepay Login
Academic Integrity
Paula Deen Italian Cream Cake
Music Archives | Hotel Grand Bach - Hotel GrandBach
What's New on Hulu in October 2023
What Was D-Day Weegy
Florida (FL) Powerball - Winning Numbers & Results
Miami Valley Hospital Central Scheduling
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Keniakoop
Craigslist Alabama Montgomery
Wildflower1967
Bjork & Zhulkie Funeral Home Obituaries
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Skyward Login Jennings County
Uktulut Pier Ritual Site
Roll Out Gutter Extensions Lowe's
How pharmacies can help
Scripchat Gratis
15 Primewire Alternatives for Viewing Free Streams (2024)
What Equals 16
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Dr. Nicole Arcy Dvm Married To Husband
No Limit Telegram Channel
Helpers Needed At Once Bug Fables
Redding Activity Partners
Pnc Bank Routing Number Cincinnati
Texters Wish You Were Here
Pitco Foods San Leandro
Workday Latech Edu
Darrell Waltrip Off Road Center
Grapes And Hops Festival Jamestown Ny
دانلود سریال خاندان اژدها دیجی موویز
Dmitri Wartranslated
Albertville Memorial Funeral Home Obituaries
Verizon Outage Cuyahoga Falls Ohio
Arigreyfr
LoL Lore: Die Story von Caitlyn, dem Sheriff von Piltover
What Is The Optavia Diet—And How Does It Work?
Honkai Star Rail Aha Stuffed Toy
Booknet.com Contract Marriage 2
Aurora Southeast Recreation Center And Fieldhouse Reviews
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Canonnier Beachcomber Golf Resort & Spa (Pointe aux Canonniers): Alle Infos zum Hotel
Wood River, IL Homes for Sale & Real Estate
Upcoming Live Online Auctions - Online Hunting Auctions
Jeep Forum Cj
David Turner Evangelist Net Worth
Latest Posts
Article information

Author: Errol Quitzon

Last Updated:

Views: 6082

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Errol Quitzon

Birthday: 1993-04-02

Address: 70604 Haley Lane, Port Weldonside, TN 99233-0942

Phone: +9665282866296

Job: Product Retail Agent

Hobby: Computer programming, Horseback riding, Hooping, Dance, Ice skating, Backpacking, Rafting

Introduction: My name is Errol Quitzon, I am a fair, cute, fancy, clean, attractive, sparkling, kind person who loves writing and wants to share my knowledge and understanding with you.