Skip to main content

Environment Variables Reference

All environment variables used across Kuploy components, grouped by concern.

Licensing

VariableDescriptionDefaultRequired
LICENSE_KEYLicense key from kuploy.app(none)Yes (Cloud)
LICENSE_HUB_URLLicense hub URLhttps://kuploy.appNo
LICENSE_SYNC_INTERVAL_SECONDSHow often to sync usage with license hub300 (5 min)No
LICENSE_SYNC_RETRY_SECONDSRetry interval on sync failure60 (1 min)No

LICENSE_KEY and LICENSE_HUB_URL can also be configured via the admin UI (Admin → Domains → License Hub Integration). UI-saved config takes precedence over environment variables and does not require a restart.

Stripe Billing

VariableDescriptionDefaultRequired
STRIPE_SECRET_KEYStripe API secret key(none)Yes (Cloud)
STRIPE_PUBLISHABLE_KEYStripe publishable key(none)Yes (Cloud)
STRIPE_WEBHOOK_SECRETWebhook signing secret(none)Yes (Cloud)

Authentication

VariableDescriptionDefaultRequired
BETTER_AUTH_SECRETAuthentication secret (32+ chars)(none)Yes (Cloud)
PLATFORM_ADMIN_EMAILEmail of the first platform admin(none)Recommended

SMTP

VariableDescriptionDefaultRequired
SMTP_HOSTSMTP server hostname(none)Recommended
SMTP_PORTSMTP port587No
SMTP_USERSMTP authentication username(none)If SMTP_HOST set
SMTP_PASSSMTP authentication password(none)If SMTP_HOST set
SMTP_FROMSender email address(none)If SMTP_HOST set
SMTP_FROM_NAMESender display nameKuployNo

Database

VariableDescriptionDefaultRequired
DATABASE_URLPostgreSQL connection string(none)Yes
REDIS_URLRedis connection string(none)Yes

Encryption

VariableDescriptionDefaultRequired
APP_SECRETEncryption key for admin-saved secrets (Stalwart token, registry password, Stripe keys, etc.). Must be the same across all replicas and deployments that share a database.(none)Yes (Cloud)

If two deployments share a database but have different APP_SECRET values, encrypted fields saved by one can't be decrypted by the other. The admin UI surfaces a "token decryption failed" alert and falls back to environment variables. See Email Hosting for details.

Default Container Registry

VariableDescriptionDefaultRequired
DEFAULT_REGISTRY_URLHostname of the container registry (e.g. registry.ceduth.dev)(none)If not set via admin UI
DEFAULT_REGISTRY_USERNAMERegistry username (e.g. robot$kuploy+kuploy for Harbor)(none)If not set via admin UI
DEFAULT_REGISTRY_PASSWORDRegistry password or robot-account token(none)If not set via admin UI
DEFAULT_REGISTRY_IMAGE_PREFIXImage namespace prefix (e.g. kuploy)(none)No

Can also be configured via Admin → Default Registry (password encrypted in database). Admin UI settings take precedence.

Email Hosting (Stalwart)

VariableDescriptionDefaultRequired
STALWART_API_URLStalwart management REST API URL (e.g. http://stalwart-api:8080)(none)If not set via admin UI
STALWART_API_TOKENStalwart API key (Bearer token from Directory → API Keys)(none)If not set via admin UI

Can also be configured via Admin → Email Hosting (Stalwart) (token encrypted in database). Admin UI settings take precedence.

Status Page (kuploy-cloud)

VariableDescriptionDefaultRequired
STATUS_PROBE_INTERVAL_SECONDSHow often the in-process probe scheduler runs (clamped 60–3600)300 (5 min)No
PLATFORM_STATUS_URLOverride URL for the upstream platform status feed. Set to empty string to hide the "Upstream platform" row entirely.${LICENSE_HUB_URL}/api/statusNo

Status Page (kuploy-app / licensing hub)

VariableDescriptionDefaultRequired
REGISTRY_PROBE_URLHostname of the shared container registry to probe on the central status page (e.g. registry.ceduth.dev)(none)No
REGISTRY_PROBE_USERRegistry username for the probe (read-only access is sufficient)(none)If REGISTRY_PROBE_URL set
REGISTRY_PROBE_PASSWORDRegistry password / token for the probe(none)If REGISTRY_PROBE_URL set

These are separate from kuploy-cloud's DEFAULT_REGISTRY_* because kuploy-app (Vercel) doesn't share kuploy-cloud's config. The probe only needs read access — a read-only robot account is ideal.

Application

VariableDescriptionDefaultRequired
NEXT_PUBLIC_APP_URLPublic URL of the kuploy-cloud instance(none)Recommended
PORTPort the application listens on3000No
NODE_ENVNode.js environmentproductionNo

Cron

VariableDescriptionDefaultRequired
CRON_SECRETSecret for authenticating cron job requests(none)If using cron

Site Import API

VariableDescriptionDefaultRequired
ADMIN_API_KEYAdmin API key for programmatic access (bypasses org scoping)(none)No

ADMIN_API_KEY is for platform operators running migration scripts. Regular users should use API keys generated from Settings → API Keys instead.

Configuration Priority

When the same setting is available via both environment variable and the admin dashboard:

  1. Admin dashboard (stored encrypted in database) — highest priority
  2. Environment variable — fallback

This means you can override environment variables through the admin dashboard without restarting the application. See Admin Dashboard for details.