Skip to content

MiroTalk LK configuration

All settings are environment variables, read from .env in the project root. .env.example lists them all (commented lines are optional); copy it to .env to get started. This page is the full reference.

App

Variable Default Description
PORT / HOST 3030 / 0.0.0.0 HTTP listen address
NODE_ENV development production enables caching & strict key checks
TRUST_PROXY false Set true behind a reverse proxy (correct IPs and https://), or the proxy's addresses (e.g. loopback, uniquelocal, IPs or CIDRs) so only it is trusted
APP_BIND_ADDRESS 127.0.0.1 Address docker-compose.yml publishes the app's port on; 0.0.0.0 to reach it from other machines without the proxy
COMPOSE_PROFILES – Optional services a plain docker compose up -d starts, comma-separated: recording, captions, whisper (see Self-hosting)

LiveKit (required)

Variable Default Description
LIVEKIT_URL ws://localhost:7880 LiveKit URL as seen by the browser (wss:// in prod)
LIVEKIT_API_URL LIVEKIT_URL as http(s) LiveKit URL as seen by the Node server (server API)
LIVEKIT_API_KEY / LIVEKIT_API_SECRET – LiveKit credentials (secret ≥ 32 chars in prod)
LIVEKIT_NODE_IP 127.0.0.1 Public IP announced by LiveKit (docker-compose), see other devices

Security

Variable Default Description
TOKEN_TTL 6h Access token lifetime
RATE_LIMIT_WINDOW_MS / RATE_LIMIT_MAX 60000 / 30 Token endpoint rate limit per IP

Embedding

Variable Default Description
EMBED_ALLOWED_ORIGINS – (this site) Comma-separated origins that may show the app in an <iframe>, see Embedding

Host sign-in

Variable Default Description
HOST_USERS – user:pass,... – only these users can start meetings (passwords plain, or hashed with npm run hash-password; see Host sign-in for Docker)
HOST_SESSION_HOURS 12 Host sign-in session lifetime
SESSION_SECRET LIVEKIT_API_SECRET Signs host sessions (≥ 32 chars in production). Changing it signs every host out; set it so rotating the LiveKit keys doesn't

Single sign-on (OIDC)

Variable Default Description
OIDC_ISSUER – Single sign-on for hosts (OpenID Connect), see single sign-on
OIDC_CLIENT_ID / OIDC_CLIENT_SECRET – The app's client at the provider (no secret for a public client, which then relies on PKCE)
OIDC_ALLOWED_USERS – Required with OIDC_ISSUER: alice@example.com,@example.com,... (@domain = whole domain, * = anyone)
OIDC_PROVIDER_NAME SSO Shown on the button: Sign in with …
OIDC_SCOPES openid email profile Scopes requested from the provider
OIDC_REDIRECT_URL page origin + callback https://<app>/api/auth/oidc/callback, if the app can't tell its public URL

Meetings

Variable Default Description
MAX_MEETING_MINUTES 0 (no limit) End meetings after N minutes, see time limit

Recording: LiveKit Egress

Variable Default Description
RECORDING_ENABLED false Let hosts record on the server (requires the egress service)
RECORDING_LAYOUT grid grid, speaker, single-speaker, grid-light, speaker-light
RECORDING_QUALITY 720p 720p, 1080p or audio (OGG, no video encoding)
EGRESS_CPUS 2 CPU cap for the egress container (docker-compose)
RECORDING_DIR /out Local output dir inside the egress container (→ ./recordings)

Live streaming

Variable Default Description
STREAMING_ENABLED false Let hosts stream the meeting live to YouTube, Twitch, Facebook or any RTMP(S) server (requires the egress service)
STREAMING_LAYOUT RECORDING_LAYOUT or grid grid, speaker, single-speaker, grid-light, speaker-light
STREAMING_QUALITY 720p 720p or 1080p
STREAMING_ALLOWED_HOSTS – (any public host) Only stream to these hosts: host names, *.domain or IPs, comma-separated (see Where streams may go)

Recording storage: S3

Variable Default Description
S3_BUCKET / S3_REGION / S3_ENDPOINT – Upload recordings (server and uploaded in-browser ones) to S3-compatible storage instead of local disk
S3_ACCESS_KEY / S3_SECRET_KEY – S3 credentials (leave empty to use an IAM role)
S3_FORCE_PATH_STYLE false true for MinIO and most self-hosted S3

Recording: in the host's browser

Variable Default Description
CLIENT_RECORDING_ENABLED true Let hosts record the meeting in their browser (no egress needed)
CLIENT_RECORDING_UPLOADS true Let hosts upload in-browser recordings to this server (while recording or when finished)
CLIENT_RECORDING_DIR ./recordings Where the app saves uploaded in-browser recordings (unless S3_BUCKET is set)
CLIENT_RECORDING_MAX_MB 4096 Largest in-browser recording the server accepts, in MB
CLIENT_RECORDING_MAX_UPLOADS 20 Most uploads in progress at once (more are refused until one finishes)
CLIENT_RECORDING_MIN_FREE_MB 1024 Disk space always left free: uploads pause (the browser retries) while less would remain; 0 = no check
CLIENT_RECORDING_STAGING auto Where uploads in progress collect: disk (CLIENT_RECORDING_DIR), s3 (S3_BUCKET), or auto: s3 when distributed with S3_BUCKET, disk otherwise (Scaling)

Whiteboard

Variable Default Description
WHITEBOARD_ENABLED true Let hosts open the shared whiteboard (Excalidraw) for everyone

Live captions

Variable Default Description
CAPTIONS_ENABLED false Show the host's Captions button (requires the captions agent)
CAPTIONS_AGENT_NAME mirotalk-lk-captions Agent name the app dispatches (app and agent must match)
CAPTIONS_IDLE_PROCESSES 1 Agent: processes kept warm so captions start quickly (0–64)
STT_PROVIDER whisper Captions speech-to-text: whisper, openai or deepgram
STT_MODEL per provider Systran/faster-whisper-small, gpt-4o-mini-transcribe, nova-3
STT_LANGUAGE en Spoken language code, or auto to detect it
STT_API_KEY – API key for openai, deepgram or a hosted Whisper API
STT_BASE_URL bundled whisper Another OpenAI-compatible Whisper server (e.g. Groq)
WHISPER_INTERIM_S 2 Whisper: re-transcribe the sentence being spoken every N s (0 off)
WHISPER_URL http://whisper:8000/v1 Self-hosted Whisper the agent uses when STT_BASE_URL is empty
WHISPER_CPUS / WHISPER_IMAGE 2 / Speaches CPU image Self-hosted Whisper container CPU cap and image (docker-compose)

Webhooks

Variable Default Description
WEBHOOK_URLS – Comma-separated URLs that get webhooks
WEBHOOK_SECRET – Signs webhooks (X-MiroTalk-Signature); ≥ 16 chars in prod
WEBHOOK_EVENTS all room.started, room.ended, recording.finished, stream.finished

Metrics

Variable Default Description
METRICS_ENABLED false Expose Prometheus metrics at GET /metrics
METRICS_TOKEN – Require Authorization: Bearer <token> on /metrics

Analytics

Variable Default Description
STATS_ENABLED false Add a web analytics script (Umami or compatible), see Analytics
STATS_SRC / STATS_ID – Tracker script URL and website ID (data-website-id)
Variable Default Description
OG_ENABLED true Add link preview tags (Open Graph / Twitter Card), see Link previews
OG_URL request address Public URL of the app, used for absolute preview URLs
OG_SITE_NAME / OG_TITLE / OG_DESCRIPTION MiroTalk LK texts Site name, title and description shown in link previews
OG_IMAGE / OG_IMAGE_ALT /images/og-image.jpg Preview image (path on this server or http(s) URL) and its alt text
OG_TWITTER_SITE – X (Twitter) @handle of the site (twitter:site)

Error tracking

Variable Default Description
SENTRY_DSN – Report server errors to Sentry, Better Stack or GlitchTip, see Error tracking
SENTRY_ENVIRONMENT / SENTRY_RELEASE NODE_ENV / app version Environment and release attached to error reports
SENTRY_SAMPLE_RATE 1 Share of errors to report (0–1)

Logging

Variable Default Description
LOG_LEVEL info debug, info, warn, error, silent
LOG_FORMAT json in production json (log collectors) or pretty

Horizontal scaling

Off by default: one app instance keeps its state in memory. See Scaling for several app instances, a LiveKit cluster and dedicated Egress / captions workers.

Variable Default Description
SCALING_MODE standalone standalone (one instance, state in memory) or distributed (any number of instances behind a load balancer, sharing their state in Redis)
REDIS_URL – redis://[:password@]host:6379 or rediss:// (TLS); required when distributed
REDIS_KEY_PREFIX mirotalk-lk: Prefix of the app's Redis keys, e.g. to share a Redis with LiveKit or another app
INSTANCE_ID host name This instance's name in logs
APP_REPLICAS 2 App instances docker-compose.scale.yml runs on one host

TURN/TLS add-on (docker-compose.turn.yml)

Variable Default Description
APP_DOMAIN / LIVEKIT_DOMAIN / TURN_DOMAIN – Domains for the optional TURN/TLS add-on (docker-compose.turn.yml)