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 (2026-10-04), not a rule. Payment keys were split per environment when production went live on 2026-10-01.

Core & environment identity

VariablePurposeStatus
ENVIRONMENTGates environment-specific behavior in code — e.g. disables the free-wallet-credit Test Store endpoint when set to productionper-env — staging / 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 cookiesshared — false 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_AUTHKEYMSG91 account key. The OTP provider is chosen in Admin (App Config → OTP Provider); both environments currently use msg91_server, where the backend calls MSG91's OTP Widget API with the widget ID + token stored in Admin config (per environment database, not env vars). A 401 AuthenticationFailure from MSG91 means a disabled/old widget token in Admin, not a code bugshared 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_KEYStream Video — the current call provider for audio and video (Admin RTC provider = stream). The backend issues call-scoped Stream tokens; one Stream app ("Daily-meet", region Mumbai) serves both environmentsshared secret
CLOUDFLARE_TURN_KEY_ID / CLOUDFLARE_TURN_API_TOKEN / CLOUDFLARE_TURN_CREDENTIAL_TTL_SECONDSTURN for the self-hosted webrtc provider — legacy: that provider was removed from the apps, so this only matters if it is ever revivedshared secret
RTC_SIGNALING_TOKEN_TTL_SECONDSSignaling JWT lifetime for self-hosted WebRTC (legacy, see above)shared
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 flagper-env secret — live keys in both environments (testing since 2026-09-30, production since 2026-10-01); each environment has its own webhook
CASHFREE_APP_ID / CASHFREE_SECRET_KEY / CASHFREE_WEBHOOK_SECRETCashfree recharge providerper-env secret — production: live keys, webhook https://api.dailymeet.in/api/v1/wallet/cashfree/webhook; testing: sandbox, setup still pending
CASHFREE_ENVIRONMENTExplicit sandbox/production flag (Cashfree app IDs aren't prefix-distinguishable the way Razorpay's are)per-env — production on production, sandbox on testing
REVENUECAT_WEBHOOK_AUTHORIZATIONValidates incoming RevenueCat/IAP webhooksshared secret

Which provider is active is not an env var: Admin → App Configuration → Payments picks exactly one (testing: Razorpay, production: Cashfree). Cashfree production also requires the Android package to be whitelisted in the Cashfree dashboard, and it refuses checkout from sideloaded (non-Play) installs.

Email (Resend)

VariablePurposeStatus
RESEND_API_KEYResend HTTP API key for outgoing email (today: the ops alert on every new support ticket). Email is silently skipped when unsetshared secret
EMAIL_FROM_ADDRESS / EMAIL_FROM_NAMESender — must be on dailymeet.in, which is verified in Resend (DKIM records in Cloudflare DNS)shared
SUPPORT_TICKET_NOTIFICATION_EMAILWhere new-ticket alerts go; falls back to EMAIL_FROM_ADDRESSshared

Railway blocks outbound SMTP ports, which is why email goes over Resend's HTTPS API rather than SMTP.

Leftovers kept on purpose

These exist as Railway variables and are listed as preserve() in .railway/railway.ts, but current code does not read them: SMTP_USERNAME/SMTP_PASSWORD (the abandoned SMTP attempt), ADMIN_SIGNUP_ALLOWED_PHONES, TURN_URLS/TURN_SHARED_SECRET/TURN_CREDENTIAL_TTL_SECONDS/RTC_STUN_URLS (old coturn config). They stay in railway.ts because a variable that exists in Railway but is missing from the file is deleted by the next railway config apply. Remove one only deliberately, from both Railway and the file.

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 bootshared — false
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.