Vaultwarden is a lightweight server that speaks the Bitwarden protocol. You run it on your own VPS and keep using the official Bitwarden apps and browser extensions — with your vault on hardware you control.
What you need
- A small VPS. Vaultwarden uses very little RAM; 1 vCPU / 1 GB is fine for a family.
- A domain or subdomain (e.g.
vault.example.com) with an A record pointing at the server. - Docker with the Compose plugin.
1. Docker Compose
/opt/vaultwarden/docker-compose.yml:
services: vaultwarden: image: vaultwarden/server:latest container_name: vaultwarden restart: unless-stopped environment: DOMAIN: "https://vault.example.com" SIGNUPS_ALLOWED: "true" # we'll turn this off in step 4 volumes: - ./vw-data:/data ports: - "127.0.0.1:8080:80" cd /opt/vaultwarden && docker compose up -d The port is bound to 127.0.0.1, so Vaultwarden is only reachable through the HTTPS proxy, never directly.
2. Automatic HTTPS with Caddy
Bitwarden clients require HTTPS. Caddy obtains and renews certificates by itself:
sudo apt install -y caddy /etc/caddy/Caddyfile:
vault.example.com { encode zstd gzip reverse_proxy 127.0.0.1:8080 } sudo systemctl reload caddy sudo ufw allow 80,443/tcp Open https://vault.example.com — you should get the web vault with a valid certificate.
3. Create your account
Register your own account (and family members') in the web vault.
4. Close sign-ups
Otherwise anyone who finds the page can register. Change the environment and restart:
SIGNUPS_ALLOWED: "false" docker compose up -d 5. (Optional) Admin panel with a hashed token
The /admin page lets you invite users and see diagnostics. Don't put a plain-text token in the compose file — hash it:
docker exec -it vaultwarden /vaultwarden hash Paste the resulting $argon2id$... string as ADMIN_TOKEN in the environment (in a compose file, escape each $ as $$), then docker compose up -d.
6. Connect your apps
In any Bitwarden app or extension, choose Self-hosted on the login screen and enter https://vault.example.com.
7. Backups that actually work
Everything lives in vw-data/. Don't just copy a live SQLite file — use SQLite's own backup command, then grab the rest:
apt install -y sqlite3 mkdir -p /root/vw-backup sqlite3 /opt/vaultwarden/vw-data/db.sqlite3 ".backup '/root/vw-backup/db-$(date +%F).sqlite3'" tar czf /root/vw-backup/files-$(date +%F).tgz -C /opt/vaultwarden/vw-data attachments sends config.json rsa_key* 2>/dev/null Put that in a daily cron job and copy /root/vw-backup off the server (another machine, S3-compatible storage, anything). Your apps keep a local copy of the vault, but the server is the source of truth.
8. Updates
cd /opt/vaultwarden && docker compose pull && docker compose up -d Check the project's release notes now and then for breaking changes.
Disclosure: I work on Kvantis, a crypto-paid VPS host. The original, shorter version of this guide is on our blog.

