Private customers Business customers

Install Vaultwarden on your VPSYour own password manager, compatible with the Bitwarden apps

Vaultwarden is a lightweight, self-hosted server for the Bitwarden password manager. Your passwords live on your own VPS in Germany, and you still use the official Bitwarden apps and browser extensions. This guide shows the installation via Docker Compose, HTTPS through a reverse proxy, locking down sign-ups and a backup that holds up in an emergency.

Docker ComposeBitwarden appsFrom plan S45 minutes

Published on

What Vaultwarden is - and what it is not

Bitwarden is an open-source password manager with apps for all common systems and browsers. You can run the server yourself, but the official edition is fairly heavyweight. Vaultwarden is an independent reimplementation of the same server protocol: a single, frugal service that works with the official Bitwarden clients.

Two things are worth knowing. First, Vaultwarden is not a Bitwarden product but a community project, so support requests do not belong with Bitwarden. Second, you are responsible for running it: if your server fails and there is no backup, your passwords are gone. The apps do keep an encrypted copy, but you should not rely on that.

Encryption happens on your devices, by the way. Your entries are stored on the server only in encrypted form, and your master password never leaves your device. Someone who takes over the server does not have your passwords yet - but they could tamper with the web interface. That is why hardening and updates are mandatory.

Rent a VPS from €2.95 / month

Prepaid without a contract, full root access.

Which plan fits?

Vaultwarden itself gets by with very little memory. What determines the requirement is everything around it: Docker, a reverse proxy for HTTPS and possibly further services on the same machine.

PlanRAMCPUNVMePriceBest forOrder
VPS XS1 GB1 vCore5 GB€2.95 / monthworks for one person, but tight with DockerOrder XS
VPS SOur recommendation2 GB1 vCore10 GB€4.95 / monthfamily or small team, with reverse proxyOrder S
VPS M4 GB2 vCore20 GB€6.45 / monthVaultwarden plus further services such as NextcloudOrder M
VPS L8 GB4 vCore40 GB€9.45 / monthmany services in parallel on one machineOrder L
VPS XL16 GB4 vCore80 GB€15.95 / monthnot needed for Vaultwarden aloneOrder XL

For most people, S for €4.95 / month is the right choice. XS works for a single person, but Docker already takes up a noticeable share of its storage there. If Nextcloud or other services are added later, you switch to a larger plan yourself in the customer interface - without data loss.

You also need a domain or subdomain such as vault.yourdomain.com that points to your VPS via an A record. Without HTTPS, the web interface refuses to work, because encryption in the browser only runs over a secure connection.

Prerequisites

Installation via Docker Compose

Create a directory for the stack and generate the token for the admin page first. Vaultwarden has its own command for that, which outputs an Argon2 hash instead of plain text:

mkdir -p ~/stacks/vaultwarden && cd ~/stacks/vaultwarden
docker run --rm -it vaultwarden/server /vaultwarden hash --preset owasp

You enter a long password twice and get a line starting with $argon2id$. Store it in a .env file - in single quotes, so the dollar signs are not read as variables:

nano .env
VW_ADMIN_TOKEN='$argon2id$v=19$...'

Then the Compose file:

nano compose.yaml
services:
  vaultwarden:
    image: vaultwarden/server:latest
    restart: unless-stopped
    environment:
      DOMAIN: "https://vault.yourdomain.com"
      SIGNUPS_ALLOWED: "true"
      ADMIN_TOKEN: ${VW_ADMIN_TOKEN}
    volumes:
      - ./data:/data
    ports:
      - "127.0.0.1:8081:80"

Three lines deserve attention. DOMAIN must match the address you use to open Vaultwarden exactly, including https:// - otherwise links and notifications do not work properly. SIGNUPS_ALLOWED is set to true for now so you can create your own account. And the port mapping 127.0.0.1:8081:80 makes Vaultwarden reachable only from the server itself. Outside access comes through the reverse proxy in a moment.

docker compose up -d
docker compose config | grep ADMIN_TOKEN

The second line shows whether the token arrives correctly - the dollar signs appear doubled in the output, which is correct.

HTTPS through a reverse proxy

The easiest way is Caddy, which fetches and renews the Let's Encrypt certificate on its own. If you already use nginx, add Vaultwarden there as another server block - the pattern is in Set up a web server. For Caddy, install the package from the package sources and add to /etc/caddy/Caddyfile:

vault.yourdomain.com {
    reverse_proxy 127.0.0.1:8081
}
sudo systemctl reload caddy

Ports 80 and 443 must be free, and the DNS record must already point to the server. The web interface is then available at https://vault.yourdomain.com. The live notifications the apps use to sync changes immediately run over the same port in current Vaultwarden versions - a separate WebSocket entry is no longer needed.

Create your account and disable sign-ups

Open the web interface, create your account and choose a long master password you use nowhere else. If you forget it, nobody can reset it - not even you as the server operator.

Once all accounts are created, disable sign-ups. Otherwise, anyone who knows the address can create their own account on your server:

sed -i 's/SIGNUPS_ALLOWED: "true"/SIGNUPS_ALLOWED: "false"/' compose.yaml
docker compose up -d

After that, you invite other people via the admin page at /admin, which needs the password from the first step. For invitations to arrive by email, enter an SMTP server there, such as a mailbox from a web hosting plan.

Then connect the apps: in the Bitwarden app or browser extension, choose "self-hosted" as the region before logging in and enter your address. Also enable two-step login in your account settings.

Updates and backup

You apply updates with two commands. Because a password manager is an attractive target, do this regularly:

cd ~/stacks/vaultwarden
docker compose pull && docker compose up -d

Everything important is in the data folder: the database db.sqlite3, attachments, the key rsa_key.pem and the config.json saved via the admin page. Do not back up the database with a plain copy while it is running, but with a consistent snapshot:

sudo apt install sqlite3 -y
sqlite3 ~/stacks/vaultwarden/data/db.sqlite3 ".backup '/root/vw-$(date +%F).sqlite3'"

Push this snapshot and the rest of the data folder to a destination outside the server with a cron job. How to automate that is covered in the guide Set up backups. Try a restore at least once - for a password manager, that is not optional.

If you would rather manage several applications through a web interface than through Compose files, Vaultwarden can also be deployed via Coolify. For a single service, though, the variant shown here is easier to follow.

Frequently asked questions

No. Vaultwarden is an independent server implementation that works with the official Bitwarden apps and browser extensions. It does not come from Bitwarden, is much more frugal than the official server and is maintained by a community. Questions about running it therefore belong with the Vaultwarden project, not with Bitwarden support.

For a family or small team with Docker and a reverse proxy, plan S is the right size. XS works for a single person, but Docker takes up a noticeable share of its storage there. If further services such as Nextcloud are to run on the same server, plan for M.

Yes, at least a subdomain with HTTPS. The Vaultwarden web interface only works over a secure connection, because encryption in the browser is blocked otherwise. A subdomain such as vault.yourdomain.com with a Let's Encrypt certificate is common.

Then the entries in that account are lost. The master password never leaves your device, and neither you as the server operator nor we as the host can reset it. Write it down in a safe place outside the password manager, on paper for example.

The stored entries are only kept encrypted on the server and cannot be read without the master password. An attacker could, however, tamper with the web interface to capture passwords entered in the future. That is why SSH hardening, a tight firewall, regular updates and two-step login are mandatory.

No. Backups are self-service on the VPS: you back up the data folder with the database, attachments and key yourself to a destination outside the server. Root access gives you every tool for that, and the guide Set up backups shows the way.

VPS for your password manager

Vaultwarden itself needs hardly any resources. With Docker and a reverse proxy, plan S is the right size, and M if you run further services next to it. Full root access, prepaid with no contract, located in Frankfurt am Main.

View VPS plans & prices