# ═══════════════════════════════════════════════════════════════ # openvibe.chat — Environment Configuration # Copy to .env and fill in values. # In production this lives at /etc/openvibe/chat.env (0600). # ═══════════════════════════════════════════════════════════════ # Server (loopback only: nginx sends /ws/chat and the chat REST prefixes here) PORT=4400 HOST=127.0.0.1 NODE_ENV=development # The public origin browsers use — chat is served on Live's origin. BASE_URL=http://localhost:3000 # Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2), as Live TRUST_PROXY=2 # Extra origins for WebSocket upgrades / credentialed CORS (Live's exact ones are built in). # Exact origins only, no wildcard: list any *.openvibe.tools satellite that embeds chat. #ALLOWED_ORIGINS=https://example.openvibe.tools # Per-actor limits on the REST API (server/net/actor-limits.js): reads one caller (a person, else an # address) may make to one API per minute and per hour; past them 429 rate_limited with Retry-After. # Writes and expensive reads have their own numbers (README). The per-address /api/ limit stays. #CHAT_LIMITS_MINUTE=120 #CHAT_LIMITS_HOUR=3000 # Chat's caches (101soundboards clips, TTS preview clips). Default: ./data/cache #CHAT_CACHE_DIR=./data/cache # Identity — OpenVibe.Network (user JWTs and service tokens are RS256 from here) OV_NETWORK_URL=https://openvibe.network OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 # Actor agents in channels are on unless the owner turns them off in Chat settings. # This env setting is an operator override that keeps them on. #CHAT_ACTOR_MEMBERS=0 # V3 slash commands and server emoji are on by default; set either to 0 to turn it off. #CHAT_SLASH_COMMANDS_ENABLED=1 #CHAT_SERVER_EMOJI_ENABLED=1 # Forum and stage channels are on by default; the owner can turn either off in Chat settings. # Vibe model comparison: AI's catalogue and runs, Exchange's old chat export, and optional Bench preferences. #OV_AI_INTERNAL_URL=http://127.0.0.1:4700 #OV_EXCHANGE_INTERNAL_URL=http://127.0.0.1:5150 #OV_BENCH_URL=https://bench.openvibe.services # PEM with the Network public key; unset = fetched from ${OV_NETWORK_INTERNAL_URL}/api/.well-known/jwks #OV_NETWORK_PUBLIC_KEY=/opt/openvibe.live/data/keys/openvibe-tools-public.pem # Chat's service principal (client `chat`; on the Network host, load Network's env before the # script and write the secret here: sudo node --env-file=/etc/openvibe/network.env # server/setup/service-principal.js create chat --write-env /etc/openvibe/chat.env) OV_OAUTH_CLIENT_ID=chat OV_OAUTH_CLIENT_SECRET=written-by-service-principal-js # openvibe.party, Watch Together's host, served by this process by the Host header # (server/web/party-pages.js): its own host-only session, on a second redirect URI of the same client # (/auth/callback, seeded in Network). Production: openvibe.party. #CHAT_PARTY_HOST=openvibe.party #CHAT_PARTY_URL=https://openvibe.party #CHAT_PARTY_OAUTH_REDIRECT_URI=https://openvibe.party/auth/callback # The same random value must be set as CONNECT_PARTY_SHARED_SECRET in Connect. #CHAT_PARTY_CONNECT_SECRET= # OpenVibe's own computers for party desktops (server/rooms/party-pool.js). The switch is the owner's, in the # party_pool_settings row (off until the owner turns it on at openvibe.party/pool). CHAT_PARTY_POOL=1 is an # operator override for a development box. The windows are when a hold nobody renewed goes idle, and how long # a place in line lasts. #CHAT_PARTY_POOL=0 #CHAT_PARTY_POOL_IDLE_MS=600000 #CHAT_PARTY_POOL_QUEUE_MS=1800000 #CHAT_PARTY_POOL_MAX_PER_ACTOR=2 #CHAT_PARTY_POOL_MAX_QUEUE=50 # OpenVibe.Live — every Live-owned read and side effect (server/live-context.js) OV_LIVE_INTERNAL_URL=http://127.0.0.1:3000 #LIVE_TIMEOUT_MS=4000 # /ready reads the Live sync degraded once its last clean pass is older than this (ms) #LIVE_SYNC_STALE_MS=60000 # Chat preferences in the OpenVibe.Network user module chat.preferences (grants: chat network.modules.read # and network.modules.write on chat.preferences, audience openvibe.network). Cached per person (ms). #CHAT_PREFS_ENABLED=1 #CHAT_PREFS_TTL_MS=60000 #CHAT_PREFS_TIMEOUT_MS=3000 #CHAT_PREFS_CACHE_MAX=5000 # OpenVibe.VIP — member badges on chat messages (grant: chat vip.entitlement.check openvibe.vip). # Cache lifetimes (ms): a badge outlives a membership by at most CHAT_VIP_BADGE_TTL_MS after VIP # stops granting; a "no" is re-asked after the deny TTL, a failure after the unavailable TTL. #CHAT_VIP_BADGES=1 #OV_VIP_INTERNAL_URL=http://127.0.0.1:4620 #VIP_TIMEOUT_MS=1500 #CHAT_VIP_BADGE_TTL_MS=60000 #CHAT_VIP_BADGE_DENY_TTL_MS=30000 #CHAT_VIP_BADGE_UNAVAILABLE_TTL_MS=5000 # OpenVibe.Events — the outbox relays only when set (otherwise events wait in events_outbox) #EVENTS_URL=http://127.0.0.1:4300 #EVENTS_RELAY_INTERVAL_MS=5000 # Events consumer: POST /internal/events receives Chat's subscriptions (live.release.deployed → the # deploy card; network.module.updated → the chat.preferences cache). Signature v2 under this secret # (32+ characters: openssl rand -hex 32; comma-separate a second one while rotating — the FIRST is # the one handed to Events). Unset = the route answers 503 and no subscription is made. #CHAT_EVENTS_SECRET= # Boot creates the subscriptions when missing (needs EVENTS_URL, the secret, OV_OAUTH_CLIENT_SECRET # and the Network grant chat events.subscription.manage on openvibe.events); 0 = leave them alone. #CHAT_EVENTS_SUBSCRIBE=1 # Where Events delivers (default http://127.0.0.1:$PORT/internal/events) #CHAT_EVENTS_ENDPOINT=http://127.0.0.1:4400/internal/events # Channel sounds: the SAME directory as Live's (stored rows hold absolute paths into it and Live's # donation alerts read alert sounds from it). Production: /opt/openvibe.live/data/sounds SOUNDS_PATH=./data/sounds #MAX_SOUND_SIZE_KB=2048 #SOUND_DEFAULT_MAX_SECONDS=10 #MAX_SOUNDS_PER_CHANNEL=150 #MAX_SOUNDS_PER_UPLOADER_PER_CHANNEL=10 # Voice/video calls (server/calls/, Live's call server moved): off until the calls cutover # (docs/calls-cutover.md). Off = /api/streams/… 404, /ws/call refused, /internal/calls/* 409. #CHAT_CALLS=1 # Pictures in rooms and channels go to OpenVibe.Pics as the person, through MediaHub on this host (off when unset). #CHAT_PICS_INTERNAL_URL=http://127.0.0.1:4990 #CHAT_PICS_MAX_BYTES=20971520 # A direct call nobody answers is missed after this long (ms); the caller hears "no answer". #CALL_RING_TIMEOUT_MS=45000 # ICE for calls (GET /api/chat/ice-servers; openvibe.chat's call rooms): STUN always, TURN when set. # With TURN_AUTH_SECRET (coturn use-auth-secret, the same value as Live's) credentials expire after an # hour; otherwise the static pair. Production: the same TURN_URL / TURN_AUTH_SECRET as live.env. # Party desktops require turns: over TLS on port 443 and TURN_AUTH_SECRET. #TURN_URL=turns:turn.openvibe.live:443 #TURN_AUTH_SECRET= #TURN_USERNAME= #TURN_CREDENTIAL= # Where a room's Community attachments link (room settings page). #OV_COMMUNITY_URL=https://openvibe.community # Your agent in Telegram, Discord and Slack (agent plan A4; docs/chat-apps.md). Each app is OFF # until its own bot token and its own secret are here. Buttons are signed with # CHAT_APPS_CALLBACK_SECRET: a long random string of its own, never an app token. # The owner can enter the bot details in the admin panel's Setup tab instead (chat.apps, sealed): a # value entered there wins and these stay the fallback. When neither has CHAT_APPS_CALLBACK_SECRET or # CHAT_TELEGRAM_SECRET_TOKEN, Chat makes them once and keeps them sealed in chat.apps. #CHAT_APPS_CALLBACK_SECRET= #CHAT_TELEGRAM_BOT_TOKEN= #CHAT_TELEGRAM_SECRET_TOKEN= #CHAT_TELEGRAM_USERNAME= #CHAT_DISCORD_BOT_TOKEN= #CHAT_DISCORD_PUBLIC_KEY= #CHAT_DISCORD_APPLICATION_ID= #CHAT_SLACK_BOT_TOKEN= #CHAT_SLACK_TEAM_ID= #CHAT_SLACK_SIGNING_SECRET= # Where a person confirms /link while signed in to OpenVibe.Network #CHAT_LINK_CONFIRM_URL=https://openvibe.network/chat-apps/link #CHAT_LINK_TTL_MS=600000 #CHAT_CALLBACK_TTL_MS=1800000 #CHAT_APPS_RATE_PER_HOUR=20 #CHAT_APPS_PER_USER_RATE_PER_HOUR=10 # Voice keys (D11 owner settings): the admin panel's chat.voices namespace wins; these are the fallback # when no value was entered there, and the last fallback is Live's old tts_* site setting. #CHAT_POLLY_ACCESS_KEY_ID= #CHAT_POLLY_SECRET_ACCESS_KEY= #CHAT_POLLY_REGION=us-east-1 #CHAT_GOOGLE_SERVICE_ACCOUNT_JSON= # Optional diagnostics #DEBUG_DM_DELIVERY=1