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 – featuring generation, storage, and autofill of strong credentials.
Want to self-host this service? We guide you step-by-step through the setup and configuration, showing you everything you need to consider.
Before installing Bitwarden, ensure your hosting environment meets the following requirements for 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 to run on a supported operating system. Make sure your server meets these requirements before starting the installation:
Dependencies: Docker (Engine 26+ and Compose)
Operating System: Latest version of Windows Server with support for Docker 26+
Ensure all dependencies are installed and the correct OS version is used to avoid compatibility issues during 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 ensures a stable environment and helps avoid issues during or after installation.
To run your system with the latest software and security updates, always perform a system update first. This ensures you have the newest security patches and software versions before proceeding.
Once the update is complete, you can start installing dependencies. Bitwarden runs on your system via multiple Docker containers. Docker must be installed first. Install Docker Desktop on your server.
For detailed instructions on installing and using Docker, see our Docker guide.
We recommend configuring your Windows Server with a dedicated bitwarden service account from which Bitwarden will be installed and operated. This ensures your Bitwarden instance runs isolated from other applications on your server.
Open PowerShell as Administrator. Create the local Bitwarden user with the following commands. After the first command, a text input window appears. Enter the desired password and confirm. Then run the second command to complete the setup.
PS C:\> $Password = Read-Host -AsSecureString
New-LocalUser "Bitwarden" -Password $Password -Description "Bitwarden Local Admin"
Next, create a Bitwarden folder under C:\ for the newly created user:
PS C:\> mkdir Bitwarden
In Docker Desktop, open Settings → Resources → File Sharing. Add the path C:\Bitwarden to the shared directories. Select “Apply & Restart” to activate the changes.
By default, Bitwarden runs on the host over ports 80 (HTTP) and 443 (HTTPS). Set up a domain with DNS records pointing to your host, e.g., server.example.com – especially important if you provide Bitwarden over the internet. Avoid using "bitwarden" in the hostname to not unnecessarily reveal the server’s role or software.
After all requirements are met and preparations are complete, you can start installing Bitwarden.
Download the Bitwarden installation script to your server and run it:
cd C:\Bitwarden
Invoke-RestMethod -OutFile bitwarden.ps1 -Uri "https://func.bitwarden.com/api/dl/?app=self-host&platform=windows"
.\bitwarden.ps1 -install
In the installer, first enter the domain name of your Bitwarden instance, typically the configured DNS entry. Then choose whether Let’s Encrypt should generate a free, trusted SSL certificate. If yes, provide an email for expiration notifications. If no, you will be asked about the certificate.
Enter your installation ID and key obtained from Bitwarden. Then select the US or EU region – relevant only if you connect a self-hosted instance with a paid subscription.
If you don’t use Let’s Encrypt, you can use an existing certificate by placing the files in C:\Bitwarden\bwdata\ssl\<your_domain> and indicating if it’s trusted. Alternatively, you can generate a self-signed certificate, recommended only for testing. If you don’t use a certificate, you must place an HTTPS proxy in front of the installation; otherwise, Bitwarden apps won’t work.
After installation, complete the basic configuration via two files. First, edit the environment file at \bwdata\env\global.override.env. Enter your SMTP server details, including 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=<placeholder>
globalSettings__mail__smtp__port=<placeholder>
globalSettings__mail__smtp__ssl=<placeholder>
globalSettings__mail__smtp__username=<placeholder>
globalSettings__mail__smtp__password=<placeholder>
...
adminSettings__admins=
...
Test the SMTP configuration with .\bitwarden.ps1 -checksmtp. A correct setup reports success; otherwise, you’ll get hints about missing OpenSSL or incorrect values. Apply changes with .\bitwarden.ps1 -restart.
Next, check installation parameters in .\bwdata\config.yml. This file controls generated assets and must be adjusted for special environments, e.g., if you work behind a proxy or use alternative ports. Apply changes with .\bitwarden.ps1 -rebuild.
Finally, start the instance with .\bitwarden.ps1 -start. The first start may take some time as Docker pulls images. Use docker ps to check if all containers are healthy. Then open the Web Vault under your configured domain and register an account if needed. Email verification only works with correctly configured SMTP variables.
Congratulations! You have successfully installed and configured Bitwarden on your VPS/Dedicated Server. We also recommend checking out the following resources to help with server configuration:
- bitwarden.com – Official website
- https://bitwarden.com/help/ – Bitwarden Help Center (Documentation)
Have specific questions not answered here? Our support team is available daily for further questions or assistance – don’t hesitate to contact us! 🙂
