Skip to main content

Hub environment variables

Endatix Hub is a Next.js app. You configure it with environment variables (.env, Helm, Azure Static Web Apps) — not appsettings.json.

The API has its own settings under Configuration. Need the API to link back to Hub in emails? That is API Hub URL, not this page.

Platform admins can audit the live Hub runtime on Platform Admin → Environment. That page never shows secret values — see Environment.

How to set values

HowWhen it applies
.env / .env.localLocal pnpm dev
Helm / container env / SWA appsettingsA published image or Static Web App
withEndatix(nextConfig, options)Rebuild only — cannot retarget an image you already built

Always wrap Next.js with export default withEndatix(nextConfig) so image hosts compile correctly.

Copy hub/.env.example for the full key list.

Runtime vs build

Next.js inlines any NEXT_PUBLIC_* variable into client JavaScript at build time. That cannot be overridden later from process.env — see Next.js environment variables.

For Docker and Kubernetes, Hub’s browser-facing settings use ENDATIX_* names resolved at request time on the server, then passed into the client tree. You set them like ordinary Node.js environment variables.

That means one Hub image can talk to different APIs, toggle debug, or swap a SurveyJS licence by changing container env — no rebuild. Changing blob hostnames for next/image still needs a rebuild (images.remotePatterns). Path prefix (NEXT_PUBLIC_BASE_PATH) is still a Next.js public path and is baked at build.

Do not use --build-arg for the API URL

Baking the API origin into the image ties that artifact to one environment. Set ENDATIX_BASE_URL (and ENDATIX_API_URL if you do not use the default /api prefix) at runtime.

Request-time client config

On Node boot, Hub copies any unset current name from its deprecated NEXT_PUBLIC_* counterpart (applyLegacyPublicEnv). After that, every reader — layouts, public forms, the Environment admin page — reads only ENDATIX_*.

Precedence:

  1. A non-blank ENDATIX_* value always wins.
  2. If ENDATIX_* is missing or whitespace-only, the deprecated NEXT_PUBLIC_* name fills it once at process start.
  3. Consumers never merge the two names at read time. That avoids “current equals default, so legacy wins” bugs.

The SurveyJS Creator licence is not part of the public client projection (that HTML is also served on anonymous form routes). It is injected only on the authenticated designer via a server-only reader (ENDATIX_SURVEY_LICENSE_KEY).

Minimum to run

VariableRole
ENDATIX_BASE_URLAPI origin, no /api suffix — e.g. https://localhost:5001
ENDATIX_API_PREFIXOptional. Defaults to /api
ENDATIX_API_URLOptional complete API URL. Use when ENDATIX_BASE_URL is unset (Helm often sets both)
SESSION_SECRETHub session cookie — openssl rand -hex 32
AUTH_SECRETAuth.js — npx auth secret
AUTH_URLPublic Hub origin behind a proxy (recommended)
AUTH_TRUST_HOSTtrue behind a reverse proxy

Request-time ENDATIX_* variables

These match the groups on Platform Admin → Environment. Hosts and flags are shown as values. Keys and the SurveyJS licence are Set / Not set only.

API

VariableRole
ENDATIX_BASE_URLAPI origin. Combined with prefix to form the URL Hub calls
ENDATIX_API_PREFIXPath prefix. Default /api
ENDATIX_API_URLFull API URL. Used when ENDATIX_BASE_URL is unset

No deprecated NEXT_PUBLIC_* names for API origin.

Experimental

VariableRole
ENDATIX_ENABLE_EXTENSIONSSurveyJS extensions (data-list questions, custom widgets). Off in Hub by default; Helm defaults on

No deprecated NEXT_PUBLIC_* name.

Debug

VariableRole
ENDATIX_IS_DEBUG_MODE"true" / "false" to force debug. When unset, debug follows NODE_ENV (on in development, off otherwise)

Deprecated: NEXT_PUBLIC_IS_DEBUG_MODE.

Analytics (PostHog)

VariableRole
ENDATIX_POSTHOG_KEYProject API key. Shown in full on the Environment page (it already ships to the browser)
ENDATIX_POSTHOG_HOSTCapture host. Default https://us.i.posthog.com
ENDATIX_POSTHOG_UI_HOSTOptional UI host for deep links

Deprecated: NEXT_PUBLIC_POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_HOST, NEXT_PUBLIC_POSTHOG_UI_HOST.

reCAPTCHA

VariableRole
ENDATIX_RECAPTCHA_SITE_KEYGoogle reCAPTCHA v3 site key. Shown in full on the Environment page (it is already public in the browser)

Deprecated: NEXT_PUBLIC_RECAPTCHA_SITE_KEY.

SurveyJS

VariableRole
ENDATIX_SURVEY_LICENSE_KEYCreator licence. Server-only. Never in the public client config. Environment page: Set / Not set

Deprecated: NEXT_PUBLIC_SLK.

Submitter labels (optional)

VariableRole
ENDATIX_SUBMITTER_PRIMARY_FILTER_LABELFilter label. Default Submitter
ENDATIX_SUBMITTER_GRID_PROFILE_FIELDSComma-separated profile fields for the submissions grid

Deprecated: NEXT_PUBLIC_SUBMITTER_PRIMARY_FILTER_LABEL, NEXT_PUBLIC_SUBMITTER_GRID_PROFILE_FIELDS. Not shown on the Environment page in v1.

Deprecated NEXT_PUBLIC_* names

Existing self-hosted .env files keep working across the rename. Prefer the ENDATIX_* names in new deployments.

CurrentDeprecated (boot-time fallback)
ENDATIX_SURVEY_LICENSE_KEYNEXT_PUBLIC_SLK
ENDATIX_RECAPTCHA_SITE_KEYNEXT_PUBLIC_RECAPTCHA_SITE_KEY
ENDATIX_POSTHOG_KEYNEXT_PUBLIC_POSTHOG_KEY
ENDATIX_POSTHOG_HOSTNEXT_PUBLIC_POSTHOG_HOST
ENDATIX_POSTHOG_UI_HOSTNEXT_PUBLIC_POSTHOG_UI_HOST
ENDATIX_IS_DEBUG_MODENEXT_PUBLIC_IS_DEBUG_MODE
ENDATIX_SUBMITTER_PRIMARY_FILTER_LABELNEXT_PUBLIC_SUBMITTER_PRIMARY_FILTER_LABEL
ENDATIX_SUBMITTER_GRID_PROFILE_FIELDSNEXT_PUBLIC_SUBMITTER_GRID_PROFILE_FIELDS

NEXT_PUBLIC_BASE_PATH is not in this table. It is still Next.js’s public base path and is a build-time setting.

What else to configure

TopicHub keys (summary)Details
Sign-in / SSOAUTH_KEYCLOAK_*, AUTH_GOOGLE_*Authentication
File uploadsSTORAGE_PROVIDER, STORAGE_AZURE_*, STORAGE_S3_*Asset storage
Path prefixNEXT_PUBLIC_BASE_PATHSubfolder deployment
Proxy / TLSAUTH_URL, AUTH_TRUST_HOSTReverse proxy
Data-list questionsENDATIX_ENABLE_EXTENSIONSOff in Hub by default; Helm defaults on
Slack, OpenTelemetry, maintenance, robotsSee .env.exampleOptional. Storage and auth stay on their own admin pages

Containers

Helm maps api.baseUrlENDATIX_BASE_URL, api.apiUrlENDATIX_API_URL, and experimental.extensionsENDATIX_ENABLE_EXTENSIONS. Set those as pod env, not Docker build args.

The same rule applies to request-time keys (ENDATIX_POSTHOG_*, ENDATIX_SURVEY_LICENSE_KEY, ENDATIX_IS_DEBUG_MODE, …): change the pod env and recycle the Hub process. Do not bake them into the image.