Skip to main content

Environment

Template: pnxt-api-nestjs/.env.example. Validation: environment.validation.ts. Domain code is expected to read settings with ConfigService, not process.env.

Do not commit .env. This page names variables. It does not include secret values.

Required to boot​

From comments in the example file and the validation module:

  • Database URL for host runs.
  • Redis URL.
  • JWT access and refresh secrets. They must differ. In production each must be at least 32 characters.
  • Credential vault key CREDENTIAL_VAULT_KEY_V1. This is not the JWT secret. Integration credentials are encrypted with it, with a version field.
  • S3-compatible access key, secret, region, and bucket. Comments say Cloudflare R2 works through the same client. If AWS_S3_PUBLIC_URL is unset, the public URL fallback 404s on R2.
  • AI base URL, API key, and model names, even when the AI workspace feature is off.
  • SENTRY_DSN when APP_ENV=production.
  • DEMO_SEED_PASSWORD on any reachable host.

AI_WORKSPACE_ENABLED must be the exact string true. Any other value fails AI routes closed with ai.error.workspaceDisabled. A daily token budget of 0 disables that limit (example-file comment).

Groups that become mandatory together​

Once the first key in a group is set, the rest of the group is required at boot: SMTP, Razorpay, Amazon SP-API, Flipkart, BigCommerce.

GroupTrigger observed
SMTPSMTP_HOST set makes port and from-address mandatory
RazorpayRAZORPAY_KEY_ID set makes secret and webhook secret mandatory
Amazonclient id set makes region and marketplace id required

Stripe for WhatsApp is not in the main env block that was read. The adapter reads a secret from agent configuration.

Feature flags and local sidecars​

VariableObserved behavior
APP_ENVproduction skips Swagger and tightens validation. Enum values include production, staging, development, local
APP_LOG_LEVELPino level. Containers default to info
APP_DEBUG / app.debugStack traces and validation arrays in HTTP bodies only when debug is on
Cloudflare Turnstile keysBlank keys disable the login/register CAPTCHA
META_APP_SECRETWhatsApp webhook HMAC. Unsigned payloads are rejected when it is unset (env comment)
BHARATADDRESS_SIDECAR_URLAddress validation sidecar
VOICE_STT_URL / VOICE_TTS_URLDefault to local Faster-Whisper and Kokoro
BULL_BOARD_USER / BULL_BOARD_PASSWORDBasic auth for /admin/queues

Admin and warehouse​

AppVariableSource
AdminVITE_API_URLpnxt-admin/.env.example, example value http://localhost:3001
AdminVITE_CLOUDFLARE_TURNSTILE_SITE_KEY, VITE_META_APP_ID, VITE_META_EMBEDDED_SIGNUP_CONFIG_IDsame example file
WarehouseEXPO_PUBLIC_API_URLpnxt-warehouse/README.md

API CORS and ADMIN_APP_URL in the API example file point at http://localhost:5173.