Reference for server/.env. The committed server/.env.example is the source of truth — this page mirrors it and groups by purpose.
| Variable | Default | Notes |
|---|
DATABASE_DRIVER | postgres | postgres or sqlite. |
POSTGRES_HOST | 127.0.0.1 | |
POSTGRES_PORT | 5432 | |
POSTGRES_DATABASE | replayvod | |
POSTGRES_USER | postgres | |
POSTGRES_PASSWORD | (empty) | |
POSTGRES_SSL_MODE | disable | disable, require, verify-ca, verify-full. |
SQLITE_PATH | ./data/replayvod.db | Used when DATABASE_DRIVER=sqlite. |
| Variable | Default | Notes |
|---|
TWITCH_CLIENT_ID | (empty) | Required. From the Twitch dev console. |
TWITCH_SECRET | (empty) | Required. |
HMAC_SECRET | (auto) | Optional. EventSub HMAC secret. Seeds the database on first run if set; otherwise one is generated and stored there. Ignored on later boots. |
TWITCH_SERVICE_ACCOUNT_REFRESH_TOKEN | (empty) | Optional. Refresh token for an authenticated playback account. Unlocks ad-free recording on Turbo accounts and HEVC on channels that gate it behind authentication. |
| Variable | Default | Notes |
|---|
HOST | 0.0.0.0 | Bind address. |
PORT | 8080 | HTTP port. |
| Variable | Default | Notes |
|---|
SESSION_SECRET | (empty) | Required. 32+ bytes used to encrypt the session store. |
WHITELIST_ENABLED | false | Restrict sign-in to a known list of Twitch user IDs. |
WHITELISTED_USER_IDS | (empty) | Comma-separated Twitch user IDs. |
OWNER_TWITCH_ID | (empty) | Numeric Twitch user ID granted the owner role on first sign-in. |
| Variable | Default | Notes |
|---|
CALLBACK_URL | http://localhost:8080/api/v1/auth/twitch/callback | OAuth redirect. Must match the Twitch app config. |
WEBHOOK_CALLBACK_URL | (empty) | Direct EventSub callback. Used only with SERVER_MODE=direct; must be public HTTPS. |
FRONTEND_URL | http://localhost:3000 | CORS allow-list entry. Set to the recorder’s own URL in production. |
| Variable | Default | Notes |
|---|
SERVER_MODE | (empty) | Empty means configure server mode in the owner dashboard. Complete env config wins over app settings. Values: off, poll, direct, relay. |
| Variable | Default | Notes |
|---|
RELAY_INGEST_URL | (empty) | Public HTTPS relay URL Twitch posts to. Required with SERVER_MODE=relay. |
RELAY_SUBSCRIBE_URL | (empty) | WebSocket URL the recorder dials outbound. Required with SERVER_MODE=relay. |
RELAY_LOCAL_CALLBACK_URL | (empty) | Where the relay agent replays signed EventSub frames. Defaults to http://127.0.0.1:${PORT}/api/v1/webhook/callback. Must stay on loopback. |
| Variable | Default | Notes |
|---|
PUBLIC_BASE_URL | http://localhost:8080 | Compose derives CALLBACK_URL and FRONTEND_URL from this. |
COMPOSE_PROFILES | sqlite | sqlite or postgres. Without this (or an explicit --profile flag), docker compose up does nothing. |
| Variable | Default | Notes |
|---|
VIDEO_DIR | ./data/videos | Where finished MP4s are stored (local backend). |
THUMBNAIL_DIR | ./data/thumbnails | Where thumbnails are stored. |
SCRATCH_DIR | ./data/.scratch | In-progress segments. Must be on the same filesystem as VIDEO_DIR. |
DASHBOARD_DIR | (empty) | Path to the built dashboard. The Docker image sets this automatically. |