openvibers/openvibe.chat .env.example
.env.example
| 1 | # ═══════════════════════════════════════════════════════════════ |
| 2 | # openvibe.chat — Environment Configuration |
| 3 | # Copy to .env and fill in values. |
| 4 | # In production this lives at /etc/openvibe/chat.env (0600). |
| 5 | # ═══════════════════════════════════════════════════════════════ |
| 6 | |
| 7 | # Server (loopback only: nginx sends /ws/chat and the chat REST prefixes here) |
| 8 | PORT=4400 |
| 9 | HOST=127.0.0.1 |
| 10 | NODE_ENV=development |
| 11 | # The public origin browsers use — chat is served on Live's origin. |
| 12 | BASE_URL=http://localhost:3000 |
| 13 | # Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2), as Live |
| 14 | TRUST_PROXY=2 |
| 15 | # Extra origins for WebSocket upgrades / credentialed CORS (Live's exact ones are built in). |
| 16 | # Exact origins only, no wildcard: list any *.openvibe.tools satellite that embeds chat. |
| 17 | #ALLOWED_ORIGINS=https://example.openvibe.tools |
| 18 | |
| 19 | # Per-actor limits on the REST API (server/net/actor-limits.js): reads one caller (a person, else an |
| 20 | # address) may make to one API per minute and per hour; past them 429 rate_limited with Retry-After. |
| 21 | # Writes and expensive reads have their own numbers (README). The per-address /api/ limit stays. |
| 22 | #CHAT_LIMITS_MINUTE=120 |
| 23 | #CHAT_LIMITS_HOUR=3000 |
| 24 | |
| 25 | # Chat's caches (101soundboards clips, TTS preview clips). Default: ./data/cache |
| 26 | #CHAT_CACHE_DIR=./data/cache |
| 27 | |
| 28 | # Identity — OpenVibe.Network (user JWTs and service tokens are RS256 from here) |
| 29 | OV_NETWORK_URL=https://openvibe.network |
| 30 | OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 |
| 31 | # Actor agents in channels are on unless the owner turns them off in Chat settings. |
| 32 | # This env setting is an operator override that keeps them on. |
| 33 | #CHAT_ACTOR_MEMBERS=0 |
| 34 | # V3 slash commands and server emoji are on by default; set either to 0 to turn it off. |
| 35 | #CHAT_SLASH_COMMANDS_ENABLED=1 |
| 36 | #CHAT_SERVER_EMOJI_ENABLED=1 |
| 37 | # Forum and stage channels are on by default; the owner can turn either off in Chat settings. |
| 38 | # Vibe model comparison: AI's catalogue and runs, Exchange's old chat export, and optional Bench preferences. |
| 39 | #OV_AI_INTERNAL_URL=http://127.0.0.1:4700 |
| 40 | #OV_EXCHANGE_INTERNAL_URL=http://127.0.0.1:5150 |
| 41 | #OV_BENCH_URL=https://bench.openvibe.services |
| 42 | # PEM with the Network public key; unset = fetched from ${OV_NETWORK_INTERNAL_URL}/api/.well-known/jwks |
| 43 | #OV_NETWORK_PUBLIC_KEY=/opt/openvibe.live/data/keys/openvibe-tools-public.pem |
| 44 | |
| 45 | # Chat's service principal (client `chat`; on the Network host, load Network's env before the |
| 46 | # script and write the secret here: sudo node --env-file=/etc/openvibe/network.env |
| 47 | # server/setup/service-principal.js create chat --write-env /etc/openvibe/chat.env) |
| 48 | OV_OAUTH_CLIENT_ID=chat |
| 49 | OV_OAUTH_CLIENT_SECRET=written-by-service-principal-js |
| 50 | |
| 51 | # openvibe.party, Watch Together's host, served by this process by the Host header |
| 52 | # (server/web/party-pages.js): its own host-only session, on a second redirect URI of the same client |
| 53 | # (<CHAT_PARTY_URL>/auth/callback, seeded in Network). Production: openvibe.party. |
| 54 | #CHAT_PARTY_HOST=openvibe.party |
| 55 | #CHAT_PARTY_URL=https://openvibe.party |
| 56 | #CHAT_PARTY_OAUTH_REDIRECT_URI=https://openvibe.party/auth/callback |
| 57 | # The same random value must be set as CONNECT_PARTY_SHARED_SECRET in Connect. |
| 58 | #CHAT_PARTY_CONNECT_SECRET= |
| 59 | # OpenVibe's own computers for party desktops (server/rooms/party-pool.js). The switch is the owner's, in the |
| 60 | # party_pool_settings row (off until the owner turns it on at openvibe.party/pool). CHAT_PARTY_POOL=1 is an |
| 61 | # operator override for a development box. The windows are when a hold nobody renewed goes idle, and how long |
| 62 | # a place in line lasts. |
| 63 | #CHAT_PARTY_POOL=0 |
| 64 | #CHAT_PARTY_POOL_IDLE_MS=600000 |
| 65 | #CHAT_PARTY_POOL_QUEUE_MS=1800000 |
| 66 | #CHAT_PARTY_POOL_MAX_PER_ACTOR=2 |
| 67 | #CHAT_PARTY_POOL_MAX_QUEUE=50 |
| 68 | |
| 69 | # OpenVibe.Live — every Live-owned read and side effect (server/live-context.js) |
| 70 | OV_LIVE_INTERNAL_URL=http://127.0.0.1:3000 |
| 71 | #LIVE_TIMEOUT_MS=4000 |
| 72 | # /ready reads the Live sync degraded once its last clean pass is older than this (ms) |
| 73 | #LIVE_SYNC_STALE_MS=60000 |
| 74 | |
| 75 | # Chat preferences in the OpenVibe.Network user module chat.preferences (grants: chat network.modules.read |
| 76 | # and network.modules.write on chat.preferences, audience openvibe.network). Cached per person (ms). |
| 77 | #CHAT_PREFS_ENABLED=1 |
| 78 | #CHAT_PREFS_TTL_MS=60000 |
| 79 | #CHAT_PREFS_TIMEOUT_MS=3000 |
| 80 | #CHAT_PREFS_CACHE_MAX=5000 |
| 81 | |
| 82 | # OpenVibe.VIP — member badges on chat messages (grant: chat vip.entitlement.check openvibe.vip). |
| 83 | # Cache lifetimes (ms): a badge outlives a membership by at most CHAT_VIP_BADGE_TTL_MS after VIP |
| 84 | # stops granting; a "no" is re-asked after the deny TTL, a failure after the unavailable TTL. |
| 85 | #CHAT_VIP_BADGES=1 |
| 86 | #OV_VIP_INTERNAL_URL=http://127.0.0.1:4620 |
| 87 | #VIP_TIMEOUT_MS=1500 |
| 88 | #CHAT_VIP_BADGE_TTL_MS=60000 |
| 89 | #CHAT_VIP_BADGE_DENY_TTL_MS=30000 |
| 90 | #CHAT_VIP_BADGE_UNAVAILABLE_TTL_MS=5000 |
| 91 | |
| 92 | # OpenVibe.Events — the outbox relays only when set (otherwise events wait in events_outbox) |
| 93 | #EVENTS_URL=http://127.0.0.1:4300 |
| 94 | #EVENTS_RELAY_INTERVAL_MS=5000 |
| 95 | # Events consumer: POST /internal/events receives Chat's subscriptions (live.release.deployed → the |
| 96 | # deploy card; network.module.updated → the chat.preferences cache). Signature v2 under this secret |
| 97 | # (32+ characters: openssl rand -hex 32; comma-separate a second one while rotating — the FIRST is |
| 98 | # the one handed to Events). Unset = the route answers 503 and no subscription is made. |
| 99 | #CHAT_EVENTS_SECRET= |
| 100 | # Boot creates the subscriptions when missing (needs EVENTS_URL, the secret, OV_OAUTH_CLIENT_SECRET |
| 101 | # and the Network grant chat events.subscription.manage on openvibe.events); 0 = leave them alone. |
| 102 | #CHAT_EVENTS_SUBSCRIBE=1 |
| 103 | # Where Events delivers (default http://127.0.0.1:$PORT/internal/events) |
| 104 | #CHAT_EVENTS_ENDPOINT=http://127.0.0.1:4400/internal/events |
| 105 | |
| 106 | # Channel sounds: the SAME directory as Live's (stored rows hold absolute paths into it and Live's |
| 107 | # donation alerts read alert sounds from it). Production: /opt/openvibe.live/data/sounds |
| 108 | SOUNDS_PATH=./data/sounds |
| 109 | #MAX_SOUND_SIZE_KB=2048 |
| 110 | #SOUND_DEFAULT_MAX_SECONDS=10 |
| 111 | #MAX_SOUNDS_PER_CHANNEL=150 |
| 112 | #MAX_SOUNDS_PER_UPLOADER_PER_CHANNEL=10 |
| 113 | |
| 114 | # Voice/video calls (server/calls/, Live's call server moved): off until the calls cutover |
| 115 | # (docs/calls-cutover.md). Off = /api/streams/… 404, /ws/call refused, /internal/calls/* 409. |
| 116 | #CHAT_CALLS=1 |
| 117 | # Pictures in rooms and channels go to OpenVibe.Pics as the person, through MediaHub on this host (off when unset). |
| 118 | #CHAT_PICS_INTERNAL_URL=http://127.0.0.1:4990 |
| 119 | #CHAT_PICS_MAX_BYTES=20971520 |
| 120 | # A direct call nobody answers is missed after this long (ms); the caller hears "no answer". |
| 121 | #CALL_RING_TIMEOUT_MS=45000 |
| 122 | # ICE for calls (GET /api/chat/ice-servers; openvibe.chat's call rooms): STUN always, TURN when set. |
| 123 | # With TURN_AUTH_SECRET (coturn use-auth-secret, the same value as Live's) credentials expire after an |
| 124 | # hour; otherwise the static pair. Production: the same TURN_URL / TURN_AUTH_SECRET as live.env. |
| 125 | # Party desktops require turns: over TLS on port 443 and TURN_AUTH_SECRET. |
| 126 | #TURN_URL=turns:turn.openvibe.live:443 |
| 127 | #TURN_AUTH_SECRET= |
| 128 | #TURN_USERNAME= |
| 129 | #TURN_CREDENTIAL= |
| 130 | # Where a room's Community attachments link (room settings page). |
| 131 | #OV_COMMUNITY_URL=https://openvibe.community |
| 132 | |
| 133 | # Your agent in Telegram, Discord and Slack (agent plan A4; docs/chat-apps.md). Each app is OFF |
| 134 | # until its own bot token and its own secret are here. Buttons are signed with |
| 135 | # CHAT_APPS_CALLBACK_SECRET: a long random string of its own, never an app token. |
| 136 | # The owner can enter the bot details in the admin panel's Setup tab instead (chat.apps, sealed): a |
| 137 | # value entered there wins and these stay the fallback. When neither has CHAT_APPS_CALLBACK_SECRET or |
| 138 | # CHAT_TELEGRAM_SECRET_TOKEN, Chat makes them once and keeps them sealed in chat.apps. |
| 139 | #CHAT_APPS_CALLBACK_SECRET= |
| 140 | #CHAT_TELEGRAM_BOT_TOKEN= |
| 141 | #CHAT_TELEGRAM_SECRET_TOKEN= |
| 142 | #CHAT_TELEGRAM_USERNAME= |
| 143 | #CHAT_DISCORD_BOT_TOKEN= |
| 144 | #CHAT_DISCORD_PUBLIC_KEY= |
| 145 | #CHAT_DISCORD_APPLICATION_ID= |
| 146 | #CHAT_SLACK_BOT_TOKEN= |
| 147 | #CHAT_SLACK_TEAM_ID= |
| 148 | #CHAT_SLACK_SIGNING_SECRET= |
| 149 | # Where a person confirms /link while signed in to OpenVibe.Network |
| 150 | #CHAT_LINK_CONFIRM_URL=https://openvibe.network/chat-apps/link |
| 151 | #CHAT_LINK_TTL_MS=600000 |
| 152 | #CHAT_CALLBACK_TTL_MS=1800000 |
| 153 | #CHAT_APPS_RATE_PER_HOUR=20 |
| 154 | #CHAT_APPS_PER_USER_RATE_PER_HOUR=10 |
| 155 | |
| 156 | |
| 157 | # Voice keys (D11 owner settings): the admin panel's chat.voices namespace wins; these are the fallback |
| 158 | # when no value was entered there, and the last fallback is Live's old tts_* site setting. |
| 159 | #CHAT_POLLY_ACCESS_KEY_ID= |
| 160 | #CHAT_POLLY_SECRET_ACCESS_KEY= |
| 161 | #CHAT_POLLY_REGION=us-east-1 |
| 162 | #CHAT_GOOGLE_SERVICE_ACCOUNT_JSON= |
| 163 | |
| 164 | # Optional diagnostics |
| 165 | #DEBUG_DM_DELIVERY=1 |
| 166 |