Case study · Self-hosted password manager

The problem, the limitations, the infrastructure, and what I learned.

← All projects
SELF-HOSTED PASSWORD MANAGER · stable

VAULTWARDEN

Vaultwarden in Docker on a Proxmox VM, published through a Cloudflare Tunnel with no open ports. Works with the official Bitwarden extensions across four browsers, syncs every device, and keeps multi-user vaults cryptographically segregated.

proxmoxdockercloudflare-tunnelvaultwardenbackup
OUTCOME

A documented threat model, verified security claims, and a backup proven by a rehearsed restore, not assumed.

// problem

Run a password manager at home with zero inbound exposure, real multi-user isolation, and a backup whose restore has actually been tested.

// limitations

  • No inbound firewall rule anywhere on the network.
  • Cloudflare sees request metadata, never secrets. Vault items are encrypted on-device.
  • Safari supported with no paid Apple Developer account.

// infrastructure used

  • Docker runs in a dedicated Debian VM, not on the Proxmox host or in an LXC, for a clean blast radius and whole-host snapshots.
  • Vaultwarden publishes no host port. It sits on an internal Docker network only cloudflared can reach, which dials out to Cloudflare.
  • Cloudflare Access gates only /admin, so Bitwarden extensions and mobile apps can still complete their login flow.
  • Nightly backup uses sqlite3 .backup, encrypts with age, and ships off-box. The restore is rehearsed and logged.

// lessons learned

  1. 01
    Protecting the whole site broke every client.

    The browser extensions and mobile apps can't complete an interactive login, so the extra identity check now covers only the admin page.

  2. 02
    Compose ate the admin token.

    The hashed token contains $ signs, which Compose treats as variables. Single-quoting it in the environment file fixed the rejected logins.

  3. 03
    Scripts edited on Windows failed on Linux.

    Windows line endings broke the shell scripts. A .gitattributes rule now forces Unix line endings.

  4. 04
    Two-factor codes were always rejected.

    The VM's clock had drifted. The preflight check now verifies time sync before anything is deployed.

  5. 05
    Clients logged in to the wrong server.

    Each app must be pointed at the self-hosted server before the first login, or it tries the public service. The setup guide now leads with that step.

View source ↗