# Application # Use 127.0.0.1 instead when only a same-host reverse proxy should connect. LISTEN_HOST=0.0.0.0 PORT=8787 # For LAN viewers, replace localhost with this computer's LAN address. PUBLIC_BASE_URL=http://localhost:8787 # Include both the host browser origin and PUBLIC_BASE_URL when they differ. ALLOWED_ORIGINS=http://localhost:8787 # Production-required site access secret. Local development/tests may leave it # empty. A non-empty value must contain 8-128 visible ASCII bytes (0x21-0x7e). SITE_ACCESS_PASSWORD= # Dormant rooms remain resumable by the exact Host token for this lease. # Active sharing does not expire; process restart clears every room. ROOM_LEASE_SECONDS=86400 MAX_ROOMS=1000 MAX_VIEWERS_PER_ROOM=8 # Bounded standard-WebRTC relay/SFU controller for every room when true. # Keep false outside measured tests. PEER_ASSISTED_MEDIA=false # One steady outbound media-copy capacity for every non-server endpoint. # A peer child or Host SFU publication consumes one copy. Valid values: 1, 2, 3. ENDPOINT_MEDIA_COPY_CAPACITY=2 # Optional automatic SFU fallback. Set PEER_ASSISTED_MEDIA=true and supply all # six values together; leaving them empty keeps LiveKit completely dormant. # Capacities have no defaults and must come from this deployment's measurements. # Production requires wss and an independent API secret of 32+ bytes. LIVEKIT_URL= LIVEKIT_API_URL= LIVEKIT_API_KEY= LIVEKIT_API_SECRET= SFU_INGRESS_CAPACITY= SFU_EGRESS_CAPACITY= # Optional one-shot TURN/UDP transport for a controller-selected edge after # peer and SFU recovery are exhausted. Set all four values together. # SELECTED_EDGE_TURN_URLS=turn:turn.example.com:3478?transport=udp # SELECTED_EDGE_TURN_SHARED_SECRET=replace-with-32-or-more-independent-random-bytes # SELECTED_EDGE_TURN_CREDENTIAL_TTL_SECONDS=120 # SELECTED_EDGE_TURN_ALLOCATION_CAPACITY=replace-with-measured-positive-integer # Ordinary peer ICE discovery. Production requires at least one STUN URL. # Separate multiple URLs with commas. STUN_URLS= # Minimal production example (use independent untracked secrets): # SITE_ACCESS_PASSWORD=replace-with-an-independent-access-key # STUN_URLS=stun:stun.example.com:3478 # Automatic SFU fallback (requires PEER_ASSISTED_MEDIA=true and does not # replace STUN above): # LIVEKIT_URL=wss://share.example.com # LIVEKIT_API_URL=http://127.0.0.1:7880 # LIVEKIT_API_KEY=replace-with-a-livekit-api-key # LIVEKIT_API_SECRET=replace-with-at-least-32-independent-random-bytes # SFU_INGRESS_CAPACITY=replace-with-measured-positive-integer # SFU_EGRESS_CAPACITY=replace-with-measured-positive-integer # ENDPOINT_MEDIA_COPY_CAPACITY=2