← Back to Wiki
Self-Hosting / Docker

Self-Host Your Own Password Manager

Vaultwarden is a lightweight, Bitwarden-compatible server — you get all the official Bitwarden apps and browser extensions, pointed at your own infrastructure instead of Bitwarden's cloud. Here's how to run it properly, and how to migrate an existing instance without losing anything.

Why isolate it

If you're already running a pile of Docker containers on a general-purpose NAS or server, it's tempting to just add Vaultwarden as one more container there. The problem: your password vault ends up sharing fate with whatever else that host is doing — unrelated container churn, experiments, reboots — and may not be covered by whatever backup job protects your "real" infrastructure. Give it its own small VM or container, on its own backup schedule, isolated from everything else.

Basic deployment

services:
  vaultwarden:
    image: vaultwarden/server:latest
    restart: unless-stopped
    ports:
      - "80:80"
    volumes:
      - ./data:/data

That's genuinely most of it — Vaultwarden is a single lightweight binary with no external database dependency by default (SQLite).

Migrating an existing vault

If you're moving an existing Vaultwarden instance to new infrastructure, four things actually need to move:

Gotcha: some NAS vendors' rsync binary is setuid-root, and that specifically breaks over SSH. Running rsync from a remote host straight over SSH against a NAS like this can fail immediately with Permission denied, please try again. and a closed connection — the vendor's OS is (correctly) blocking a setuid-root binary from being invoked non-interactively over SSH. Work around it with a tar stream over SSH instead:
ssh <nas> "sudo tar -C /path/to/vaultwarden -cf - --exclude=icon_cache --exclude=tmp ." \
  | tar -C <local-staging> -xf -

Cutover

If your domain is already served through a reverse proxy that terminates TLS and forwards to a backend address, cutover is usually just editing that one rule's backend from the old address to the new one — no DNS change, no new certificate needed. This is the reusable pattern for migrating any already reverse-proxied service: check whether the domain already routes through a reverse proxy before assuming a migration needs new TLS/DNS work.

Before flipping it, confirm the new instance is actually healthy — check its logs for a clean startup message and hit its health-check endpoint (Vaultwarden exposes GET /alive) — then do a real end-to-end login test against the new backend before considering the migration done.

Rollback safety net

Leave the old instance stopped (not deleted) and its data directory untouched for a while after cutover — a cheap, cold rollback path in case something surfaces later that the migration missed.