Environment variables Every variable the API's env schema declares, grouped, with whether it is required and its default. Generated from envSchema.
Every variable in envSchema (libs/shared/src/config/env.config.ts). Required means the app won't boot without it. How the schema is loaded and read is on Config and environment ; where the values live is on Secrets and credentials .
Never copy real values here
This page lists names and committed defaults only. Secret defaults are development placeholders and are hidden. Get real values from a teammate, never from a production dump or a screenshot.
Variable Required Default What it does PORTYes None Port the server listens on HOSTYes None Host the server binds to NODE_ENVYes None development turns off docs basic auth; production turns on PostHogFRONTEND_URLYes None CORS allow-list, comma-separated origins EDUCATION_HUB_URLYes None The Hub origin every emailed, messaged or redirected link uses SHORT_LINK_URLNo None Short-link host for WhatsApp links; unset sends long links DOCS_USERNAMEYes None Basic auth username for /docs and /queues outside development DOCS_PASSWORDYes None Basic auth password for /docs and /queues outside development
Variable Required Default What it does DATABASE_URLYes None Postgres for the schools API DATABASE_POOL_SIZENo 30Connections per running copy; copies times this must fit the database limit REDIS_URLNo redis://localhost:6379BullMQ, collaboration, Pip ownership, shared rate limits CACHE_REDIS_URLNo redis://localhost:6379/1Permission, feature-flag and presence caches
Variable Required Default What it does RABBIT_MQ_URLYes None RabbitMQ for health pings, Rover turns and tool calls AGENT_QUEUE_PREFETCHNo 20Rover turns one worker runs at once (Railway sets 20 on staging and 30 on production) ROVER_JOB_CONCURRENCYNo 5Background Rover jobs one worker process runs at once. The Railway file sets 100 on staging and 50 on production CENTRIFUGO_URLNo http://localhost:8006Centrifugo's HTTP API CENTRIFUGO_API_KEYNo Development placeholder Key for publishing to Centrifugo CENTRIFUGO_HMAC_SECRETNo Development placeholder Signs connection and subscription tokens
Variable Required Default What it does JWT_SECRET_KEYYes None Signs access and refresh tokens JWT_SALT_ROUNDSYes None bcrypt cost for password hashes; an empty value falls back to 12 JWT_ACCESS_TOKEN_EXPIRATION_MSNo 900000Access token life (Railway sets a day) JWT_REFRESH_TOKEN_EXPIRATION_MSNo 604800000Refresh token life, 7 days IMPERSONATION_REFRESH_EXPIRATION_MSNo 3600000Refresh life while impersonating, 1 hour OTP_EXPIRY_MINUTESNo 15One-time code life OTP_RESEND_COOLDOWN_SECONDSNo 30Wait before resending a code OTP_MAX_ATTEMPTSNo 10Wrong codes allowed for one code MAGIC_LINK_EXPIRY_MINUTESNo 5Magic link life MAGIC_LINK_RESEND_COOLDOWN_SECONDSNo 60Wait before resending a link SUPERADMIN_EMAILSNo None Operators created at boot PLATFORM_ADMIN_EMAIL_DOMAINSNo None Domains an operator email must be on FEATURE_FLAGS_BYPASSNo 01 turns every feature on. Local development only
Variable Required Default What it does MICROSOFT_CLIENT_IDYes None The app registration the API signs in to Microsoft Graph as MICROSOFT_CLIENT_SECRETYes None Proves the API is that app registration when it asks for Graph tokens MICROSOFT_TENANT_IDYes None The Microsoft 365 directory that Graph sign-in uses at login.microsoftonline.com MICROSOFT_OAUTH_CALLBACK_URLYes None Where Microsoft sends the browser back after sign-in MICROSOFT_WEBHOOK_SECRETYes None Checks directory-sync webhooks MICROSOFT_TOKEN_ENC_KEYNo Development placeholder Encrypts stored Microsoft refresh tokens. Override in production
Variable Required Default What it does OPENAI_API_KEYYes None OpenAI key. Rover's chat, small talk, slide reader, and illustrations use it OPENAI_MODELNo gpt-5.2Chat model name. Rover sends this value as it is PUBLIC_AI_MODELNo None The website chat's model name. Falls back to OPENAI_MODEL. That client was not re-opened OPENAI_IMAGE_MODELNo gpt-image-1Image model for illustrations and school-report pages MICRO_MODELYes None Small-talk model name. Rover sends this value as it is MICRO_SERVICE_TIERNo None OpenAI tier for the small model: auto, default, flex, priority AI_GATEWAY_API_KEYYes None AI gateway key AI_GATEWAY_BASE_URLYes None AI gateway URL PINECONE_API_KEYNo None Pinecone, for the NCDC assistant and lesson index PINECONE_ASSISTANT_NAMENo None Pinecone assistant PINECONE_HOSTNo None Pinecone index host NCDC_WEBHOOK_SECRETNo None Checks NCDC indexing callbacks MODAL_TOKEN_IDNo None Modal sandbox for the agent's shell; unset means no shell MODAL_TOKEN_SECRETNo None Modal sandbox secret, paired with MODAL_TOKEN_ID MODAL_APP_NAMENo naalya-roverModal app MODAL_IMAGE_NAMENo python:3.12-slimSandbox image MODAL_TIMEOUT_MSNo 3600000Longest a sandbox may live
Variable Required Default What it does CLOUDFLARE_ACCOUNT_IDYes None Builds the R2 storage endpoint and the AI search URL CLOUDFLARE_BASE_URLYes None Start of the AI search URL; the account ID is added after it CLOUDFLARE_API_TOKENYes None Required by the R2 storage service at start-up CLOUDFLARE_AI_SEARCH_API_TOKENYes None Authorises calls to Cloudflare AI search R2_ACCESS_KEY_IDYes None R2 storage key R2_SECRET_ACCESS_KEYYes None R2 storage secret R2_DEFAULT_BUCKETNo naalya-storagePrivate bucket R2_PUBLIC_BUCKETYes None Public bucket R2_PUBLIC_BASE_URLYes None Public bucket URL GOTENBERG_URLNo http://localhost:3010HTML to PDF service GOTENBERG_BASIC_AUTHNo None Gotenberg credentials, if it has them
Variable Required Default What it does RESEND_API_KEYYes None Resend key RESEND_FROM_EMAILYes None Sender address RESEND_FROM_NAMEYes None Sender name UNIPILE_API_KEYYes None Unipile (WhatsApp and social) UNIPILE_BASE_URLNo None Unipile API base UNIPILE_WEBHOOK_SECRETNo None Checks Unipile webhooks UNIPILE_CALLBACK_BASE_URLNo None Where Unipile's hosted sign-in returns
Variable Required Default What it does SCHOOL_PAY_API_BASE_URLNo None SchoolPay host. Unset refuses SchoolPay calls PESAPAL_CURRENCYNo UGXPesapal currency PAYMENT_CREDENTIALS_ENC_KEYNo Development placeholder Encrypts campus gateway credentials. Override in production
The clinic link stays off until all four variables are set.
Variable Required Default What it does NAALYA_EHR_API_URLNo None The clinic API NAALYA_EHR_API_KEYNo None The clinic API key NAALYA_EHR_WEBHOOK_SECRETNo None Checks webhooks from the clinic API NAALYA_EHR_SCHOOL_IDNo None Which school the link works for
Variable Required Default What it does LOGGING_LEVELNo debugpino level LOGGING_REQUEST_LOGGER_ENABLEDNo 1One line per request OTEL_EXPORTER_OTLP_ENDPOINTNo None Dash0 endpoint; unset means stdout logs only OTEL_EXPORTER_OTLP_HEADERSNo None Dash0 token and dataset OTEL_DETAILED_TRACINGNo None 1 adds Nest, Postgres and Redis spansLANGFUSE_TRACINGNo None Agent tracing (worker) LANGFUSE_PUBLIC_KEYNo None Langfuse key LANGFUSE_SECRET_KEYNo None Langfuse secret LANGFUSE_BASE_URLNo None Langfuse host POSTHOG_PROJECT_TOKENNo None PostHog, production only POSTHOG_HOSTNo None PostHog host
All run on the worker, in UTC. CRON_ENABLED=0 stops every one.
Variable Default Kampala time CRON_CLEAN_LIBRARY_COVERS0 22 * * *01:00 daily CRON_ENABLED1Not applicable CRON_FEE_REMINDERS0 4 * * *07:00 daily CRON_INDEX_LESSON_FILES0 0,12 * * *03:00 and 15:00 CRON_LAPSE_LIBRARY_HOLDS*/10 * * * *Every 10 minutes CRON_LIBRARY_REMINDERS0 5 * * *08:00 daily CRON_OPEN_YEAR_ENROLMENT0 0,12 * * *03:00 and 15:00 CRON_PUBLISH_NOTICES0 0,12 * * *03:00 and 15:00 CRON_PURGE_EXPIRED_STORAGE0 0 * * *03:00 daily CRON_PURGE_REFRESH_TOKENS0 0 * * *03:00 daily CRON_PURGE_SHORT_LINKS0 0 * * *03:00 daily CRON_PURGE_TEAMS_MESSAGES0 0 * * *03:00 daily CRON_RECORDS_RETENTION0 1 * * *04:00 daily CRON_REKEY_STORAGE0 0 * * *03:00 daily CRON_RELEASE_TERM_REPORTS0 0,12 * * *03:00 and 15:00 CRON_SCHOOL_REPORTS_MONTHLY0 0 * * *03:00 daily CRON_SCHOOL_REPORTS_TERMLY0 0 * * *03:00 daily CRON_SWEEP_CALENDAR_COPIES0 0,12 * * *03:00 and 15:00 CRON_SWEEP_LESSON_COPIES0 0,12 * * *03:00 and 15:00 CRON_SWEEP_NAALYA_EHR0 0,12 * * *03:00 and 15:00 CRON_SYNC_SCHOOL_PAY0 0 * * *03:00 daily CRON_TEAMS_WEEKLY_SUMMARY0 13 * * 5Friday 16:00
REFRESH_TOKEN_RETENTION_DAYS (default 30) is how long expired refresh tokens are kept before the purge.