Skip to content

Environment variables

Environment variables configure script and service behavior, enabling dynamic execution across different environments.

Retrieve environment variables from a script via the Contextual tab on the Variable page, or use “+Context Var” when creating a script.

NameDefaultDescriptionScope
DATABASE_URLPostgres database URLAll
WORKER_GROUPdefaultWorker group assignment and configuration sourceWorker
MODEstandaloneBinary mode (standalone, worker, server, agent)All
METRICS_ADDRNoneSocket address for Prometheus metrics exposure (EE only)All
JSON_FMTfalseOutput logs in JSON formatAll
BASE_URLhttp://localhost:8000Public instance access URLServer
ZOMBIE_JOB_TIMEOUT30Timeout (seconds) before job marked as zombieServer
RESTART_ZOMBIE_JOBStrueRestart zombie jobs in-place or fail themServer
SLEEP_QUEUE50Milliseconds between job queue checksWorker
NATIVE_MODEfalseEnable native job processing with subworkersWorker
KEEP_JOB_DIRfalsePreserve job directory after completionWorker
ENABLE_UNSHARE_PIDfalseEnable PID namespace isolation (Linux only)Worker
DISABLE_NSJAILtrueNSJAIL sandboxing statusWorker
LICENSE_KEYNoneEnterprise Edition license keyWorker
SLACK_SIGNING_SECRETNoneSlack app signing secretServer
COOKIE_DOMAINNoneCookie domain settingServer
DENO_PATH/usr/bin/denoDeno binary pathWorker
PYTHON_PATH/usr/local/bin/python3Python binary pathWorker
GO_PATH/usr/bin/goGo binary pathWorker
DATABASE_CONNECTIONS50/3Max database connection pool sizeAll
SUPERADMIN_SECRETNoneToken for virtual superadmin accessServer
TIMEOUT_WAIT_RESULT20Seconds to wait on ‘run_wait_result’ endpointWorker
QUIETfalseSuppress verbose worker logs in productionWorker
ORVANTA_DIR/tmp/orvantaBase directory for temporary job filesWorker

Orvanta automatically sets contextual variables providing implicit credentials and execution context:

NameExampleDescription
WM_WORKSPACEdemoCurrent script’s workspace ID
WM_TOKENq1E2qcLyO00yxioll7oph76N9CJDqnEphemeral token with equivalent run permissions
WM_EMAILuser@example.comExecuting user’s email
WM_USERNAMErubenExecuting user’s username
WM_BASE_URLhttps://app.orvanta.cloud/Instance base URL
WM_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddCurrent script’s job ID
WM_JOB_PATHu/user/script_pathScript or flow execution path
WM_FLOW_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddEncapsulating flow’s job ID
WM_WORKER_GROUPdefaultJob execution worker group name

Workspace admins can create custom contextual variables functioning as environment variables for all workspace jobs. User-defined variables are recommended for most cases.

In self-hosted environments, scripts can access custom environment variables set before execution. This supports libraries requiring environment variables during initialization. Format: <KEY>=<VALUE>.

Worker groups support static and dynamic environment variables passed to handled jobs. Dynamic values load from the worker host environment, while static values are set directly.