Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.foglamp.dev/llms.txt

Use this file to discover all available pages before exploring further.

All services are configured through environment variables, validated at startup. Anything with a default is optional; everything else is required.

Core

VariableRequiredDefaultDescription
DATABASE_URLyesPostgres connection string.
BETTER_AUTH_SECRETyesSession-signing secret, min 32 chars.
BETTER_AUTH_URLyesPublic URL of apps/server (e.g. http://localhost:3000).
CORS_ORIGINyesDashboard origin allowed to call the API (e.g. http://localhost:3001).
CORS_EXTRA_ORIGINSnoAdditional allowed origins, comma/space separated.
PORTno3000Port for apps/server. Usually injected by the host.
NODE_ENVnodevelopmentdevelopment, production, or test.

ClickHouse

VariableDefaultDescription
CLICKHOUSE_URLhttp://localhost:8123ClickHouse HTTP endpoint.
CLICKHOUSE_USERdefaultUsername.
CLICKHOUSE_PASSWORDPassword.
CLICKHOUSE_DATABASEfoglampDatabase name.

Ingest (apps/ingest)

VariableDefaultDescription
INGEST_PORT4000Port for the ingest API.
INGEST_FLUSH_INTERVAL_MS1000How often the write buffer flushes to ClickHouse.
INGEST_FLUSH_MAX_ROWS1000Flush early once this many rows are buffered.
INGEST_RATE_LIMIT_RPS100Per-key rate limit (per instance, approximate).
API_KEY_CACHE_TTL_MS60000In-memory API-key cache TTL.
FOGLAMP_SPANS_RETENTION_DAYS30Span TTL, applied via ALTER … MODIFY TTL on boot.

Cost & pricing

VariableDefaultDescription
OPENROUTER_MODELS_URLhttps://openrouter.ai/api/v1/modelsSource for model pricing.
FOGLAMP_PRICING_FILELocal pricing JSON for air-gapped hosts.

Alerts (apps/server)

VariableDefaultDescription
ALERT_EVAL_INTERVAL_MS60000How often the evaluator sweeps enabled rules.
ALERT_RENOTIFY_MS3600000Re-notify cooldown while a rule stays firing.

Email (optional)

Enables magic-link login and alert notifications. Without these, password login still works.
VariableDescription
RESEND_API_KEYResend API key.
RESEND_FROM_EMAILFrom address for outbound email.

Google OAuth (optional)

Enabled only when both are present.
VariableDescription
GOOGLE_CLIENT_IDOAuth client ID.
GOOGLE_CLIENT_SECRETOAuth client secret.

Seed bootstrap

Used once by the seed script. No static defaults — a random password is generated and printed if unset.
VariableDescription
ADMIN_EMAILInitial admin email.
ADMIN_PASSWORDInitial admin password.

Web dashboard (apps/web)

VariableDescription
NEXT_PUBLIC_SERVER_URLPublic URL of apps/server the browser calls.
NEXT_PUBLIC_APP_URLPublic URL of the dashboard itself.
INTERNAL_SERVER_URLOptional in-cluster server URL for SSR requests.