Daily Meet Wiki / Environment variables

Environment variables

Full reference for the backend and Admin Panel. Source of truth for local dev is backend/.env.example; live values are Railway variables per environment, never committed to either repo.

Never put a real value for anything marked secret in a file, chat message, or this wiki. Set secrets directly in the Railway dashboard or via railway variables --set. .railway/railway.ts keeps every secret as preserve() — literal values live only in Railway.

shared = same value in both testing and production today. per-env = deliberately different per environment. This is the current state, not a rule — see Third-party services for which shared ones are expected to split later (payment keys).

Core & environment identity

VariablePurposeStatus
ENVIRONMENTGates environment-specific behavior in code — e.g. disables the free-wallet-credit Test Store endpoint when set to productionper-envstaging / production
APP_NAMEDisplay name used in a few backend responsesshared
API_V1_PREFIXAPI route prefix, default /api/v1shared
DATABASE_URLPostgres connection string (asyncpg form)per-env secret — points at each environment's own database
DB_AUTO_CREATE_TABLESCreate tables on startup if missingshared

Auth & Admin cookies

VariablePurposeStatus
JWT_SECRET_KEYSigns User/Host access & refresh tokensshared secret
JWT_ALGORITHMDefault HS256shared
ACCESS_TOKEN_EXPIRE_MINUTES / REFRESH_TOKEN_EXPIRE_DAYSToken lifetimesshared
ADMIN_API_TOKENAdmin service-to-service authshared secret
ADMIN_PANEL_ORIGINExpected Admin Panel origin (currently unused by CORS — CORS_ALLOWED_ORIGINS is *)per-env — the Admin Panel URL for that environment
ADMIN_ACCESS_COOKIE_NAME / ADMIN_CSRF_COOKIE_NAMECookie names for Admin session/CSRFshared
ADMIN_COOKIE_SECURERequire HTTPS-only cookiessharedfalse on backend, true on admin-panel in both environments (pre-existing asymmetry, not something this wiki fixed)
ADMIN_LOGIN_MAX_ATTEMPTS / ADMIN_LOGIN_WINDOW_MINUTESAdmin login rate limitingshared
AUTH_RATE_LIMIT_MAX_ATTEMPTS / AUTH_RATE_LIMIT_WINDOW_SECONDSUser/Host auth rate limitingshared
OTP_* (cooldown, max per day/IP/global, lockout, code validity, allowed country codes)OTP send/verify throttlingshared
TRUSTED_PROXY_HOPSHow many reverse-proxy hops to trust for client IPshared

Firebase

VariablePurposeStatus
FIREBASE_PROJECT_ID / FIREBASE_SERVICE_ACCOUNT_PATH / FIREBASE_SERVICE_ACCOUNT_JSON / FIREBASE_CHECK_REVOKEDUser App's Firebase Admin credentials (project vibeconnect-7c601)shared secret
HOST_FIREBASE_PROJECT_ID / HOST_FIREBASE_SERVICE_ACCOUNT_PATH / HOST_FIREBASE_SERVICE_ACCOUNT_JSON / HOST_FIREBASE_CHECK_REVOKEDHost App's Firebase Admin credentials (project hostvibeconnect)shared secret

These are the backend's Firebase Admin credentials (token verification, server-side push) — separate from the client apps' Firebase config, which is per build-flavor; see App identifiers.

OTP provider

VariablePurposeStatus
MSG91_AUTHKEYAlternate OTP provider to Firebase, selectable per-app from Admin Panel (App Config → OTP Provider). Only required when that toggle is set to msg91 — the widget's own ID/token are Admin-managed, not env varsshared secret

Public URLs & CORS

VariablePurposeStatus
CORS_ALLOWED_ORIGINSAllowed CORS origins for the APIshared — currently * in both environments
PUBLIC_SITE_BASE_URLBase URL used to build public links — legal document pages (privacy policy, terms, etc.) and the Cashfree payment return URLper-env — that environment's own backend URL
DAILY_MEET_API_BASE_URL (Admin Panel service, not backend)Which backend the Admin Panel proxies requests toper-env

Calls, RTC & realtime

VariablePurposeStatus
AGORA_APP_ID / AGORA_APP_CERTIFICATEAgora call providershared secret (App ID itself isn't secret, certificate is)
AGORA_RTC_TOKEN_TTL_SECONDS / AGORA_RTC_TOKEN_REFRESH_THRESHOLD_SECONDSAgora token lifetime/refresh windowshared
STREAM_API_KEY / STREAM_SECRET_KEYGetStream Video — used for video calls only, until the self-hosted WebRTC video path is fixed (audio calls use webrtc/Agora)shared secret
CLOUDFLARE_TURN_KEY_ID / CLOUDFLARE_TURN_API_TOKEN / CLOUDFLARE_TURN_CREDENTIAL_TTL_SECONDSPreferred TURN path for the self-hosted webrtc providershared secret
RTC_SIGNALING_TOKEN_TTL_SECONDSSignaling JWT lifetime for self-hosted WebRTCshared
CALL_RINGING_TIMEOUT_SECONDS / CALL_RECONNECT_GRACE_SECONDS / CALL_CONNECT_TIMEOUT_SECONDS / CALL_HEARTBEAT_TIMEOUT_SECONDSCall lifecycle timeoutsshared
CALL_BILLING_SWEEP_ENABLED / CALL_BILLING_SWEEP_INTERVAL_SECONDSBackground call-billing workershared
CHAT_RECHARGE_GRACE_SECONDSGrace period for low-balance chatshared
MODERATION_EVIDENCE_MAX_CHARACTERS / MODERATION_DEDUPLICATION_WINDOW_SECONDSCall Safety text moderation limitsshared

Payments

VariablePurposeStatus
RAZORPAY_KEY_ID / RAZORPAY_KEY_SECRET / RAZORPAY_WEBHOOK_SECRETRazorpay recharge provider — mode is auto-detected from the key prefix (rzp_test_ vs rzp_live_), no separate flagexpected to split, currently shared secret — production still holds testing's sandbox keys
CASHFREE_APP_ID / CASHFREE_SECRET_KEY / CASHFREE_WEBHOOK_SECRETCashfree recharge providerexpected to split, currently shared secret — same as Razorpay
CASHFREE_ENVIRONMENTExplicit sandbox/production flag (Cashfree app IDs aren't prefix-distinguishable the way Razorpay's are)expected to split, currently sharedsandbox in both environments today
REVENUECAT_WEBHOOK_AUTHORIZATIONValidates incoming RevenueCat/IAP webhooksshared secret

Security

VariablePurposeStatus
BANK_ENCRYPTION_KEYEncrypts Host payout bank account numbers at restshared secret

Private documents (KYC, proofs)

VariablePurposeStatus
PRIVATE_DOCUMENT_STORAGE_BACKEND / PRIVATE_DOCUMENT_STORAGE_PATHWhere KYC/proof files live — local filesystem backend, backed by the private-documents Railway volumeshared in config; the underlying volume is per-environment (each environment has its own)
PRIVATE_DOCUMENT_SIGNED_URL_TTL_SECONDSHow long a signed access URL is validshared
PRIVATE_DOCUMENT_MAX_BYTES / PRIVATE_DOCUMENT_ALLOWED_CONTENT_TYPESUpload limitsshared

Cleanup & retention

VariablePurposeStatus
CLEANUP_ON_STARTUPRun cleanup routines on bootsharedfalse
DOCUMENT_RETENTION_DAYS / NOTIFICATION_RETENTION_DAYS / DEVICE_TOKEN_STALE_DAYSHow long old records are kept before cleanupshared
ACCOUNT_DELETION_SWEEP_ENABLED / ACCOUNT_DELETION_SWEEP_INTERVAL_SECONDSBackground account-deletion workershared

Full source

backend/.env.example is the canonical, commented list for local development — this page mirrors it plus the live Railway per-environment facts. If they ever disagree, trust .env.example for what a variable does and railway variables --service <name> --environment <env> for its current live value.