Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (2024)

Introduction

This article will cover setting up your own self-hosted Bitwarden (Vaultwarden) instance with Docker and configuring ngnix to allow for public exposure for cross-device access to your vault.

What is Bitwarden?

Bitwarden is a free and open-source password management service that stores sensitive information such as website credentials in an encrypted vault. The Bitwarden platform offers a variety of client applications including a web interface, desktop applications, browser extensions, mobile apps, and a CLI.

I use Bitwarden as my main password vault. It stores my card details for automating the filling out of payment forms. Saves me from having to find or remember my card details. I also use Bitwarden for storing all of my passwords.

Having Bitwarden as a public endpoint means that I can connect to my password vault using the Bitwarden app on Android, specifying my self hosted instance.

Setting up the Bitwarden Server

This section of the tutorial is to set up the main Bitwarden 'hub'. This will be a publicly exposed Bitwarden API that will live on your server.

Step 1: Setting up your Linux server

You'll need to either have an existing server instance or create one. I use a Proxmox instance running on a server in my loft. You could also use something like Digital Ocean to host your Bitwarden Server. Using the following link will give you $100 worth of credits for 60 days to play around with, just sign up using this link.

You could also use a cheap Raspberry PI to set up your own Linux server.

Once you have the server set up, or have logged in. You'll need to do some updates and run some prerequisite installs.

sudo apt-get updatesudo apt-get upgrade

Next, we need to install Docker. Docker is the layer which your containers run.

To install Docker on your instance, you need to run the following command.

The following script is a convenience script provided by the Docker team. It's highly recommended to always check what you're going to execute, before executing it.

curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.sh

Once you have executed the Docker install script. You should see an output like the following.

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (1)

As you can see in the output, the command was executed successfully. You may also notice that there is a console message specifying how to use Docker as a non-root user.

This means that whenever you are executing the Docker command, you'll no longer need to type in your sudo password.

If this sounds good to you, you can simply run the provided command, substituting your-user for your server user. In my case, my user is ubuntu. My command would look like this.

sudo usermod -aG docker ubuntu

We also need to install Docker Compose. This can be done by running the following commands.

sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-compose

Step 2: Provisioning your Bitwarden Server

Next, you'll need to create a new folder, this will house your Bitwarden Server, you can call it anything memorable. I'll just call mine bitwarden

cd ~mkdir bitwardencd bitwarden

Next, you'll need to create a docker-compose.yml file. This is an orchestration file which docker-compose will use to provision your Docker instance.

touch docker-compose.yml

Next, you'll need to edit your `docker-compose.yml` file and paste in the following content.

# docker-compose.ymlversion: '3'services: bitwarden: image: vaultwarden/server:latest restart: always ports: - 8000:80 volumes: - ./bw-data:/data environment: WEBSOCKET_ENABLED: 'true' # Required to use websockets SIGNUPS_ALLOWED: 'true' # set to false to disable signups

I'm using Vaultwarden which is an opensource project. It is not owned by Bitwarden. They're an unofficial bitwarden compatible server written in Rust.

Save your docker-compose.yml file and exit back to your bitwarden directory.

Step 3: Running your Bitwarden Server locally

Now, you have everything provisioned for running your Bitwarden Server.

The next thing to do is run it.

sudo docker-compose up -d

This will start up your Bitwarden Server inside Docker, it may take some time to pull down the images.

You can eventually see your instance running by executing the following

sudo docker ps

This will list your running instance.

If all is well, you can locally view your Bitwarden Server by navigating to http://localhost:PORT. Or from another machine by using your ip address instead of localhost

You should see something that looks like the following.

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (2)

Finally, you'll just need to register for an account on your new hosted instance.

Click the Create Account button

Then fill out your details. If you have an existing Bitwarden account, you'll still have to create a new account on this instance. You can then Export and Import between accounts.

The last thing to do is hit Submit

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (3)

If your instance isn't on your local machine, you will need to set up Nginx routing, which you can follow in Step 4.

Step 4: Exposing your new server publicly

This part may sound scary, but it is required to allow your Bitwarden Clients (Android, iOS, Chrome extension etc) to connect to your server.

We're going to be using nginx.

Setting up nginx

Nginx is a reverse proxy that allows you to point incoming web traffic to your new Bitwardeb server.

Firstly, install nginx if you haven't already

sudo apt-get install nginx

If you have UFW installed, you will have to Allow Nginx through your local firewall.

I have a tutorial for setting up UFW here

Setting Up UFW on Ubuntu ServerUFW is a program that allows you to internally control ports on your Linux instance. This gives you the ability to forward ports from your machine.bowlerdesign.techEd Leeman
sudo ufw app list
Output---Available applications: Nginx Full Nginx HTTP Nginx HTTPS OpenSSH

As you can see, there are three profiles available for Nginx:

  • Nginx Full: This profile opens both port 80 (normal, unencrypted web traffic) and port 443 (TLS/SSL encrypted traffic)
  • Nginx HTTP: This profile opens only port 80 (normal, unencrypted web traffic)
  • Nginx HTTPS: This profile opens only port 443 (TLS/SSL encrypted traffic)

You can enable this by typing:

sudo ufw allow 'Nginx Full'

Next thing to do is just double check your nginx server is up and running

sudo systemctl status nginx

You should see something that looks like the following

● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running)...

The next part allows us to take incoming traffic and point it to your container instance. Allowing you to expose your Bitwarden server to the internet.

Navigate to /etc/nginx/

cd /etc/nginx/sites-enabled

Use your favorite text editor and open the following file with sudo

sudo vim default

I use the following code for my bitwarden server

server { listen 80; server_name vault.bowlerdesign.tech; location / { proxy_pass http://127.0.0.1:8000; # bitwarden server address }}

Port-forwarding

You will need to port forward your instance to allow public access to your instance. This will involve googling how to port forward from your router.

You'll need to point port 80 and 443 to your instance where Nginx is set up.

Linking Bitwarden Server with your public domain

You will also need to set up a public domain name. This can then be used to call your new public instance with port 443 exposed.

For example, I would set up a subdomain on bowlerdesign.tech to be vault.bowlerdesign.tech. Notice this is also the domain I specified in my Nginx config above.

Here's something to search for with regards to setting up a domain name

Setting up Certbot

Certbot allows us to generate SSL certificates for free with Let's Encrypt. It's simple to install and use. Even hooks in with Nginx, meaning that there's no more manual configuration required.

To install Certbot, simply run the following command

sudo add-apt-repository ppa:certbot/certbotsudo apt-get updatesudo apt-get install python-certbot-nginx

Then, to set up your SSL certificate, run

sudo certbot

Follow the instructions, select your domain name from the nginx list.
Also, select redirect as this will upgrade any http requests to https.

Step 5: Connecting to your new Bitwarden instance from a client.

I'm going to use the Firefox Bitwarden Plugin for this part of the tutorial. But the process is identical for all Bitwarden clients.

First, if you haven't already, install your chosen Bitwarden client and open it.

In the top left corner, click the cog icon

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (6)

You'll then get some configuration. Simply add your full url into the Server URL field

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (7)

Like so, then just hit Save and log in as normal

Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (8)

That's it

Pretty easy right?

Please don't hesitate to get in touch in the comments if you get stuck. I'd be more than happy to help out with any issues you may face.

This post contains affiliate links meaning we may receive a small commission on purchases made through links in this post. At no extra cost to you 😊

Enjoying the post?

Subscribe to our free Monthly Newsletter, featuring our latest posts. Straight to your inbox. No spam ever (we hate it as much as you do).
Completely Self-Hosting Bitwarden Password Manager (Updated 2022) (2024)

FAQs

Can Bitwarden be self-hosted? ›

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 much does it cost to self host Bitwarden? ›

Self-hosting Bitwarden is free, however some features must be unlocked in your self-hosted instance with a registered license file.

Can 1Password be self-hosted? ›

Connect servers work well for when you need unlimited requests and self-hosted infrastructure. 1Password also maintains several SDK libraries for the Connect API so you can integrate with your existing applications.

What ports does Bitwarden self-hosted firewall use? ›

By default, Bitwarden will be served through ports 80 ( http ) and 443 ( https ) on the host machine. Open these ports so that Bitwarden can be accessed from within and/or outside of the network. You may opt to choose different ports during installation.

How many users can you have on Bitwarden self-hosted? ›

Pricing for Individuals and Families | Bitwarden

Of course, they can also upgrade to Premium individually. It is also possible to buy a Family Organization license instead and use it on your self-hosted server to enable Premium for up to 6 accounts, but this is not required if you don't want or need it.

What's better than Bitwarden? ›

1Password is a top-tier password manager with personal and business plans ranging from $2.99 to $7.99 per month and a 14-day free trial for all plans. In addition to standard features such as two-factor authentication, a password generator and biometric functionality, it also offers features that Bitwarden doesn't.

What is the drawback of Bitwarden? ›

Confusing and Non-User-Friendly UI: Some users have found the user interface of Bitwarden to be confusing and not user-friendly, leading to difficulties in navigating and performing tasks efficiently. The overall design was described as dated and not as polished as some users would prefer.

What company owns Bitwarden? ›

Bitwarden, Inc. is incorporated in the State of Delaware in the United States of America, registrar #7654941, 8bit Solutions LLC is wholly owned by Bitwarden, Inc.

What are the risks of using Bitwarden? ›

Thus, the main risk to your vault is an attack against the local device on which you are using Bitwarden, for example, by malware.

Is Keeper self-hosted? ›

Keeper utilizes AWS in several regions – including the US, US GovCloud, EU, AU, CA and JP – to host and operate the Keeper platform and architecture. This provides customers with the most secure cloud storage available. Data is fully isolated in the customers' preferred AWS region while in transit and at rest.

What happens if you stop using 1Password? ›

Your canceled subscription will remain active until the end of the current billing period, then your account will be frozen. You can start your subscription again at any time. Learn more about 1Password subscription billing when you cancel your subscription.

Who owns 1Password? ›

1Password is a password manager developed by the Canadian software company AgileBits Inc. It supports multiple platforms such as iOS, Android, Windows, Linux, and macOS.

How secure is Bitwarden self-hosted? ›

All vault data stored in Bitwarden, regardless if on the cloud or self-hosted, is end-to-end encrypted and not accessible by anyone except the Bitwarden user. With this end-to-end, zero knowledge encryption architecture even Bitwarden cannot access your data.

Where is Bitwarden hosted? ›

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.

Does Bitwarden have an API? ›

The Bitwarden Public API provides organizations with a suite of tools for managing members, collections, groups, event logs, and policies.

What are the disadvantages 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.

Can you use Bitwarden locally? ›

Bitwarden does store a local cache of your encrypted vault data, so it is possible to access your passwords if you lose connection to the servers (or if you intentionally disconnect from the servers by disabling the internet connection of your device); however, in off-line mode, the vault is strictly read-only — you ...

Where is Bitwarden data hosted? ›

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.

Does Bitwarden integrate with Active Directory? ›

Bitwarden provides built-in connectors for the most popular LDAP directory servers, including: Microsoft Active Directory.

References

Top Articles
Easy homemade white chocolate sauce recipe
Slow Cooker Barbacoa Recipe
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Toyota Campers For Sale Craigslist
Unlocking the Enigmatic Tonicamille: A Journey from Small Town to Social Media Stardom
Ncaaf Reference
Globe Position Fault Litter Robot
Crusader Kings 3 Workshop
Robert Malone é o inventor da vacina mRNA e está certo sobre vacinação de crianças #boato
Guilford County | NCpedia
Maplestar Kemono
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 6084

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.