Verified 2026-12-03 · Serverless Self-Hosting Tutorial · Cloudflare Workers
How to Self-Host a Zero-Knowledge Password Manager on Cloudflare Workers Free
Most self-hosted password managers require an always-on Linux VPS, Docker Compose, reverse proxy, TLS certificate automation, and database backups. Liso's official AGPL-3.0 sync server (server/sync) runs natively on Cloudflare Workers Free using per-account and per-vault SQLite Durable Objects, D1 lookup indexes, and optional R2 storage (10 GB/mo free, $0 egress)—with zero paywalls, zero license keys, and every Liso 2 feature unlocked free.
Step-by-step setup (5 steps)
Clone Liso and install dependencies
Ensure Node.js 24+, pnpm 12, and a free Cloudflare account are ready, then clone the public Liso-Vault/liso repository.
git clone https://github.com/Liso-Vault/liso.git
cd liso
pnpm installAuthenticate Wrangler with Cloudflare
Log in with Cloudflare's official Wrangler CLI so selfhost/deploy.sh can provision your D1 database and deploy the Worker.
pnpm --dir server/sync exec wrangler loginRun selfhost/deploy.sh to provision & deploy
The script creates your D1 index database, runs SQL migrations, generates random signing secrets, deploys the Worker with AccountDO/VaultDO/PairingDO Durable Objects in REGISTRATION_MODE=owner, and prints a one-time setup code and QR code.
selfhost/deploy.sh
# Optional: custom Worker name or dry run first
# selfhost/deploy.sh --name my-liso-vault --dry-runOptionally enable Cloudflare R2 for encrypted files
R2 is optional—without it, passwords, 2FA, sharing, CLI, and MCP work immediately. To enable encrypted 64 KiB chunked file storage (10 GB/mo free, $0 egress), create an R2 bucket and uncomment the r2_buckets binding in selfhost/wrangler.selfhost.jsonc before redeploying.
pnpm --dir server/sync exec wrangler r2 bucket create liso-vault-files
# Uncomment the r2_buckets block in selfhost/wrangler.selfhost.jsonc, then redeploy:
selfhost/deploy.shConnect Liso apps, extension, and CLI
Open Liso on Web (app.lisovault.com), iOS, Android, macOS, or CLI, pick Self-Hosted Server, scan your printed QR code (or paste your Worker URL + one-time setup code), and save your Emergency Kit PDF.
# Verify your deployed server health & capabilities
curl -sS https://<your-worker>.workers.dev/v1/metaSecurity model & threat defenses
| Threat / Scenario | How Liso 2 mitigates it |
|---|---|
| Unauthorized strangers try to register on your public *.workers.dev URL | Default REGISTRATION_MODE=owner accepts only the one-time setup code printed at deploy time. After creating your admin account, new accounts require explicit invite codes you mint. |
| Cloudflare or an attacker inspects D1, Durable Objects, or R2 | Vault records, titles, 2FA secrets, notes, and 64 KiB file chunks are encrypted on your device with XChaCha20-Poly1305 before upload. The server never receives your master password, recovery phrase, or plaintext keys. |
| Idle WebSocket connections blow through free-tier Durable Object limits | AccountDO uses Cloudflare WebSocket Hibernation (1 hibernated socket per active device), incurring zero duration charges while idle. |
| Cost surprises from file downloads across devices | Cloudflare R2 charges $0 egress and includes 10 GB/month free storage—making personal and family encrypted file syncing free. |