Skip to main content
Read these variables in your code instead of hard-coding Project names, IDs, or file paths.

Use your own variables

Three kinds of variables carry your own values into executions. They differ in who owns the value and where it applies, so choose by what the value belongs to: a person, a Project, or an environment.

User variables

User variables carry credentials that belong to one person, such as your database login, API tokens, or Git credentials. Domino injects them into every Workspace, Job, and App you start. Set a credential once, and every Project you work in picks it up. When a collaborator runs the same code, Domino injects their values instead of yours. Each person connects with their own identity and permissions, and the systems they connect to record who did what. A scheduled Job uses its owner’s user variables. An App uses the variables of the user who started it, so everyone who views the App acts with that user’s credentials. Give an App a service account through a Project variable instead. Reuse coding assistant credentials shows user variables and a pre-run script working together.

Project variables

Project variables carry values that belong to the work rather than to a person. Every execution in the Project receives them, whoever starts it. Store a service account’s credentials here, so scheduled Jobs, Apps, and Flows don’t depend on one person’s login. They keep running when the person who set them up is away or leaves the team. Project variables also keep shared settings consistent, such as a bucket name, an API base URL, or a model threshold. Change a value once, and every collaborator’s next execution uses it. A Project can also export its variables to Projects that import it, so one Project can supply configuration to several others. Anyone who can run code in the Project can read its variables. Give a service account only the access the Project needs.

Compute Environment variables

Compute Environment variables apply to every execution that uses the environment, in any Project. Set them in the environment definition in two ways:
  • An ENV instruction in the Dockerfile sets a fixed value when the image builds. Use it for configuration that every Project needs, such as a proxy address, a package index URL, or a cache directory.
  • A pre-run script exports values when each execution starts, so a value can depend on the execution. The script can read the default variables and your user and Project variables, and compute new values from them. It can add a Project folder to the Python path with export PYTHONPATH=$DOMINO_WORKING_DIR/src, size thread pools to the execution’s CPUs, or exchange a user’s credential for a short-lived token.
Don’t put secrets in ENV, because anyone who can use the image can read them. Use user or Project variables for credentials.

When names collide

When more than one source sets the same name, later sources win: Compute Environment ENV values, then Project variables, then user variables, then pre-run script exports. A Project can set a default, such as a shared read-only login, that one user replaces with a user variable of the same name.
Don’t name your own variables after the defaults on this page or with the DOMINO_ prefix. Domino doesn’t block such names, but a duplicate can override Domino’s value or be overwritten by it. See reserved variable names.

Project and execution

File paths

Paths depend on the Project type, and a variable missing from a Project type’s table isn’t set there. DOMINO_NETAPP_VOLUMES_DIR is set only in Workspaces, Apps, and Launcher runs that mount a NetApp Volume.

Git-based Projects

DFS Projects

See Understand Dataset paths for snapshot paths.

Variables for both Project types

A Project that imports other Projects also gets DOMINO_<OWNER>_<PROJECT>_WORKING_DIR for each one, set to that Project’s mount path. Domino upper-cases the owner’s username and the Project name and replaces every character other than a letter or digit with _. A Project named churn-model owned by jane.doe sets DOMINO_JANE_DOE_CHURN_MODEL_WORKING_DIR. DOMINO_TRAINING_SET_PATH points to TrainingSet storage at /var/opt/domino/trainingset/project. Domino sets it in executions that mount a Dataset or can use the Project’s TrainingSets.

Domino services

Apps and Workspaces

Deployed agents are Apps that you deploy as agentic systems.

Credentials

Both AWS variables point to /var/lib/domino/home/.aws/credentials. Domino sets them in Workspaces and Jobs, including Flow tasks, but not in Apps, Launcher runs, or scheduled Jobs.

Domino endpoints

A Domino endpoint serves a model and doesn’t receive run, user, or Project variables. Its image is built from the Compute Environment image, so the environment’s ENV values carry over. Domino also writes these variables into the image when it builds each version, replacing any ENV value with the same name: Build a new version to pick up a Project rename or ownership change. To pass other values to an endpoint, set Domino endpoint variables.

Compute clusters

When you attach a cluster to a Workspace or Job, Domino adds variables that point your code at the cluster: Code on the cluster’s own pods, such as Spark executors or Ray workers, runs in the cluster’s Compute Environment and receives only a few Domino variables, such as DOMINO_API_PROXY, DOMINO_USER_HOST, and MLFLOW_TRACKING_URI. It doesn’t receive Project, run, or user variables, or your own user and Project variables. Pass the values your cluster code needs from the Workspace or Job, for example as task arguments. A Slurm job that you submit with sbatch from a Workspace inherits the Workspace’s environment, because Slurm exports the submitting environment by default. High-performance computing (HPC) Jobs that Domino submits for you receive no Domino variables, only PATH and Slurm’s own job variables, such as SLURM_JOB_ID.

Deprecated variables

Domino keeps these for older code. Use the replacement in new code.
Last modified on October 26, 2026