# 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 # Leave empty to follow PUBLIC_BASE_URL. For multiple trusted browser addresses, # list all exact origins (scheme, host and port), including PUBLIC_BASE_URL. ALLOWED_ORIGINS= # Optional site access password in every environment. Unset or empty allows # entry without a site password; room ownership and invitations still apply. # Non-empty values are matched exactly; spaces and Unicode are supported. SITE_ACCESS_PASSWORD= # Rooms persist in rooms.sqlite under the working directory by default (also # when blank). Set :memory: explicitly for process-memory rooms. Deployments # should use an access-restricted absolute path outside the release directory, # preserving the existing database and its writable parent across updates. ROOM_DATABASE_PATH= # Viewers per room, excluding the Host. Valid range: 1..20; default: 20. MAX_VIEWERS_PER_ROOM=20 # Bounded standard-WebRTC relay/SFU controller is active for every room. # 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 # During pre-release route canaries, this enables sanitized room/ordinal events. # PIIK_DEBUG=route # Optional in-process automatic SFU fallback. Set SFU_UDP_PORT=7882 to enable; # unset or empty disables it and fixes Privacy mode on for every room. # STUN/signaling/P2P remain available. Local App modes never create this listener. # Ingress uses the 9000-room code capacity; egress uses that capacity times the # configured per-room Viewer admission. SFU_UDP_PORT= # IPv4 bind address, independent of HTTP LISTEN_HOST and advertised media IP. SFU_LISTEN_HOST=0.0.0.0 # Optional advertised IPv4 override when the listener's address is behind NAT. SFU_PUBLIC_IP= # Require server media for every room instead of P2P-first. Requires SFU_UDP_PORT. SFU_ONLY=false # Ordinary peer ICE discovery. Production requires at least one STUN URL. # These are advertised addresses, not local listener addresses. They may use # an unproxied DNS name distinct from PUBLIC_BASE_URL. Separate URLs with commas. STUN_URLS= # Hosted STUN is in-process. With STUN_URLS configured, bind this IPv4 address # on UDP 3478 (also 3479/3480 below). It is independent of HTTP LISTEN_HOST. # Local App modes never create these listeners, even with public discovery. STUN_LISTEN_HOST=0.0.0.0 # Optional bounded NAT traversal support. The per-share switch stays visible; # it is locked off when disabled, and defaults on when enabled after all three # local STUN listeners bind. Browser # P2P derives UDP 3479/3480 from the first STUN_URLS endpoint on UDP 3478. # Cloud security-group and host firewall rules must also allow these UDP ports. NAT_PREDICTION_ENABLED=false # Development example (two processes): Vite serves the Browser on 8787 and # proxies /api, /healthz and /signal to the Go server on 8788. Keep # PUBLIC_BASE_URL and ALLOWED_ORIGINS on the Browser origin above. # PIIK_ENV=development # PORT=8788 # Production example (keep any chosen password in an untracked environment): # PIIK_ENV=production # PUBLIC_BASE_URL=https://share.example.com # ALLOWED_ORIGINS=https://share.example.com # SITE_ACCESS_PASSWORD= # STUN_URLS=stun:stun.example.com:3478 # NAT_PREDICTION_ENABLED=true # Automatic SFU fallback (does not replace STUN above): # SFU_UDP_PORT=7882 # SFU_PUBLIC_IP=198.51.100.5 # ENDPOINT_MEDIA_COPY_CAPACITY=2