# ═══════════════════════════════════════════════════════════════ # openvibe.community — Environment Configuration # Copy to .env and fill in values. # In production this lives at /etc/openvibe/community.env (0600). # ═══════════════════════════════════════════════════════════════ # Server PORT=4200 HOST=127.0.0.1 NODE_ENV=development BASE_URL=http://localhost:4200 # Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2) TRUST_PROXY=2 # Identity provider — OpenVibe.Network (OAuth2 authorization server + JWKS) OV_NETWORK_URL=https://openvibe.network OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 # OAuth2 client credentials (client `community` registered in the Network DB, # redirect https://openvibe.community/auth/callback) OV_OAUTH_CLIENT_ID=community OV_OAUTH_CLIENT_SECRET=change-me-to-the-registered-community-secret # Production: https://openvibe.community/auth/callback OV_OAUTH_REDIRECT_URI=http://localhost:4200/auth/callback # Cookies — production default is Secure; set false for plain-http local dev #COOKIE_SECURE=false # OpenVibe.Live — author links, avatars and legal pages (no paste traffic). OV_LIVE_URL=https://openvibe.live # OpenVibe.Media — public host for screenshot bytes OV_MEDIA_URL=https://openvibe.media # Media's internal address: new screenshot uploads go to its file store # with a service token (the OAuth client needs media.object.upload for audience openvibe.media). OV_MEDIA_INTERNAL_URL=http://127.0.0.1:4100 # OpenVibe.VIP: members-only forum spaces and threads. Community asks POST /api/v1/policies/evaluate # with a service token (the OAuth client needs vip.resource.policy.evaluate for audience openvibe.vip). # Without it, or with VIP down, only the owner and moderators get in (fails closed). OV_VIP_INTERNAL_URL=http://127.0.0.1:4620 OV_VIP_URL=https://openvibe.vip # OpenVibe.Chat: a space's chat room. Community asks Chat with the signed-in person's own token whether # they manage the room (no service grant needed); the space page links OV_CHAT_URL/r/. OV_CHAT_INTERNAL_URL=http://127.0.0.1:4400 OV_CHAT_URL=https://openvibe.chat # How long a VIP yes / no / failure is cached (ms); the yes TTL bounds how long access outlives a membership. # VIP_CACHE_TTL_MS=30000 # VIP_CACHE_DENY_TTL_MS=10000 # VIP_CACHE_UNAVAILABLE_TTL_MS=2000 # Pastes are Community's own (native API, pages, raw text); the OAuth client above also needs # identity.subject.resolve (author names). # PostgreSQL (ADR-035), written by OpenVibe.Host roles/data/add-service.sh community: the runtime role through # PgBouncer, the owner on a direct connection (migrations), and Valkey (shared limit counters). Pastes, comments, # the forum, Pulse and the relay's bookkeeping live there. Without # DATABASE_URL, development uses an embedded PGlite database in data/pglite. DATABASE_URL= DATABASE_DIRECT_URL= VALKEY_URL= VALKEY_PREFIX= # Optional salt for hashed visitor ids in view counting (default: derived from the client secret) #VIEW_HASH_SECRET= # Per-actor limits (server/actor-limits.js): reads one caller (a person, a service or app acting as # itself, else an address) may make to one API per minute and per hour; past them 429 rate_limited # with Retry-After. Writes have their own numbers (README). The per-address /api/ limit stays. #COMMUNITY_LIMITS_MINUTE=120 #COMMUNITY_LIMITS_HOUR=3000 # Browser origins allowed to call /api/v1/comments and /api/v1/pulse with a Bearer Network JWT #API_CORS_ORIGINS=https://openvibe.live,https://openvibe.media,https://openvibe.network,https://openvibe.tools,https://openvibe.games # Discord relay (outbound: new threads in mapped spaces → a Discord webhook). Off by default. # Mappings (POST /api/v1/relay/mappings, staff) name an ENVIRONMENT VARIABLE that holds the # webhook URL — the URL itself never goes into the database. #DISCORD_RELAY_ENABLED=true #DISCORD_WEBHOOK_FEEDBACK=https://discord.com/api/webhooks// # Variables a mapping may name: DISCORD_WEBHOOK_* unless this lists the exact names. #DISCORD_RELAY_WEBHOOK_VARS=DISCORD_WEBHOOK_FEEDBACK,DISCORD_WEBHOOK_GENERAL #DISCORD_RELAY_POLL_MS=30000 #DISCORD_RELAY_BACKOFF_MS=30000 #DISCORD_RELAY_MAX_ATTEMPTS=6