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.

What's in the stack

How these fit together and where your data lives: Architecture.

core-apiauth.<domain>
Accounts, sign-in, the admin panel, and the discovery file apps read on startup (/.well-known/letschat.json).
SpacetimeDBchat.<domain>
Realtime database for spaces, channels, messages and presence.
LiveKitlk.<domain>
Voice, video and screen sharing.
MinIOfiles.<domain>
File storage. Defaults: 500 MiB per file and 2 GiB per user per day; change them in the admin panel.
Web clientapp.<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

ProblemLikely causeFix
Voice joins but no audioLiveKit media ports not forwardedForward 44382/udp (primary) and 44381/tcp (fallback) to the host
Setup discovery failsauth.<domain> not serving /.well-known/letschat.jsonTunnel: auth → core-api:8787; Caddy: check AUTH_DOMAIN and DNS
Browser or desktop can't upload or download filesMINIO_CORS_ALLOW_ORIGIN narrowed to one originSet it back to *. The desktop app's origin is tauri://localhost, not the web one
Upload/download errorsWrong MINIO_PUBLIC_ENDPOINTSet 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 failsCloudflare proxy enabled, or 80/443 closedUse DNS-only records and open 80/tcp and 443/tcp
LiveKit setup fails immediatelyWrong signalling scheme (ws:// vs wss://)Both paths use wss://lk…; plain ws:// is dev-only
SpacetimeDB connect timeoutmodule-init failed or SpacetimeDB not yet healthyCheck docker logs letschat-module-init; it retries automatically
module-init keeps restarting after an upgradeIts log says the changes will BREAK existing clients; the old module keeps servingRead the release's Breaking Changes notes, then accept once with the break-clients command in docs/DEPLOYMENT.md ("Upgrades that break existing clients")