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
OV_WORKSPACEdemoCurrent script’s workspace ID
OV_TOKENq1E2qcLyO00yxioll7oph76N9CJDqnEphemeral token with equivalent run permissions
OV_EMAILuser@example.comExecuting user’s email
OV_USERNAMErubenExecuting user’s username
OV_BASE_URLhttps://app.orvanta.cloud/Instance base URL
OV_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddCurrent script’s job ID
OV_JOB_PATHu/user/script_pathScript or flow execution path
OV_FLOW_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddEncapsulating flow’s job ID
OV_ROOT_FLOW_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddInnermost root flow’s job ID, if the job is a flow step
OV_ROOT_JOB_ID017e0ad5-f499-73b6-5488-92a61c5196ddRoot job’s ID
OV_FLOW_PATHu/user/flow_pathEncapsulating flow’s path, if the job is a flow step
OV_FLOW_STEP_IDaNode id of the current step in a flow (e.g. a, b, f)
OV_SCHEDULE_PATHu/user/schedule_pathPath of the schedule that triggered the job, if any
OV_SCHEDULED_FOR2014-11-28T12:45:59ZUTC date-time the job was scheduled for, if triggered by a schedule
OV_PERMISSIONED_ASu/rubenFully qualified (u/ or g/) owner name the job executes as
OV_STATE_PATHu/user/script_path/userState resource path unique to a script and its trigger
OV_OBJECT_PATHscript_path/manual/1732800000000_017e0ad5-f499-73b6-5488-92a61c5196ddUnique execution path for the script or flow step, useful as a storage key in an external service
OV_WORKER_GROUPdefaultName of the worker group the job is running on
OV_RUNNABLE_ID017e0ad5f49973b6Hash of the script; useful as a cache key for runnable-specific caching
OV_END_USER_EMAILenduser@example.comEnd user’s email; only set when the job was triggered from an app
OV_TESTED_RUNNABLEscript/u/user/script_pathQualified path of the runnable that triggered a CI test; empty unless the job came from a CI test annotation

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.