Skip to content
🧮 Is Lifetime with ZapX Pass worth it? Work it out for your own servers in 30 seconds. Open the Lifetime calculator →

Setting Up Bitwarden on a Windows Server – Secure Your Password Management

Discover how to securely self-host Bitwarden to manage passwords with end-to-end encryption and powerful features

12 November 20264 min read161 Views0 helpful

Introduction

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.

Requirements

Before installing Bitwarden, ensure your hosting environment meets the following requirements for a smooth installation and optimal performance.

HardwareMinimumZAP-Hosting Recommendation
CPU1 vCPU core4 vCPU cores
RAM2 GB4 GB
Disk Space12 GB25 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.

Preparation

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.

Update System

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.

Install Dependencies

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.

Create User & Directory

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.

Code
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:

Code
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.

Configure Domain

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.

Installation

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:

Code
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.

Configuration

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.

Code
...
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.

Completion and Additional Resources

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:

Have specific questions not answered here? Our support team is available daily for further questions or assistance – don’t hesitate to contact us! 🙂

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

Bitwarden is an open-source password manager for passwords and passkeys that uses zero-knowledge and end-to-end encryption. You can use it as a cloud service or self-host it.
Bitwarden requires Docker (Engine 26+ and Compose) and runs on the latest Windows Server version with support for Docker 26+.
Minimum requirements are 1 vCPU core, 2 GB RAM, and 12 GB disk space. ZAP-Hosting recommends 4 vCPU cores, 4 GB RAM, and 25 GB disk space.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.