How to self-host Vaultwarden
Vaultwarden lets you run your own password server and keep using the official Bitwarden apps and browser extensions. This guide uses the Docker Compose + Caddy setup from Vaultwarden's wiki, which handles HTTPS for you.
Steps and prices checked Nov 19, 2026 against the official docs (sources below). Vaultwarden on GitHub: 71.9k stars, AGPL-3.0 license, active, latest release 1.37.5 on Nov 1, 2026 (as of Nov 30, 2026).
Before you start: This server will hold every password you own. Vaultwarden's maintainers say they cannot be held liable for data loss and strongly recommend regular backups. Set up backups before you move your passwords in.
Three ways to run it
| Option | Best for | Cost | How |
|---|---|---|---|
| Railway (one click) | No server to manage. | Hobby plan $5/month minimum, includes $5 of usage | Railway's template runs Vaultwarden with PostgreSQL and asks you for an admin token: deploy Vaultwarden on Railway. |
| DigitalOcean Droplet | Full control on a small, cheap server. | From $4/month (512 MiB) or $6/month (1 GiB) | Create a Droplet with Docker at DigitalOcean, then follow the steps below. |
| Home server or NAS | Free if you already have one. | Free | Same Docker steps; you need a domain and a way to reach it securely over HTTPS. |
What you need
- A domain or subdomain pointed at your server (for example
vault.example.com). The web vault only works over HTTPS. - Docker with Docker Compose.
- Ports 80 and 443 open (Caddy uses port 80 to get its certificate).
Step by step (your own server)
- Create a folder and a compose file. Make a new folder, then create
compose.yamlwith your own domain and email address:services: vaultwarden: image: vaultwarden/server:latest container_name: vaultwarden restart: always environment: DOMAIN: "https://vault.example.com" SIGNUPS_ALLOWED: "true" volumes: - ./vw-data:/data caddy: image: caddy:2 container_name: caddy restart: always ports: - 80:80 - 443:443 - 443:443/udp volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - ./caddy-config:/config - ./caddy-data:/data environment: DOMAIN: "https://vault.example.com" EMAIL: "you@example.com" LOG_FILE: "/data/access.log" - Add the Caddyfile. In the same folder, create
Caddyfile. It reads the domain and email from the compose file, so you do not need to edit it:{$DOMAIN} { log { level INFO output file {$LOG_FILE} { roll_size 10MB roll_keep 10 } } tls {$EMAIL} encode zstd gzip reverse_proxy vaultwarden:80 { header_up X-Real-IP {remote_host} } } - Start it. Only Caddy is exposed to the internet; Vaultwarden stays on a private Docker network.
docker compose up -d - Create your account, then close sign-ups. Open your domain, create your account (and family members' accounts), then change
SIGNUPS_ALLOWEDto"false"incompose.yamland rundocker compose up -dagain. Otherwise anyone who finds the site can register. - Optional: turn on the admin page. The
/adminpage lets you invite users and change settings. Enable HTTPS first, then add anADMIN_TOKENenvironment variable set to a long random string, for example from:openssl rand -base64 32 - Connect the Bitwarden apps. In the official Bitwarden app or browser extension, choose the self-hosted option on the login screen and enter your server URL.
Updating
docker compose pull && docker compose up -dBackups
Back up the vw-data folder regularly and keep at least one copy off the server. With the default SQLite setup it holds the database (db.sqlite3), attachments, sends, the rsa_key files that sign logins, and config.json if you used the admin page. Vaultwarden's wiki advises against relying only on VM snapshots.
What it costs
| 512 MiB DigitalOcean Droplet | $4/month |
|---|---|
| 1 GiB DigitalOcean Droplet | $6/month |
| Railway Hobby plan | $5/month minimum, includes $5 of usage |
| Bitwarden Premium, hosted (for comparison) | $1.65/month ($19.80 billed yearly) |
DigitalOcean Basic Droplet sizes and list prices
| Memory | vCPU | SSD | Price |
|---|---|---|---|
| 512 MiB | 1 vCPU | 10 GiB | $4/month |
| 1 GiB | 1 vCPU | 25 GiB | $6/month |
| 2 GiB | 1 vCPU | 50 GiB | $12/month |
| 2 GiB | 2 vCPUs | 60 GiB | $18/month |
| 4 GiB | 2 vCPUs | 80 GiB | $24/month |
| 8 GiB | 4 vCPUs | 160 GiB | $48/month |
List prices checked Nov 19, 2026; they can change. Some hosting links on this page are affiliate links, which never change what we recommend.
FAQ
Do I need HTTPS for Vaultwarden?
Yes. The web vault needs HTTPS because browsers only allow the Web Crypto API it uses in a secure context. The Caddy setup above gets and renews a certificate automatically.
How do I stop strangers from signing up?
Set SIGNUPS_ALLOWED to false after you create your accounts. An organization owner or admin can still invite people, and the admin page can invite users even with sign-ups off.
Is it cheaper to just pay for Bitwarden?
For one person, often yes: Bitwarden Premium is $1.65/month billed yearly, less than the smallest $4 Droplet. Self-hosting makes more sense for families or groups, if you already run a server, or if you want the data on hardware you control.
Related
Sources
- Vaultwarden README
- Vaultwarden wiki: Using Docker Compose (Caddy example)
- Vaultwarden wiki: Disable registration of new users
- Vaultwarden wiki: Enabling the admin page
- Vaultwarden wiki: Backing up your vault
- Railway Vaultwarden template
- Bitwarden pricing
- Railway pricing
- DigitalOcean Droplet pricing
Commands are adapted from the official docs linked above (example domains replaced with placeholders). Spot something out of date? Tell us at hello@opensourceswap.com.