Today the only primary barrier between potential malicious hackers and your precious accounts and online data is your passwords.Β While online security has been enhanced in recent years by multi-factor authentication, passwords still remain the primary means for protecting your accounts. This is where programs like Bitwarden come into play. Password managers are more popular than ever these days.Β A program like Bitwarden is almost a necessity if you manage many accounts yourself or run a business that manages many accounts. Bitwarden is used to create strong passwords in important business accounts in large numbers to protect a businessβs interests and prevent phishing attacks. Bitwarden is a rather demanding and extensive program, meaning that often, it is more efficient to either self-host Bitwarden or have it hosted in a third-party server with dedicated resources. VPS or a virtual private server is the best option for this act. So in this guide, I will go over some basic definitions and facts beforeΒ showing you how to establish your Bitwarden self-hosting operation on both Windows and Linux OS options. Letβs get to it.
What is Bitwarden?
Before we get ahead of ourselves, letβs quickly familiarize ourselves with what Bitwarden is. I vaguely mentioned that Bitwarden is a password manager. What it does is create long passwords with advanced algorithms that are almost unbreakable. These passwords can be intricate and difficult to remember for a human mind, still Bitwarden manages these passwords for you and lets you keep track of your passwords and accounts. Bitwarden also allows you to sync your passwords on all of your devices. It also enables greater micromanagement for every single account and password. As one of the most popular and most commonly self-hosted password manager options, itβs interesting to note that Bitwarden is free.
You can, however, get all sorts of extra features, like encryption and backups, for only $10 a year. Bitwarden is also available as a browser extension, however, if you want to experience the full package, which tends to be a demanding program, then the best course of action is Bitwarden self-hosting. But why do you need to self-host Bitwarden?
Why Do You Need a Self-Hosted Password Manager?
The core reasoning behind why you need a self-hosted password manager comes down to one word: security. Letβs not forget that whichever platform is hosting your Bitwaren instance essentially has access to all of your most sensitive passwords and credentials. So when you self-host Bitwarden, you are essentially taking these passwords off the public domain and storing them away in a safe private server. While Bitwarden itself is quite safe and will not yield even under the most powerful online attacks, it is still a reassuring and professional course of action to opt for a Self-hosted Bitwarden to fully dedicate a space to your security and credentials.Β
Another major reason behind why you should opt for Bitwarden Self-hosting is that Bitwarden can be quite a large program with extensive resource allocation. Therefore, hosting it on a desktop poses potential security concerns and hinders the operational capacity of that desktop to perform other tasks. So instead, it has become commonplace to self-host Bitwarden within major organizations and businesses to avoid security breaches and spare operational power. Now letβs learn the prerequisites of Bitwarden self-hosting.
Bitwarden Self-Hosting Prerequisites
To self-host Bitwarden, youβll simply need a free Windows or Linux remote server and a free Bitwarden instance. Theoretically, you can also self-host Bitwarden on a macOS machine. But since creating a macOS has considerable challenges and is extremely uncommon, I will stick with the requirements for these two platforms in this guide.
Hardware Requirements to Self-Host Bitwarden on a Windows Server
In order to successfully go for a Bitwarden self-hosting operation on a Windows server you will need at least an x64, 1.4GHz CPU, while an x64, 2GHz dual-core is the recommended option. 6GB of RAM is enough to run the program, however, if you plan to have lots of accounts and credentials managed, it is advised to go for more than 8GB of RAM. Storage is by far the most demanding Bitwarden self-hosting obstacle. You need a minimum of 75 GB, although the program can easily bulk up to take 90 GB and more on your machine. Finally, you need to ensure that you have an instance of Docker installed on your Windows server with Engine 19+ and Compose 1.24+ versions.
Hardware Requirements to Self-host Bitwarden on a Linux
Bitwarden self-hosting is considerably less demanding on a Linux server. To successfully go for a Bitwarden self-hosting operation on a Linux server you willΒ need the same CPU requirements as Windows, with at least an x64, 1.4GHz CPU, while an x64, 2GHz dual-core is the recommended option. 2GB of RAM is enough to run the program, however, if you plan to have lots of accounts and credentials managed, it is advised to go for more than 4GB of RAM. You need a minimum of 12 GB, although the program can easily bulk up to take 25 GB and more on your machine. Finally, you need to ensureΒ that you have an instance of Docker installed on your Linux server with Engine 19+ and Compose 1.24+ versions.
Server (VPS)
Finally, you need a server that matches specifications above to self-host what can be described as a Bitwarden VPS. I mention VPS because it is the most cost-effective method of server hosting that you can find for your Bitwarden self-hosting procedure. There are many credible VPS options. If you are already familiar with Bitwarden then chances are you already have a VPS server. But if not, then a cheap basic plan by Cloudzy For either a Linux or a Windows VPS is all you need to create a reliable Bitwarden VPS. Cloudzyβs servers feature ironclad security and anti-DDoS protocols thatΒ keep your credentials safe. You will get access to more than 15 locations around the globe. Finally, the payment is tailored to be accommodating, and you can use diverse billing and even pay with crypto.
Benefit from our affordable VPS hosting for various use-cases, including hosting websites or games, trading, remote desktop server, and app development & testing.
Bitwarden Server Setup: Windows Step-by-Step Guide
Now that everything is set and ready letβs start the actual guide by covering the process of self-hosting Bitwarden on a Windows server. Follow the steps and it will be done in no time! Since you will need to install docker, itβs highly recommended to read our comprehensive guide on docker and VPS containerization before starting the guide.
Step 1: Initial Acts
Log into your Windows VPS using whatever protocol you like. RDP works the best as it keeps the GUI running, although you can also do it with SSH since we mostly use Powershell. Next ensureΒ that if your Windows Firewall is running, you have ports 80 and 433 open, as these are the main ports through which Bitwarden works. Docker is also needed, so make sure to have it installed. The steps to installing it are rather long, so use this guide to get it done before moving to step 2!
Step 2: Local User and Directory
Now we need to create a local directory and local user to operate your instance of Bitwarden. Open the PowerShell with admin privileges and enter the following command:
PS C:\> $Password = Read-Host -AsSecureString
Powershell will ask for the desired password. Make a secure password that you will remember and after you typed it, enter this following line:
New-LocalUser "Bitwarden" -Password $Password -Description "Bitwarden Local Admin"
Finally, use this command to create a Bitwarden directory in your C:\ drive:
PS C:\> mkdir Bitwarden
In your Docker, go to Settings, then onto Resources and finally File Sharing. Add the directory you just made seconds ago (C:\Bitwarden) to the Resources list. Click apply and save and you are done.
Step 3: Install Bitwarden
In the first two steps of the Bitwarden self-hosting guide for Windows, we prepared the computer for installation, now we are going to install the program. Go back to the directory you made with this command:
cd C:\Bitwarden
And then, use this line to download Bitwarden using a script:
Invoke-RestMethod -OutFile bitwarden.ps1 -Uri https://go.btwrdn.co/bw-ps
Once the download is completed , run the installer with this command to initiate the installation process:
.\bitwarden.ps1 -install
Step 4: Configure the Prompts
During the installation process, you will get a set of prompts you need to configure correctly. Letβs go through them one by one.Β
In the first prompt, you will need to enter a domain name which should be your configured DNS record. In the second prompt, you will be asked if you need an SSL Certificate, you need to answer with the Y key for yes and the N key for no. If you already have one go for N, but if you donβt and need one then Y it is.
To answer the third prompt, you need to go to https://bitwarden.com/host/ and retrieve your installation ID using a valid email address. On the same webpage, also opt for an installation ID and enter that too. Configure the next two prompts depending on what you chose for the first SSL Certificate prompt and thatβs it! You have successfully set up a self-hosted Bitwarden on your Windows server in 4 quick steps. Congratulations.
Bitwarden Server Setup: Linux Step-by-Step Guide
Now letβs learn how to self-host Bitwarden on a Linux server. Since we used Powershell to do it on Windows, the process here will not be all that much different, with details slightly changing. Letβs get you Bitwarden self-hosting on Linux going!
Step 1: Initial Acts
Once again similar to the Windows guide, Log into your Linux server, preferably with the SSH protocol and make sure that ports 80 and 443 are open and ready to run. Have the version mentioned above of Docker Bitwarden already set up. Also run this command to make sure that Docker is Installed and ready:
sudo apt install docker.io docker-compose
Step 2: Local User and Directory
Now we need to create a local directory and local user to operate your instance of Bitwarden. Open the PowerShell with admin privileges and enter the following command to create a Bitwarden user:
sudo adduser bitwarden
Now you need to create a Docker group if you donβt already have one. If you do, skip this step. Enter this command:
sudo groupadd docker
Now use this line to add the Bitwarden user you made earlier to the Docker group:
sudo usermod -aG docker bitwarden
Now use theΒ following three command lines to create a Bitwarden directory, set the permissions for it, and set Bitwarden as the owner of the guide:
sudo mkdir /opt/bitwarden sudo chmod -R 700 /opt/bitwarden sudo chown -R bitwarden:bitwarden /opt/bitwarden
You have just finished setting up the basic steps to install Bitwarden on your Linux VPS, now letβs turn it into a Bitwarden VPS!
Step 3
Now we can start the process of the installation itself using this command to initiate the installer script download:Β
curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh && chmod 700 bitwarden.sh
Once the download is completed,Β run this command to begin the installation:
./bitwarden.sh install
Step 4: Configure the Prompts
Here, similar to step 4 of the installation process for Windows, during the installation process you will get a set of prompts that you need to configure correctly. Letβs go through them once more!Β
In the first prompt, you will need to enter a domain name which should be your configured DNS record to VPS IP. In the second prompt, you will be asked if you need an SSL Certificate, you need to answer with the Y key for yes and the N key for no. If you already have one go for N, but if you donβt and need one then Y it is.
To answer the third prompt you need to go to https://bitwarden.com/host/ and get your installation ID again using your email address. On the same webpage, also get your installation ID and submit it as well. Configure the next few depending on what you choose regarding the SSL Certificate prompt and thatβs all!
FAQ
Can I Self Host Bitwarden on macOS?
You can do so if you have a second MAC device that you are willing to dedicate to Bitwarden self-hosting. To do so, you will need to use either Apple Remote Access or RDP. However, it is not as efficient as Linux and Windows.
Is Bitwarden Free?
Yes. Bitwarden is free, so the costs of Bitwarden self-hosting are almost exclusively server-related. You can however access many useful features like backups and encryption with just a $10 per year subscription to Bitwarden which is never bad.
What are the Best Bitwarden Alternatives?
While Bitwarden has established itself as the preeminent option for a self-hosted password manager, there are other options like 1Password, LastPass, RoboForm, Enpass, and ZohoVault that you can also use!
0 Comment