we earn commissions when you shop through the links below

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

OptionBest forCostHow
Railway (one click)No server to manage.Hobby plan $5/month minimum, includes $5 of usageRailway's template runs Vaultwarden with PostgreSQL and asks you for an admin token: deploy Vaultwarden on Railway.
DigitalOcean DropletFull 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 NASFree if you already have one.FreeSame Docker steps; you need a domain and a way to reach it securely over HTTPS.

What you need

Step by step (your own server)

  1. Create a folder and a compose file. Make a new folder, then create compose.yaml with 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"
  2. 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}
      }
    }
  3. Start it. Only Caddy is exposed to the internet; Vaultwarden stays on a private Docker network.
    docker compose up -d
  4. Create your account, then close sign-ups. Open your domain, create your account (and family members' accounts), then change SIGNUPS_ALLOWED to "false" in compose.yaml and run docker compose up -d again. Otherwise anyone who finds the site can register.
  5. Optional: turn on the admin page. The /admin page lets you invite users and change settings. Enable HTTPS first, then add an ADMIN_TOKEN environment variable set to a long random string, for example from:
    openssl rand -base64 32
  6. 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 -d

Backups

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
MemoryvCPUSSDPrice
512 MiB1 vCPU10 GiB$4/month
1 GiB1 vCPU25 GiB$6/month
2 GiB1 vCPU50 GiB$12/month
2 GiB2 vCPUs60 GiB$18/month
4 GiB2 vCPUs80 GiB$24/month
8 GiB4 vCPUs160 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

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.