On this page

Configuration

Every knob a running platform reads. The deployment variables — URLs, identity, storage, MCP, tracking — are documented with inline commentary in .env.example; the job and compute knobs below are read from the environment and default as shown.

URLs and identity#

VariableDefaultNotes
NEXT_PUBLIC_API_URLhttp://localhost:8000The API URL the browser uses; inlined at build time, so a change needs a rebuild.
AUTH_URLhttp://localhost:3000The web origin Auth.js believes in; decides secure-cookie behaviour.
AUTH_SECRET–Encrypts the session cookie. openssl rand -base64 32.
CORS_ORIGINS["http://localhost:3000"]Extend when the web origin changes.
KEYCLOAK_ISSUERdev realm URLThe iss claim the API validates.
KEYCLOAK_JWKS_URLinternal DNSWhere signing keys are fetched.
KEYCLOAK_AUDIENCEflows-funds-apiExpected audience on access tokens.
KEYCLOAK_CLIENT_ID / _SECRETseeded dev valuesMust match the realm; rotate before any shared deployment.
KEYCLOAK_ADMIN / _PASSWORDadmin / adminThe Keycloak console login.
KEYCLOAK_IDP_HINTemptyJump straight to a brokered identity provider.
SESSION_STORE_DIRunsetServer-side sessions; sidesteps the 4 KB cookie limit.
DEMO_MODE / DEMO_ADMINfalseLocal-only login bypass. Never on a shared deployment.

Storage#

VariableDefaultNotes
STORAGE_MODElocallocal, or s3 for a bucket-authoritative deployment.
STORAGE_S3_ENDPOINT–Endpoint URL with scheme; empty means AWS S3 proper.
STORAGE_S3_BUCKET / _REGION–Region is required by AWS; R2 wants auto.
STORAGE_S3_ACCESS_KEY / _SECRET_KEY–Credentials.
STORAGE_S3_PATH_STYLEtrueNeeded by MinIO and Ceph; set false on AWS.
STORAGE_S3_USE_SSL / _VERIFYtrue / system CAsTLS toggle; false or a CA-bundle path for an internal CA.
STORAGE_S3_PREFIX–Key prefix, so deployments can share a bucket.
STORAGE_S3_QUOTA_BYTES0Ceiling for the prefix; imports answer 507 once reached.
LOCAL_CACHE_MAX_BYTES0Cache budget for the eviction reaper; 0 never evicts.
CACHE_EVICT_DRY_RUNtrueLog candidates without deleting — run in dry-run mode first.
JOB_RETENTION_DAYS0Prune terminal jobs after N days.

Uploads#

Compressed uploads and archives unpack behind zip-bomb guards. The caps count bytes actually produced, never what an archive claims about itself.

VariableDefaultNotes
INGEST_MAX_DECOMPRESSED_BYTES10737418240 (10 GiB)Most one upload may unpack to: a single log, or all logs picked from one archive together.
INGEST_MAX_COMPRESSION_RATIO1000Unpacked/packed ceiling, checked beyond 64 MiB of output; 0 disables.
INGEST_MAX_ARCHIVE_ENTRIES10000Entries an uploaded archive may hold.

Jobs and compute#

VariableDefaultNotes
WORKER_CONCURRENCY2Parallel job slots (1–8); also changeable live by an admin.
JOB_EXECUTION_TIMEOUT_SECONDS1800Wall-clock backstop per job; 0 disables.
MODULE_PROCESS_POOL_SIZEmin(cores, 8)Size of the CPU offload pool.
MAX_OFFLOADS_PER_USER0 (= pool size)Per-user share of that pool; set it on shared hosts.
DUCKDB_THREADS / DUCKDB_MEMORY_LIMIT0 / unsetPer-query caps.
EVENT_LOG_CACHE_ENTRIES3Materialised DataFrame cache for repeated reads.
ENVproddev enables the module hot-reload watchdog.
LOG_LEVELinfodebug, info, warning, error.

MCP and tracking#

VariableDefaultNotes
MCP_ENABLEDfalseMounts the MCP server at /mcp; read at boot.
API_BASE_URLunsetPublic origin for OAuth discovery.
MCP_TOOLSETSemptyEmpty means all except admin; all includes it.
MCP_READ_ONLYfalseUnregisters write tools at boot.
MCP_REQUIRE_EGRESS_CONSENTtrueEach user opts in before tools return their data.
MCP_OAUTH_CLIENT_IDunsetPre-registered public client; empty means PAT-only.
MCP_RATE_LIMIT_PER_MINUTE / _BURST120 / 40Per-user request budget.
MCP_WRITE_RATE_LIMIT_PER_MINUTE / _BURST30 / 10Tighter bucket for mutating tools.
MCP_TOOL_TIMEOUT_SECONDS30Per-call timeout.
USER_TRACKING_ONBOARDINGforceforce, on, or off — see Security and privacy.