Skip to content

Environment Variables

All configuration lives in docker/.env. Copy .env.example and fill in the required values.

Required Variables

Domain & TLS

VariableExampleDescription
DOMAINrtc.example.comYour public domain. Caddy uses this for TLS.
CADDY_EMAILadmin@example.comEmail for Let's Encrypt certificate registration.

RTCstack API

VariableExampleDescription
API_KEYmy-api-keyKey your backend sends in X-Api-Key.
API_SECRET32-char-randomHMAC secret for request signing. Use openssl rand -hex 32.

LiveKit

VariableExampleDescription
LIVEKIT_API_KEYdevkeyLiveKit API key (matches livekit.yaml).
LIVEKIT_API_SECRET32-char-secretLiveKit API secret. Use openssl rand -hex 32.
LIVEKIT_RTC_EXTERNAL_IP203.0.113.10Public IP for ICE candidates. Required for non-localhost.
LIVEKIT_WSS_URLwss://rtc.example.com/livekitFull WSS URL returned in token responses.

Redis

VariableExampleDescription
REDIS_PASSWORDchangemeRedis requirepass value.

MinIO / S3

VariableExampleDescription
MINIO_ROOT_USERminioadminMinIO root user.
MINIO_ROOT_PASSWORDchangemeMinIO root password.
MINIO_BUCKETrtcstack-recordingsBucket for recordings. Created automatically on first start.
S3_ACCESS_KEYminioadminSame as MINIO_ROOT_USER for local. Use IAM key for AWS S3.
S3_SECRET_KEYchangemeSame as MINIO_ROOT_PASSWORD for local.
S3_ENDPOINThttp://minio:9000Internal MinIO endpoint. Set to "" for AWS S3.
S3_REGIONus-east-1Region. Any value works for local MinIO.

coturn

VariableExampleDescription
TURN_SECRET32-char-randomShared HMAC secret for coturn auth. Use openssl rand -hex 32.
TURN_REALMrtc.example.comTURN realm — typically your domain.

Optional Variables

Transcription Add-on

VariableDefaultDescription
TRANSCRIPTION_LIVE_ENABLEDfalseEnable live transcription endpoints.
TRANSCRIPTION_POST_ENABLEDfalseEnable post-call transcription queue.

Token TTL

VariableDefaultDescription
TOKEN_TTL_SECONDS21600LiveKit JWT lifetime (default 6 hours).

Generating Secrets

bash
# API secret
openssl rand -hex 32

# LiveKit secret
openssl rand -hex 32

# TURN secret
openssl rand -hex 32

Never commit .env to version control. The .gitignore excludes it by default.

Using AWS S3 Instead of MinIO

Set these values in .env:

dotenv
S3_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
S3_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
S3_ENDPOINT=
S3_REGION=us-east-1
MINIO_BUCKET=my-recordings-bucket

Leave S3_ENDPOINT empty — the SDK uses the default AWS endpoint when it's blank.