Operate

Configuration

Environment variables for docker compose and the Worker, with their local defaults.

Copy .env.example to .env for docker compose, and .dev.vars.example to .dev.vars for the Worker. In production, set the Worker values as Worker secrets or vars instead.

The casthop_dev_secret_… value in the example files is a documented local default. It is public, so it is not for production. Generate your own keys with lk generate-keys.

LiveKit

NamePurposeLocal default
LIVEKIT_API_KEYLiveKit API key.devkey
LIVEKIT_API_SECRETLiveKit API secret. Keep it in Worker secrets and never send it to the browser.the documented local default, not for production
LIVEKIT_HTTP_URLWhere the Worker reaches LiveKit.http://127.0.0.1:7880
PUBLIC_LIVEKIT_URLThe LiveKit URL browsers connect to.ws://127.0.0.1:7880

The Worker returns 503 if devkey is used with a non-loopback LiveKit URL. CASTHOP_ALLOW_DEV_KEYS=1 overrides this and exists for tests only.

Egress

NamePurposeLocal default
EGRESS_OUTPUT_DIRWhere Egress writes recordings inside its container./out (mapped to ./data/recordings)
EGRESS_TEMPLATE_URLThe compositor page Egress opens.http://127.0.0.1:5173/egress-template

Destinations

NamePurposeLocal default
RTMP_YOUTUBEDefault YouTube destination.rtmp://127.0.0.1:1935/live/youtube
RTMP_LINKEDINDefault LinkedIn destination.rtmp://127.0.0.1:1935/live/linkedin
RTMP_XDefault X destination.rtmp://127.0.0.1:1935/live/x

These are local MediaMTX stand-ins. Replace them with real ingest URLs when you have them, and do not commit real stream keys.

Worker

NamePurposeLocal default
HOST_KEY_SECRETSeparate HMAC for Worker-to-Durable-Object host keys. Falls back to LIVEKIT_API_SECRET if unset. Set it in production.unset
PUBLIC_ORIGINPublic site URL for magic-link mail, co-host invites and GitHub OAuth.unset (loopback Host is used)
CASTHOP_TRUST_FORWARDEDSet to 1 to trust CF-Connecting-IP and X-Forwarded-For behind a reverse proxy.unset
CASTHOP_ALLOW_DEV_KEYSAllow the published dev keypair with a non-loopback LiveKit. Tests only.unset

Sign-in

NamePurposeLocal default
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRETOptional GitHub OAuth. Unset hides the GitHub button.unset
MAIL_WEBHOOK_URLOptional. Casthop POSTs JSON { to, subject, text }. Unset logs the magic link to the Worker console.unset
MAIL_WEBHOOK_TOKENOptional token for the mail webhook.unset

Stream keys

Stream keys are not environment variables. They live in Durable Object storage, never in the repo. The public API only returns a masked suffix such as rtmp://…/xxxx, plus a hasKey flag.

Esc to close · ↑ ↓ to move · Enter to open