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
| Name | Purpose | Local default |
|---|---|---|
LIVEKIT_API_KEY | LiveKit API key. | devkey |
LIVEKIT_API_SECRET | LiveKit API secret. Keep it in Worker secrets and never send it to the browser. | the documented local default, not for production |
LIVEKIT_HTTP_URL | Where the Worker reaches LiveKit. | http://127.0.0.1:7880 |
PUBLIC_LIVEKIT_URL | The 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
| Name | Purpose | Local default |
|---|---|---|
EGRESS_OUTPUT_DIR | Where Egress writes recordings inside its container. | /out (mapped to ./data/recordings) |
EGRESS_TEMPLATE_URL | The compositor page Egress opens. | http://127.0.0.1:5173/egress-template |
Destinations
| Name | Purpose | Local default |
|---|---|---|
RTMP_YOUTUBE | Default YouTube destination. | rtmp://127.0.0.1:1935/live/youtube |
RTMP_LINKEDIN | Default LinkedIn destination. | rtmp://127.0.0.1:1935/live/linkedin |
RTMP_X | Default 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
| Name | Purpose | Local default |
|---|---|---|
HOST_KEY_SECRET | Separate HMAC for Worker-to-Durable-Object host keys. Falls back to LIVEKIT_API_SECRET if unset. Set it in production. | unset |
PUBLIC_ORIGIN | Public site URL for magic-link mail, co-host invites and GitHub OAuth. | unset (loopback Host is used) |
CASTHOP_TRUST_FORWARDED | Set to 1 to trust CF-Connecting-IP and X-Forwarded-For behind a reverse proxy. | unset |
CASTHOP_ALLOW_DEV_KEYS | Allow the published dev keypair with a non-loopback LiveKit. Tests only. | unset |
Sign-in
| Name | Purpose | Local default |
|---|---|---|
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | Optional GitHub OAuth. Unset hides the GitHub button. | unset |
MAIL_WEBHOOK_URL | Optional. Casthop POSTs JSON { to, subject, text }. Unset logs the magic link to the Worker console. | unset |
MAIL_WEBHOOK_TOKEN | Optional 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.