# Self-Host Liso on Cloudflare Workers (Free & Unrestricted)

> Last updated: 2026-12-03 | Canonical URL: https://lisovault.com/self-host | License: AGPL-3.0-only

The open-source Liso sync server (`server/sync`) runs on Cloudflare Workers with Durable Objects (`AccountDO`, `VaultDO`, `PairingDO`), D1 (global indexes only), and optional R2 (encrypted 64 KiB file chunks). A personal or family server fits on Cloudflare's Workers Free plan with zero billing code, no license keys, and every Liso feature unlocked free.

## Deploy in 4 Commands

```bash
git clone https://github.com/Liso-Vault/liso.git && cd liso
pnpm install
pnpm --dir server/sync exec wrangler login
selfhost/deploy.sh
```

The script creates your D1 database, applies migrations, deploys the Worker, and prints your server URL, one-time setup code, and scannable QR code. Open Liso, choose **Self-Hosted Server**, scan the QR code or enter your URL and setup code, and create your admin account.

## Registration Control (`REGISTRATION_MODE`)

- `owner` (default): Only the deployment setup code can create the first admin account; after that, only invite codes minted by the admin (`POST /v1/registration-invites`) can register.
- `invite`: Any existing member can mint invite codes.
- `open`: Open registration (not recommended for personal servers).

## Cloudflare Free-Tier Fit

- **Workers Free:** 100,000 requests/day.
- **Durable Objects:** Hibernated WebSockets (1 socket per device to `AccountDO`) incur zero idle duration charges; SQLite-backed `VaultDO` stores ciphertext records and 20-version / 90-day revisions.
- **D1 Free:** Up to 500 MB (indexes only, never on the hot sync path).
- **R2 (Optional):** 10 GB/month free storage with $0 egress. Without R2, the server reports `files: false` and all password/2FA/sharing/CLI/MCP features work normally.

## Self-Hosting FAQ

### How much does it cost to self-host Liso on Cloudflare?

A personal or family Liso sync server fits inside Cloudflare's Workers Free plan (100,000 requests/day, D1 up to 500 MB for global indexes, and Durable Object hibernation so idle WebSocket connections incur no duration charges). If you enable Cloudflare R2 for encrypted file storage, R2 includes 10 GB/month free storage with $0 egress.

### How do I stop strangers from registering on my self-hosted Liso server?

Set REGISTRATION_MODE in wrangler.selfhost.jsonc. The default mode is 'owner': deployment prints a one-time setup code that creates your admin account, and after that nobody else can register unless you mint an invite code. You can also choose 'invite' (any member can mint invites) or 'open'.

### Do I need Cloudflare R2 to self-host Liso?

No. R2 is completely optional. Without an R2 binding, the server reports files: false and all password, 2FA, sharing, CLI, MCP, and sync features work normally. Bind an R2 bucket whenever you want encrypted file storage.

### Are any features paywalled when self-hosting Liso?

None. Self-hosted servers use the open-source AGPL-3.0 PolicyHook default (unrestricted). Built-in 2FA codes, Password Health, breach checks, Emergency Access, unlimited vaults, unlimited sharing, and R2 file storage are all unlocked with zero license keys.
