Self-host LetsChat
One Docker Compose stack runs chat, sign-in, voice and file storage. People connect with the desktop app, or in the browser if you host the web client. Pick how HTTPS reaches your server, then follow that guide.
Choose a deployment path
Both paths deploy the same stack. They differ only in how traffic reaches it.
Path A
Cloudflare Tunnel
Web traffic reaches your server through a Cloudflare Tunnel, so nothing listens on 80/443. Only the two LiveKit media ports are forwarded.
Best for home servers where you'd rather not expose a web server directly.
No open 80/443Cloudflare ingressRead the guide →
Path B
Caddy reverse proxy
Caddy runs on your host, gets TLS certificates automatically and routes each hostname to its container.
Best for servers with a public IP where opening 80/443 is fine.
Direct HTTPSAutomatic TLSRead the guide →
What's in the stack
How these fit together and where your data lives: Architecture.
- core-api
auth.<domain> - Accounts, sign-in, the admin panel, and the discovery file apps read on startup (/.well-known/letschat.json).
- SpacetimeDB
chat.<domain> - Realtime database for spaces, channels, messages and presence.
- LiveKit
lk.<domain> - Voice, video and screen sharing.
- MinIO
files.<domain> - File storage. Defaults: 500 MiB per file and 2 GiB per user per day; change them in the admin panel.
- Web client
app.<domain> - Optional browser client, so people can join without installing the desktop app.
- PostgreSQLinternal
- Accounts and an archive copy of every message, kept current by the archive worker.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Voice joins but no audio | LiveKit media ports not forwarded | Forward 44382/udp (primary) and 44381/tcp (fallback) to the host |
| Setup discovery fails | auth.<domain> not serving /.well-known/letschat.json | Tunnel: auth → core-api:8787; Caddy: check AUTH_DOMAIN and DNS |
| Browser or desktop can't upload or download files | MINIO_CORS_ALLOW_ORIGIN narrowed to one origin | Set it back to *. The desktop app's origin is tauri://localhost, not the web one |
| Upload/download errors | Wrong MINIO_PUBLIC_ENDPOINT | Set it to the public https://files… endpoint clients can reach |
Upload part fails with 413 (tunnel) | Cloudflare caps each proxied request body at 100 MB (Free/Pro) | Keep the multipart part size at or below 90 MiB in the admin panel. Older clients send one PUT and stay subject to the cap |
| Caddy certificate issuance fails | Cloudflare proxy enabled, or 80/443 closed | Use DNS-only records and open 80/tcp and 443/tcp |
| LiveKit setup fails immediately | Wrong signalling scheme (ws:// vs wss://) | Both paths use wss://lk…; plain ws:// is dev-only |
| SpacetimeDB connect timeout | module-init failed or SpacetimeDB not yet healthy | Check docker logs letschat-module-init; it retries automatically |
module-init keeps restarting after an upgrade | Its log says the changes will BREAK existing clients; the old module keeps serving | Read the release's Breaking Changes notes, then accept once with the break-clients command in docs/DEPLOYMENT.md ("Upgrades that break existing clients") |