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)

Step 1

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 install
Step 2

Authenticate 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 login
Step 3

Run 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-run
Step 4

Optionally 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.sh
Step 5

Connect 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/meta

Security model & threat defenses

Threat / ScenarioHow Liso 2 mitigates it
Unauthorized strangers try to register on your public *.workers.dev URLDefault 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 R2Vault 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 limitsAccountDO uses Cloudflare WebSocket Hibernation (1 hibernated socket per active device), incurring zero duration charges while idle.
Cost surprises from file downloads across devicesCloudflare R2 charges $0 egress and includes 10 GB/month free storage—making personal and family encrypted file syncing free.

Related guides & documentation

Cloudflare Self-Host Guide FAQ

Common setup, security, and compatibility questions.

Does self-hosting Liso on Cloudflare really cost $0/month?

Yes for personal and family use. Cloudflare Workers Free includes 100,000 requests/day, SQLite Durable Objects with WebSocket hibernation, D1 up to 500 MB, and optional R2 with 10 GB/month free storage and $0 egress.

How do I invite my spouse or family members to my self-hosted server?

In default REGISTRATION_MODE=owner, your admin account can mint one-time invite codes via POST /v1/registration-invites (or switch to REGISTRATION_MODE=invite so any member can invite others). Each family member gets their own zero-knowledge account and recovery phrase.

Can I use the official App Store, Google Play, and app.lisovault.com apps with my self-hosted Worker?

Yes. Every official Liso app, browser extension, and the liso CLI supports choosing a custom Self-Hosted Server URL (and turns off all Liso Cloud billing code when pointed at a self-hosted server).

How does this compare to self-hosting Vaultwarden in Docker?

Cloudflare Workers eliminates Linux VPS costs, Docker management, reverse proxies, and TLS renewals, and stays 100% aligned with Liso's official clients. If you specifically want air-gapped LAN-only Docker hosting without Cloudflare, see our Liso vs Vaultwarden comparison.