Bitwarden is an open-source password manager for passwords and passkeys that uses zero-knowledge and end-to-end encryption to protect your data. You can use it as a cloud service or self-host it—with features for generating, storing, and automatically filling strong credentials.
Want to self-host Bitwarden? We’ll show you two ways: the easy way as a One-Click App, which makes Bitwarden Lite available over HTTPS in just a few clicks, and the manual installation of the Bitwarden server using the official installation script from the console.
Vaultwarden is an unofficial, lightweight server for the Bitwarden apps and uses significantly less RAM. You can also install it on a VPS as a One-Click App; see Set up Vaultwarden on a Linux server.
The fastest way to get your own Bitwarden server is through your VPS’s One-Click Apps. The app installs Bitwarden Lite, the official lightweight version of the Bitwarden server, in a single container, together with its own MariaDB database. It’s accessible directly over HTTPS with a domain, and your vault data is stored on your VPS. You can then connect using Bitwarden’s browser extension, desktop app, smartphone apps, and CLI, using your own server address.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set up One-Click Apps to learn how.
- At least 2 GB RAM (3 GB recommended), plus at least 3 GB of free storage (10 GB recommended).
- An installation ID and an installation key. You can get both for free at bitwarden.com/host: enter your email address, choose a data region, and the values will be displayed.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search for Bitwarden in the app catalog and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a random name. Leave the option enabled or enter your own name: the Bitwarden apps only work over an HTTPS connection.
- Under App configuration, enter your installation ID in
BW_INSTALLATION_IDand your installation key inBW_INSTALLATION_KEY. The app can’t be installed without these two required fields. The remaining fields are optional; see Email delivery and admin portal for more information. - Click Queue installation. On its first startup, Bitwarden sets up its database. The app will be ready after a few minutes.
- Open the app’s Access link and click Create account.
- Enter your email address and name, then click Continue.
- Set your Master password. It must be at least 12 characters long. Confirm it and click Create account. If you haven’t entered SMTP details, Bitwarden won’t send a confirmation email, and your account will be created immediately.
- Sign in with your email address and master password.
Your master password can’t be recovered. If you forget it, you won’t be able to access the data in your vault.
You’ll then land in your vault, where you can create your first entries.
By default, anyone who knows the address can create an account on your server. Once all the accounts you need have been created, disable registration:
- Open the app settings (gear icon) and go to App environment.
- Set
BW_DISABLE_USER_REGISTRATIONtotrueand click Save.
The app will then restart. Bitwarden will reject new registrations, while existing accounts will continue to work.
Bitwarden won’t send emails without SMTP details. To enable confirmation emails, two-factor codes by email, and the admin portal, enter your email provider’s SMTP details under App environment:
| Variable | Value |
|---|---|
BW_SMTP_HOST | Your email provider’s SMTP server address |
BW_SMTP_PORT | Port; defaults to 587 |
BW_SMTP_USERNAME | Mailbox username |
BW_SMTP_PASSWORD | Mailbox password |
BW_MAIL_FROM | Sender address |
BW_SMTP_SSL / BW_SMTP_STARTTLS | Encryption; defaults to false and true, respectively (suitable for port 587) |
You can access the admin portal at /admin on your domain. Sign-in works through a link sent by email to the addresses you enter in BW_ADMIN_EMAILS. The admin portal can’t be used without SMTP details. Premium and organization features also require a license from Bitwarden.
Update Bitwarden in the app settings (gear icon), under App update. Click Check for updates, then install a new version by clicking Apply update. Your vault and database are stored in separate volumes and will be preserved.
The rest of this guide describes the manual installation of the Bitwarden server using the official installation script from the console. This version runs in multiple Docker containers and requires more resources than Bitwarden Lite.
Before installing Bitwarden, make sure your hosting environment meets the following requirements to ensure a smooth installation and optimal performance.
| Hardware | Minimum | ZAP-Hosting recommendation |
|---|---|---|
| CPU | 1 vCPU core | 4 vCPU cores |
| RAM | 2 GB | 4 GB |
| Disk space | 12 GB | 25 GB |
The software requires all necessary dependencies to be installed and must run on a supported operating system. Before starting the installation, make sure your server meets the following requirements:
Dependencies: Docker (Engine 26+ and Compose)
Operating system: Latest version of Ubuntu/Debian with Docker 26+ support
Make sure all dependencies are installed and the correct operating system version is in use to avoid compatibility issues during the Bitwarden installation.
Before setting up Bitwarden, you need to prepare your system. This includes updating your operating system and installing all required dependencies. This preparation helps create a stable environment and prevent issues during or after installation.
To make sure your system has the latest software and security updates, you should update it first. Run the following command:
sudo apt update && sudo apt upgrade -y
This ensures your system has the latest security patches and software versions before you continue with the installation.
Once the update is complete, you can install the dependencies. Bitwarden will run on your system in multiple Docker containers. Docker must be installed first. Run the following commands:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
For detailed instructions on installing and using Docker, see our Docker guide.
We recommend configuring your Linux server with a dedicated bitwarden service account, which you’ll use to install and run Bitwarden. This keeps your Bitwarden instance isolated from other applications on your server.
Create the Bitwarden user and set a strong, unique password for this account.
sudo adduser bitwarden
sudo passwd bitwarden
Create the Docker group if it doesn’t already exist, then add the Bitwarden user to this group:
sudo groupadd docker
sudo usermod -aG docker bitwarden
Create the working directory, set its permissions, and assign ownership to bitwarden:
sudo mkdir /opt/bitwarden
sudo chmod -R 700 /opt/bitwarden
sudo chown -R bitwarden:bitwarden /opt/bitwarden
By default, Bitwarden runs on the host over ports 80 (HTTP) and 443 (HTTPS). Set up a domain with DNS records pointing to the host, for example, server.example.com—especially if you’re making the service available on the internet. Avoid using Bitwarden in the hostname so you don’t unnecessarily reveal the server’s role or software.
Once all requirements are met and preparations are complete, you can start installing Bitwarden.
Download the Bitwarden installation script to your server and run it. A ./bwdata directory will be created relative to the location of bitwarden.sh.
curl -Lso bitwarden.sh "https://func.bitwarden.com/api/dl/?app=self-host&platform=linux" && chmod 700 bitwarden.sh
./bitwarden.sh install
In the installer, first enter the domain name of your Bitwarden instance, typically the DNS record you configured. Next, choose whether Let’s Encrypt should generate a free, trusted SSL certificate. If you choose yes, enter an email address for expiration notifications. If you choose no, you’ll be asked questions about the certificate.
Enter the installation ID and installation key you received from Bitwarden. Then choose the US or EU region. This is only relevant if you connect a self-hosted instance to a paid subscription.
If you aren’t using Let’s Encrypt, you can use an existing certificate by placing the files in ./bwdata/ssl/your.domain and specifying whether it’s trusted. Alternatively, you can generate a self-signed certificate, but this is only recommended for testing. If you don’t use a certificate, you must put an HTTPS proxy in front of the installation; otherwise, Bitwarden applications won’t work.
After installation, complete the basic configuration using two files. First, edit the environment file at ./bwdata/env/global.override.env. Enter your SMTP server details, including the host, port, SSL, username, and password, so Bitwarden can send verification and organization invitation emails. If you need access to the system admin portal, add an admin email to adminSettings__admins.
...
globalSettings__mail__smtp__host=<platzhalter>
globalSettings__mail__smtp__port=<platzhalter>
globalSettings__mail__smtp__ssl=<platzhalter>
globalSettings__mail__smtp__username=<platzhalter>
globalSettings__mail__smtp__password=<platzhalter>
...
adminSettings__admins=
...
Test the SMTP configuration with ./bitwarden.sh checksmtp. A successful setup will report success; otherwise, you’ll get information about missing OpenSSL or incorrect values. Apply changes with ./bitwarden.sh restart.
Next, check the installation parameters in ./bwdata/config.yml. This file controls the generated assets and must be adjusted for special environments, for example, if you’re behind a proxy or using alternative ports. Apply changes with ./bitwarden.sh rebuild.
Finally, start the instance with ./bitwarden.sh start. The first startup may take a while as Docker pulls the images. You can use docker ps to check whether all containers are healthy. Then open the web vault at your configured domain and register an account if needed. Email verification only works when the SMTP variables are configured correctly.
Congratulations! You’ve successfully installed and configured Bitwarden on your VPS/dedicated server. We also recommend checking out the following resources, which can help you configure your server:
- bitwarden.com – Official website
- https://bitwarden.com/help/ – Bitwarden Help Center (documentation)
Do you have specific questions that aren’t answered here? Our team is available every day to answer your questions or provide support—just get in touch! 🙂
