Skip to content

Environment Variables

All frontend environment variables are prefixed with VITE_ and accessible at build time via import.meta.env.

Frontend (.env)

Required

VariableDescriptionExample
VITE_SUPABASE_URLSupabase API URLhttps://xyz.supabase.co
VITE_SUPABASE_ANON_KEYSupabase anonymous keyeyJhbGc...
VITE_INSTANCE_DOMAINInstance domain (no protocol)har.mony.lol
VITE_INSTANCE_NAMEDisplay name for the instanceHarmony
VITE_APP_URLFull app URL for CORS and redirectshttps://har.mony.lol

Feature Flags

VariableDefaultDescription
VITE_ENABLE_FEDERATIONfalseEnable ActivityPub federation
VITE_ENABLE_VOICEfalseEnable voice/video channels
VITE_ENABLE_E2E_ENCRYPTIONfalseEnable end-to-end encryption
VITE_ENABLED_OAUTH_PROVIDERS""OAuth providers (e.g., google,github,twitch)

Federation

VariableDescription
VITE_DOMAINDomain used for ActivityPub actor URIs (set same as VITE_INSTANCE_DOMAIN)
VITE_FEDERATION_API_URLFederation API base URL (e.g., https://har.mony.lol)

Voice/Video

VariableDescription
VITE_LIVEKIT_URLLiveKit WebSocket URL (e.g., wss://live.har.mony.lol)

Push Notifications

VariableDescription
VITE_VAPID_PUBLIC_KEYVAPID public key for web push

Media

VariableDescription
VITE_TENOR_API_KEYTenor API key for GIF search

Debugging

VariableDefaultDescription
VITE_DEBUG_LOGGINGfalseEnable debug logging
VITE_DEBUG_FEDERATIONfalseFederation debug output
VITE_DEBUG_VOICEfalseVoice/WebRTC debug output
VITE_DEV_MODEfalseDevelopment mode flag

Other

VariableDescription
VITE_HARMONY_ALT_DOMAINSComma-separated alternate domains for embed detection

Federation Backend (federation-backend/.env)

Copy from federation-backend/env.template.

Required

VariableDescriptionExample
SUPABASE_URLSupabase API URLhttps://xyz.supabase.co
SUPABASE_ANON_KEYSupabase anonymous keyeyJhbGc...
SUPABASE_SERVICE_ROLE_KEYSupabase service role keyeyJhbGc...
INSTANCE_DOMAINInstance domain (no protocol)har.mony.lol
CORS_ORIGINFrontend origin for CORShttps://har.mony.lol

Job Queue (pg-boss)

VariableDescription
DATABASE_URLPostgreSQL connection string for pg-boss queue
USE_PGBOSS_QUEUEtrue to enable reliable job queue (recommended)

Optional

VariableDescription
PORTServer port (default: 3001)
NODE_ENVdevelopment or production
INSTANCE_NAMEDisplay name
INSTANCE_DESCRIPTIONInstance description
REDIS_URLRedis URL for caching (e.g., redis://localhost:6379)
LOG_LEVELerror, warn, info, or debug
RATE_LIMIT_WINDOW_MSRate limit window
RATE_LIMIT_MAX_REQUESTSMax requests per window
REQUIRE_VALID_SIGNATURESEnforce HTTP signature validation

Voice/Video (LiveKit)

VariableDescription
LIVEKIT_API_KEYLiveKit API key
LIVEKIT_API_SECRETLiveKit API secret
LIVEKIT_URLInternal LiveKit URL (e.g., ws://localhost:7880)
LIVEKIT_PUBLIC_URLPublic-facing LiveKit URL
WEBRTC_MODEsfu, p2p, or hybrid
ALLOW_FEDERATED_VOICEAllow voice across federated instances

Push Notifications

VariableDescription
VAPID_PUBLIC_KEYVAPID public key
VAPID_PRIVATE_KEYVAPID private key
VAPID_SUBJECTVAPID subject (e.g., mailto:admin@example.com)

Bot Gateway (bot-gateway/.env)

VariableRequiredDescription
SUPABASE_URLYesSupabase API URL
SUPABASE_SERVICE_ROLE_KEYYesService role key
PUBLIC_URLYesPublic-facing URL
PORTNoServer port (default: 3002)
NODE_ENVNoEnvironment

LiveKit / WebRTC (webrtc/)

Copy webrtc/env.example and webrtc/livekit.yaml.example:

VariableDescription
LIVEKIT_API_KEYLiveKit API key
LIVEKIT_API_SECRETLiveKit API secret
LIVEKIT_URLInternal LiveKit WebSocket URL
LIVEKIT_PUBLIC_URLClient-facing LiveKit WebSocket URL
INSTANCE_DOMAINInstance domain
TURN_DOMAINTURN server domain
REDIS_HOST, REDIS_PORT, REDIS_PASSWORDRedis for LiveKit clustering
MAX_PARTICIPANTSMax room participants
EMPTY_ROOM_TIMEOUTRoom timeout when empty

Integration Tests (.env.test)

VariableDescription
TEST_SUPABASE_URLTest Supabase URL
TEST_SUPABASE_ANON_KEYTest anon key
TEST_SUPABASE_SERVICE_ROLE_KEYTest service role key
TEST_DATABASE_URLDirect PostgreSQL connection

Note: This page is protected from auto-generation. Edit the content in docs-source/guide/environment.md and run npm run docs:generate-guide to update.

Released under the AGPL-3.0 License.