Deployment variables and capability bindings, what breaks without them, and which host needs them. Operator configuration may additionally name environment variables explicitly; those names are not source authority.
Configure Auth0 and the app URLs, with local file storage unless Mongo is selected. Copy
applications/main/.env.example and provision secret values outside source control. Presence-only startup logging
is diagnostic, not proof that credentials, endpoints or keyrings are valid.
APP_BASE_URL=http://localhost:3000 NEXT_PUBLIC_APP_BASE_URL=http://localhost:3000 # Supply required AUTH0_* through your local secret configuration.
See Auth0 setup, installation and deployment bindings.
| Variable | Purpose |
|---|---|
APP_BASE_URL | Server-generated public process links and application redirects |
NEXT_PUBLIC_APP_BASE_URL | Public browser origin used by compiled presentation links |
STORAGE_DRIVER | Explicit memory, file, mongo or postgres; memory is ephemeral, not durable production storage. Any other value ends the process at startup with exit code 1 (and is a preflight issue), never a fallback to another store |
MONGO_URL | Mongo connection when selected; without an explicit driver, its presence selects Mongo. Publishing a template version needs a replica set (replicaSet=rs0; see operations/mongo-replica-set.md) |
DATABASE_URL | Postgres connection (postgres://…) for STORAGE_DRIVER=postgres, which is required with it and never selects Postgres on its own. The database must already carry this build's engine migrations (npm run db:migrate, a separate release step); a service on a database behind, ahead of or differing from this build exits at startup with code 1 and says what to run |
TEMPLATE_PUBLISH_SETTLE_MS | Release step (npm run release): how long to wait for in-flight work on a template's processes to settle, default 60000, at most 150000 (one budget for every wait in the step) |
NODE_ENV | Framework runtime mode |
| Variable | Purpose |
|---|---|
AUTH0_DOMAIN | Tenant domain |
AUTH0_AUDIENCE | API identifier the access token is issued for |
AUTH0_CLIENT_ID / AUTH0_CLIENT_SECRET | Application credentials |
AUTH0_SECRET | Session configuration |
AUTH0_MGMT_CLIENT_ID / AUTH0_MGMT_CLIENT_SECRET | Organization picker and directory/impersonation resolution |
AUTH0_JWKS_URL | Backend: override of the token signing-key source, for synthetic test key servers. Honoured only when it is a loopback URL; any other value is ignored and the tenant's https://<AUTH0_DOMAIN>/.well-known/jwks.json is used |
PROCESS_LOCAL_IDENTITY_URL | Backend: loopback origin of the offline local identity provider (e.g. http://127.0.0.1:4319). Sends authorize, token, key and directory calls there instead of Auth0, and drops the Management API requirement. Refused (startup fails) unless the whole environment is loopback-only with a .invalid AUTH0_DOMAIN; set by npm run qa:local, never by hand. See offline local development |
PROCESS_IDENTITY_CACHE_TTL_MS | Backend: per-user verified-identity cache lifetime, default 30000; 0 disables. This is the revocation lag for blocked/changed identities |
PROCESS_IDENTITY_CACHE_MAX_ENTRIES | Backend: identity cache bound, default 1000 (least recently used evicted) |
AUTH0_EMAIL_CLAIM / NEXT_PUBLIC_AUTH0_EMAIL_CLAIM | Optional custom email claim |
HIDDEN_ACTOR_ROLE_NAMES | Comma-separated role names omitted from actor display; does not remove permission to act |
The main application maps these names to stable capability aliases. Missing optional credentials leave a capability unavailable at dispatch; they do not change the compiled program. Malformed supplied key/JSON configuration, or absent required persistent keyring material when signing is configured, can fail host initialization.
| Variable | Default app binding |
|---|---|
SLACK_BOT_TOKEN | Slack |
DUNE_API_KEY | Dune |
NOTION_API_KEY | Notion |
GOOGLE_SERVICE_ACCOUNT_JSON | Sheets service-account JSON; takes precedence over split variables |
GOOGLE_SERVICE_ACCOUNT_EMAIL / GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY | Alternative Sheets credentials when JSON is absent; split private key expands literal escaped newlines |
SAFE_API_KEY | Safe Transaction Service |
SAFE_EXECUTOR_PRIVATE_KEY | Safe broadcaster/payer signing key |
ETH_RPC_URL | Default Safe RPC endpoint |
The old requireSafeExecuteEnvOrExit helper no longer exists. Source privateKeyEnv / rpcUrlEnv
overrides are compatibility identifiers, not permission to read arbitrary environment variables.
Nondefault pairs require a bindings.safeAliases entry in PROCESS_APP_CONFIG, selected with the
app's safeBindingKey; that alias must resolve to configured signing and endpoint capabilities.
Default RPC provisioning strips supported Alchemy/Infura path credentials into protected insertion. Other authenticated endpoint shapes require explicit public URL and secret-placement configuration. Public endpoint definitions must not contain raw credentials.
| Variable | Purpose |
|---|---|
PROCESS_ONTOLOGY_CHANGE | on ships the ontology change template (registered, published at startup, github credential bound); unset, empty or off ships nothing of it. Any other value throws when the registry loads, failing the release step and every service. Set the same value on every web service and the worker. See the Phase 2 design note §17.10 |
PROCESS_PRIMES_FROM_ONTOLOGY | on takes the Primes from the ontology (Phase 4): the Prime dropdowns read the ontology's Prime agents live through PROCESS_ONTOLOGY_ORIGIN/PROCESS_ONTOLOGY_TOKEN, and spell-request v21 and spell-prime-batch v6 are current (their release maps every stored Prime name to its ontology id, and refuses when it cannot). Unset, empty or off (production today) ships the builds from before Phase 4 (spell-request v20, spell-prime-batch v5, allocation-risk with its Prime table): nothing reads the ontology. Any other value throws when the registry loads. Set the same value on every web service, the worker and the release step; turn it on only once the ontology holds every Prime the runs name, with its profile. See the Phase 4 note |
PROCESS_ONTOLOGY_ORIGIN | The ontology API's origin for templates' ontology endpoint (ontologyRequest / ontologyPages): https://…, or http://127.0.0.1:<port> / http://[::1]:<port> in a local development environment (set by npm run qa:local -- --ontology). Anything else fails startup. Unset, the endpoint is unbound and a read fails with endpoint-unavailable |
PROCESS_ONTOLOGY_TOKEN | With PROCESS_ONTOLOGY_ORIGIN: a platform access token whose owner holds ontology:read in the ontology application, sent as Authorization: Bearer on GET under /api/ of that origin only. Templates read with its owner's grants. Optional when PROCESS_ONTOLOGY_SERVICE_SECRET is set, which takes its place (a startup warning names both when both are set) |
PROCESS_ONTOLOGY_SERVICE_SECRET | The ProcessOS service credential (design note): one secret of at least 32 letters, digits, _ or - (openssl rand -hex 32), or current,previous while rotating. Set the same value on web, the Step Runner and the ontology service. On web and the Step Runner, with PROCESS_ONTOLOGY_ORIGIN, it replaces PROCESS_ONTOLOGY_TOKEN: the first value is sent as Authorization: Bearer ppsvc_<secret>, under the same policy (GET under /api/ of that origin only), and templates read as the ProcessOS account with the grants the access policy names for it in the ontology application ("platformAccountRoles": ["reader"] on that application's entry), never more than ontology:read. On web it also lets GET /api/service-identity answer the ontology API, accepting every listed value. Unset (the default): the credential is off everywhere and nothing changes. A malformed value fails startup; the value is never logged |
PROCESS_GOOGLE_DRIVE_COMMENT_FILES | Spreadsheet (Drive file) ids whose Drive comments (driveComments) and sharing (the permissions list, decision 16 of the CC Buffer payments) templates may read, comma-separated. Each adds two GETs, each an exact path, to the Google service-account token's policy: https://www.googleapis.com/drive/v3/files/<id>/comments and .../<id>/permissions. Comments tied to their cells (sheetsComments, the Sheets API's commentsViewMode) need no entry: they are a read under the token's existing GET /v4/spreadsheets/ grant. Unset: nothing about Drive is granted. A malformed id fails startup. The grant is per file, open to every registered template, like the other policies. Ignored when PROCESS_APP_CONFIG supplies the configuration |
PROCESS_GITHUB_TOKEN | Worker, only with PROCESS_ONTOLOGY_CHANGE=on: the pull-request watcher's read-only token for soterlabs/process-platform (Authorization: Bearer, GET requests under that repository's API path only); ignored when the switch is off |
| Variable | Purpose |
|---|---|
PROCESS_APP_CONFIG | Main-app trusted JSON path containing authoring bindings and optional generic effects; replaces default provisioning |
PROCESS_DOCS_ROOT | Optional trusted served-Markdown asset directory; root wrappers default it to applications/main/docs, while a direct main-app command defaults to cwd docs |
PROCESS_BACKEND_CONFIG | Standalone backend trusted JSON path containing compiled registrations, relative document assets and optional effect provisioning; no config means no shipped app registry |
PROCESS_EXTRA_TEMPLATES | Optional trusted absolute path to a JSON array of compiled registrations, published at startup alongside the app's or backend's templates (same key replaces). Validated (closed registration + execution digest); receives no extra effect approvals. Used by isolated verification; never an HTTP path |
PROCESS_EFFECT_ENCRYPTION_KEY | Default main-app protected-store encryption key: 32 bytes encoded as base64, required when Safe or Sheets signing is configured |
PROCESS_EFFECT_DERIVATION_KEY | Separate persistent 32-byte base64 handle-derivation key, required with signing; do not reuse the encryption key |
PROCESS_EFFECT_ENCRYPTION_KEY_ID | Record key id that PROCESS_EFFECT_ENCRYPTION_KEY seals under; default active (the original id). Set a new id whenever the key is rotated. See effect key rotation |
PROCESS_EFFECT_ENCRYPTION_KEY_PREVIOUS | Optional decrypt-only retired encryption key (32-byte base64), kept only until effects:rotate-key has resealed every record |
PROCESS_EFFECT_ENCRYPTION_KEY_PREVIOUS_ID | Record key id of the previous key; default active |
PROCESS_EFFECT_DERIVATION_KEY_PREVIOUS | Optional retired handle-derivation key: replays of occurrences minted before a derivation rotation keep their original handle |
Never accept provisioning paths from an untrusted request. For explicit effects, encryption.keys,
derivationKeyEnvironment, credential environment and signing-key environment select operator-owned
names; they need not be the defaults above. Provision their values out-of-band and keep keyrings durable
and consistent across workers sharing protected storage. Regenerating random keys does not recover
existing protected handles. Never place secrets in authoring metadata, logs, committed config or
NEXT_PUBLIC_* variables.
Main-app policy: repository templates compiled into the app may use the current deployment's
configured capabilities. There is no runtime authoring path (templates:write is retired). That does not create arbitrary destinations or
let source metadata manufacture grants. Generic standalone deployments remain operator-explicit and
deny capabilities by default. Follow deployment bindings.
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_FRONTEND_ID | Main-app skin: default, allocation-risk or spell-request; unknown ids fail configuration |
PROCESS_BACKEND_ORIGIN | Independent Spell frontend's one configured HTTP(S) backend origin; not a user-supplied proxy target |
PROCESS_APPLICATION_ID | App frontends (Spell, allocation-risk, generic): the declared applicationId their proxy stamps as the trusted list scope, e.g. workflow:spell-request. Optional; unset lists every member app. Must match the backend access policy or lists return 404 |
Next.js public variables require static property access to be inlined in browser output. Set them for the intended build; private capability configuration belongs only on authorized server hosts.
| Variable | Purpose |
|---|---|
PROCESS_FILES_ROOT | File repository root; make durable/shared where the deployment requires it |
PROCESS_FILES_DRIVER | fs for filesystem or memory for ephemeral fixtures; normal production default is filesystem |
MAX_PROCESS_FILE_BYTES | Upload size cap |
CORS_ALLOWED_ORIGINS | Explicit permitted browser origins for direct cross-origin API calls; standalone defaults deny |
STORAGE_DRIVER=memory|file|mongo|postgres → explicit (postgres needs DATABASE_URL) STORAGE_DRIVER=anything else → exit code 1 at startup (no fallback) otherwise MONGO_URL set → MongoDB otherwise → files in .process-platform/
VITEST selects synthetic defaults in tests, not production. Configuration changes require a restart.
Postgres is never inferred from DATABASE_URL; nothing migrates at startup (db:migrate is run by a person in
the release step, and startup only verifies the schema is this build's).
Old formats require offline conversion; startup does not reinterpret or migrate records automatically.
See storage.
The data migration commands (npm run storage:copy, npm run storage:verify) read their connection strings from
dedicated variables only, never from MONGO_URL or DATABASE_URL: SOURCE_MONGO_URL and TARGET_DATABASE_URL
for the cutover, SOURCE_DATABASE_URL and TARGET_MONGO_URL for a rollback. They are set in the operator's shell
for those commands, never on a service. See the cutover runbook.
Build secrets are not needed to determine the stable compiled program. Do not copy production secrets into fixtures to prove a build. See deployment before activation.
Set exactly one of PROCESS_ACCESS_CONFIG (private JSON file path) or PROCESS_ACCESS_CONFIG_JSON.
All web services and workers require the same reviewed owner/application policy. A file is preferable
for large membership policies. An application entry may name roles for the ProcessOS account with
"platformAccountRoles": ["<role key>", …] (roles of that application): only the ontology application's entry
means anything today, read by GET /api/service-identity for the ProcessOS service credential
(PROCESS_ONTOLOGY_SERVICE_SECRET); it is not membership and grants nothing in ProcessOS itself. Missing/invalid policy fails closed; applicationAccess inside backend
provisioning is no longer supported. See application access.
AUTH0_ONBOARDING_ORGANIZATION_ID is an explicit invitation destination, not a data tenant assignment.