Reference

Environment variables

Alphabetical reference for every GONI_* environment variable a self-hosted deployment configures.

What this page is

A greppable glossary of every GONI_* environment variable a self-hosted Goni deployment reads. Use it when filling in a Kubernetes ConfigMap or your deployment’s secret store.

In this reference

  • Table shape: name, purpose, default, required in prod, example.
  • Auth, warehouse, control plane, email, SSRF, rate limits, sweepers, feedback.
  • Why Goni refuses to start with placeholder secrets when GONI_DEV_MODE=0.

Boot-time secret guardrails

In production (GONI_DEV_MODE unset or 0) Goni refuses to start when any of GONI_JWT_SECRET, GONI_EMBED_SECRET, GONI_SECRET_KEY, or GONI_IP_SALT is unset, shorter than 32 bytes, or matches a known placeholder. GONI_DEV_MODE=1 is the only switch that re-enables the X-Goni-User header login, wildcard CORS, and dev-secret fallbacks; it must never ship enabled.

Warning: Setting GONI_DEMO_RETURN_MAGIC_LINK=1 under GONI_DEV_MODE=0 also aborts boot. In production that flag would silently merge every visitor into GONI_DEMO_USER_EMAIL, causing cross-tenant data exposure.

Generate every 32-byte secret with openssl rand -hex 32 (or openssl rand -base64 32 for GONI_SECRET_KEY). Store the output in your secret manager, then inject it into the process environment at boot.

Auth and secrets

NamePurposeDefaultRequired in prodExample
GONI_DEV_MODEEnables dev shortcuts: X-Goni-User login, wildcard CORS, secret fallbacks.0Must be 0 or unset1 (localhost only)
GONI_JWT_SECRETHS256 access-token signer. Rejected if under 32 bytes.dev placeholderYes (unless GONI_JWT_PRIVATE_KEY_PEM is set)32-byte hex string
GONI_JWT_PRIVATE_KEY_PEMEdDSA (Ed25519) access-token signer, PKCS#8 PEM. Set on bi-api only. When set, bi-api signs EdDSA and refuses HS256 tokens, and GONI_JWT_SECRET must be unset or real.unsetOptional-----BEGIN PRIVATE KEY-----...
GONI_JWT_SECRET_PREVPrevious JWT signer accepted for verification during rotation. Tokens minted by the current signer stay valid; tokens minted by the previous secret still verify until it is retired.unsetOptional32-byte hex string
GONI_JWT_PUBLIC_KEY_PEMPublic half of GONI_JWT_PRIVATE_KEY_PEM, PKIX PEM. The connector hubs verify bi-api’s tokens with it and never hold the private key. On bi-api it is optional (derived from the private key); if set, bi-api refuses to start when the two do not match.unsetOptional-----BEGIN PUBLIC KEY-----...
GONI_EMBED_SECRETJWT signer for embed and share URLs.dev placeholderYes32-byte hex string
GONI_EMBED_SECRET_PREVPrevious embed signer accepted for verification during rotation.unsetOptional32-byte hex string
GONI_EMBED_MAX_TTL_SECONDSUpper bound on the TTL a caller may request when minting an embed token. Requests over the cap are clamped.604800 (7 days)Optional86400
GONI_EMBED_EXPECTED_ISSRequired iss claim on inbound embed tokens; empty accepts any issuer.emptyRecommendedhttps://embed.example.com
GONI_SECRET_KEYAES-256-GCM key encrypting connection credentials at rest.dev fallbackYes32-byte base64 string
GONI_IP_SALTSalt for hashing client IPs before storage.dev fallbackYes32-byte hex string
GONI_CORS_ALLOWED_ORIGINSComma-separated CORS origin allow-list. Empty plus prod mode denies cross-origin.emptyYes for cross-origin SPAhttps://app.example.com,https://embed.example.com
GONI_ALLOWED_ORIGINSCSRF Origin header allow-list applied to state-changing requests. Distinct from CORS: this gates the request itself, not the browser preflight.empty (falls back to CORS list)Recommendedhttps://app.example.com
GONI_FORCE_SECURE_COOKIESForce Secure cookie flag regardless of scheme.0Recommended1
GONI_PUBLIC_URLFully-qualified base URL Goni advertises to itself for building outbound links (magic-link emails, Stripe redirects, embed callbacks).derived from requestRecommendedhttps://app.example.com
GONI_PUBLIC_HOSTHostname used when constructing magic-link email URLs. Overrides GONI_PUBLIC_URL when only the host differs.derived from requestOptionalapp.example.com
GONI_MULTI_TENANTEnables tenant-scoped filtering on identity carriers (PATs, sessions). Leave 0 for single-tenant deploys.0Set 1 for multi-tenant1

See Access control for how these secrets flow into the RBAC layer.

Warehouse (ClickHouse)

The Goni API, semantic layer, streaming plane, and migrations job all read the same set. Production reads them from a secret store into the deployment’s environment.

NamePurposeRequired in prodExample
GONI_CH_HOSTWarehouse hostname.Yesabc123.eu-west-1.aws.clickhouse.cloud
GONI_CH_PORTWarehouse port.Yes443
GONI_CH_USERWarehouse user.Yesdefault
GONI_CH_PASSWORDWarehouse password.Yesfrom ClickHouse Cloud
GONI_CH_DATABASEDefault database.Yesgoni_prod
GONI_CH_PROTOCOLnative or http.Yeshttp
GONI_CH_SECURETLS on the warehouse connection.Yestrue

See Architecture for the two-plane split.

Control plane and store

NamePurposeRequired in prodExample
GONI_PG_DSNControl-plane Postgres DSN.Yespostgres://goni:...@10.0.0.5:5432/goni_cp?sslmode=require
GONI_REDIS_URLSessions, rate-limit, token budget.Yesredis://:pw@10.0.0.6:6379/0
GONI_SEMANTIC_ROOTPath to compiled semantic project.Yes/data/semantic/project
GONI_REPO_ROOTRoot of the semantic project’s git checkout (used for metric-blame lookups). Defaults to /app/repo when unset.Optional/data/semantic/repo
GONI_STORE_ROOTStorage root for UI-editable YAML.Yes/data/store
GONI_POLICIES_PATHRBAC policies file.Yes/data/store/policies.yml
GONI_ALERTS_PATHAlerts YAML.Yes/data/store/alerts.yml
GONI_REPORTS_PATHScheduled reports YAML.Yes/data/store/reports.yml

Email

Precedence at boot: Resend, then SMTP, then Noop. Under GONI_DEV_MODE=0 Goni refuses to start with the Noop sender (magic-link auth would silently fail). Goni’s production deploy uses the SMTP path via a Paysera on-prem relay reached over a GCP VPC tunnel (ADR 0010); Resend stays available for local dev.

NamePurposeRequired in prodExample
GONI_RESEND_API_KEYEnables the Resend transport. Leave unset in prod (SMTP is authoritative).No (local dev only)re_...
GONI_EMAIL_FROMFrom address for both transports.Yesgoni@paysera.com
GONI_SMTP_HOSTSMTP relay hostname.Yessmtp.paysera.net
GONI_SMTP_PORTSMTP port.Yes587
GONI_SMTP_USERSMTP username.Yesgoni@paysera.com
GONI_SMTP_PASSSMTP password.Yesopaque
GONI_SMTP_TLSSTARTTLS on by default; 0 disables.Recommended 11
GONI_SMTP_INSECURE_SKIP_VERIFYSkip STARTTLS certificate verification. Only set to 1 for a private-tunnel relay whose cert isn’t in the public trust store (Paysera on-prem SMTP over GCP VPC peering — ADR 0010). MUST be unset for any relay reached over the public internet.1 for Paysera relay, unset otherwise1

Demo bookings

/api/marketing/demo-request books the slot on a Google Calendar and lets Google send the invitation with a Meet link (ADR 0029). With the three credentials unset the endpoint still answers; the operator email then asks a human to confirm each slot.

NamePurposeRequired in prodExample
GONI_GOOGLE_CALENDAR_CLIENT_IDOAuth 2.0 client (Web application) in the GCP project.No (auto-confirm off without it)1234-abc.apps.googleusercontent.com
GONI_GOOGLE_CALENDAR_CLIENT_SECRETIts client secret.Noopaque
GONI_GOOGLE_CALENDAR_REFRESH_TOKENMinted once with tools/google_calendar_oauth.py, approved in a browser signed in as the calendar owner. Events land on that account’s calendar and invitations come from it.Noopaque
GONI_GOOGLE_CALENDAR_IDCalendar the events land on.No (default primary)primary
GONI_DEMO_REQUEST_SALES_CCComma-separated inboxes that get a copy of every operator notification and are added as hidden attendees on the event.Novaso.ochigava@paysera.net
GONI_DEMO_REMINDER_INTERVALTick of the worker that emails the 24-hour and 15-minute reminders; 0 disables.No (default 1m)1m

SSRF

The SSRF gate wraps every outbound webhook and embed callback.

NamePurposeRequired in prodExample
GONI_SSRF_ALLOW_PRIVATEPermits RFC1918 targets.Must be 00
GONI_SSRF_ALLOWED_HOSTSComma-separated allow-list for otherwise-blocked hosts.Optionalhooks.slack.com,api.pagerduty.com
GONI_ALLOW_INSECURE_WEBHOOKSPermits http:// webhook targets.Must be 00

Rate limits

Three classes with independent burst and rps. Setting either the burst or the rps of a class to 0 short-circuits and disables that class. See REST API for what each class covers.

NameProduction defaultExample
GONI_RATE_HEAVY_BURST6060
GONI_RATE_HEAVY_RPS33
GONI_RATE_CHEAP_BURST200200
GONI_RATE_CHEAP_RPS2020
GONI_RATE_AUTH_BURST55
GONI_RATE_AUTH_RPS0.50.5
GONI_TRUSTED_PROXY_CIDRSempty10.0.0.0/8

Sweepers and streaming

NamePurposeDefaultRequired in prodExample
GONI_TRIAL_SWEEPER_INTERVALCadence of the trial-expiry sweeper. 0 disables.1hRecommended default1h
GONI_STREAMING_ORPHAN_SWEEP_INTERVALCadence of the streaming orphan sweeper (floor 1m). 0 disables. The sweeper runs only when GONI_STREAMING_ENABLED is on.5mRecommended default5m
GONI_MAX_STREAMING_SUBS_PER_TENANTCap on active streaming subscriptions per tenant.50Yes50
GONI_STREAMING_ENABLEDMaster switch for the streaming subsystem, and the single statement that stream-hub is part of this deployment. Unset, empty or 0 means off: the subscription endpoints (create, pause, resume, reset offset, delete, status, DLQ redrive) answer 503 with code streaming_disabled, Kafka and Pub/Sub show as unavailable in the catalog and cannot be created, an existing Kafka or Pub/Sub pipeline is not run (one run records STREAMING_DISABLED), and the orphan sweeper does not start. Turn it on only where stream-hub runs; then an unreachable stream-hub is reported as an error. See Streaming subscriptions.off (disabled)Required for streaming1
GONI_DQ_SWEEP_INTERVALData-quality sweeper cadence.5mRecommended default5m
GONI_DQ_DEFAULT_FREQUENCYDefault per-test frequency.1hRecommended default1h
GONI_DQ_FAIL_RETRY_FREQUENCYRetry frequency after a failed test.10mRecommended default10m
GONI_MAX_CONCURRENT_PIPELINESConcurrency cap for the pipeline scheduler (floor 1, ceiling 256).8Recommended4
GONI_CONNECTION_PROBE_INTERVALCadence of connection health probes (floor 1m, ceiling 24h).15mOptional1m

Streaming client wiring: GONI_FLIGHT_STREAM_ADDR_CLIENT, GONI_FLIGHT_STREAM_INSECURE (dev only), GONI_FLIGHT_STREAM_CA_FILE, GONI_FLIGHT_STREAM_SERVER_NAME, GONI_STREAM_STATUS_ADDR_CLIENT. See Streaming subscriptions.

The stream-hub process binds its own status and Prometheus surfaces on GONI_STREAM_STATUS_ADDR (default :9084); bi-api does not read that variable.

Feedback and observability

NamePurposeDefaultRequired in prodExample
GONI_FEEDBACK_SLACK_WEBHOOKSlack webhook that the /api/feedback forwarder posts to.emptyOptionalhttps://hooks.slack.com/services/...
GONI_METRICS_TOKENBearer token guarding the Prometheus endpoint.empty (open)Recommended16-byte hex string
GONI_SECURITY_ALERT_WEBHOOK_URLSlack-shaped webhook the security dispatcher fans pat.mint, embed.mint, policies.update, warehouse.config.*, and auth.magic_link.throttled events out to. Empty = counter-only mode (Prometheus counter still increments; nothing is dispatched). See Audit and lineage.emptyRecommendedhttps://hooks.slack.com/services/...
GONI_SECURITY_ALERT_WEBHOOK_SECRETOptional HMAC secret used to sign the security webhook payload. Ignored when the URL is empty.emptyOptional32-byte hex string
GONI_DQ_ALERT_WEBHOOK_URLSlack-shaped webhook the data-quality scheduler posts failed-test alerts to. Empty disables the fan-out; test failures still land in the audit log.emptyOptionalhttps://hooks.slack.com/services/...
GONI_DQ_ALERT_WEBHOOK_SECRETOptional HMAC secret for the data-quality webhook. Ignored when the URL is empty.emptyOptional32-byte hex string
GONI_MAGIC_LINK_TTL_SECONDSOverride for the magic-link token TTL. Values less than or equal to zero are ignored (falls back to the 15-minute default).900 (15 minutes)Optional600
GONI_REPORT_WEBHOOK_SECRETHMAC secret used to sign outbound report-delivery webhook payloads. See Alerts and scheduled reports.emptyRecommended for signed webhooks32-byte hex string
GONI_REPORT_CSV_RETENTION_DAYSHow many days alert and report run history, including each report’s rendered CSV, is kept in the control-plane database before it is deleted automatically.90Optional14

AI

Provider selection is per-tenant BYOK, configured through the PATCH /api/settings/ai endpoint (see Ask); there is no process-wide backend env var. Only the Ask regression suite path is set via environment.

NamePurposeDefaultRequired in prodExample
GONI_AI_EVAL_PATHPath to an ai_eval.yml suite for Ask regression checks. Unset runs the suite bundled in bi-api.unsetOptional/data/semantic/project/ai_eval.yml
GONI_OLLAMA_ALLOWED_HOSTSComma-separated allow-list of hosts a BYOK Ollama endpoint may target. Loopback (127.0.0.1, localhost) is always permitted.emptyOptionalollama.internal,10.0.0.5

OIDC (optional)

Set GONI_OIDC_ENABLED=1 and provide GONI_OIDC_ISSUER, GONI_OIDC_CLIENT_ID, GONI_OIDC_CLIENT_SECRET, and GONI_OIDC_REDIRECT_URL. Optional filters: GONI_OIDC_ALLOWED_DOMAINS (comma-separated), GONI_OIDC_REQUIRE_EMAIL_VERIFIED=0 to relax verification, GONI_SESSION_TTL_SECONDS to override the default TTL.

Stripe (optional)

GONI_STRIPE_SECRET_KEY, GONI_STRIPE_PUBLISHABLE_KEY, and GONI_STRIPE_WEBHOOK_SECRET. When the secret key is empty, /api/billing/* and /api/marketing/stripe-webhook return 503 (safe default; never accept unverified webhooks).

Sentry (optional)

Empty DSN disables error reporting cleanly. When set, panics + Error-level slog lines from the API (and uncaught errors + React render errors from the SPA) are forwarded to your Sentry instance with the environment + release tags.

NamePurposeComponentExample
GONI_SENTRY_DSNAPI-side DSN, forwards backend events.bi-api runtime envhttps://<key>@sentry.example.com/<id>
GONI_SENTRY_ENVIRONMENTTag on every event so alert rules can route per deploy target.bi-api runtime envsandbox, prod
GONI_SENTRY_RELEASERelease identifier: the commit the image was built from. Set as a Docker build arg and kept in the image, so a rollback reports the older release; runtime env overrides it.Go images (bi-api, source-hub, files-hub) build arg846b29f4c1a2
VITE_SENTRY_DSNSPA-side DSN. Vite substitutes import.meta.env.VITE_* at build time; runtime env is ignored. Baked into the bundle via Docker --build-arg.bi-web build arghttps://<key>@sentry.example.com/<id>
VITE_SENTRY_ENVIRONMENTSPA environment tag.bi-web build argsandbox, prod
VITE_SENTRY_RELEASESPA release identifier.bi-web build argsandbox-2026-09-07

Last updated