> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Default environment variables

> Look up the environment variables Domino sets in every execution, and choose between user, Project, and Compute Environment variables for your own values.

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.

| Kind | Applies to | Use it for |
| - | - | - |
| [User variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/4-setup-user-environment-variables.md) | Every execution you start, in any Project | Credentials that belong to you |
| [Project variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/2-build-project-variables.md) | Every execution in the Project, whoever starts it | Service account credentials and shared settings |
| [Compute Environment variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/1-compute-environment-variables.md) | Every execution that uses the environment, in any Project | Tool configuration and values computed when an execution starts |

### 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](https://docs.domino.ai/cloud/platform-capabilities/features/coding-assistants/reuse-credentials.md) 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](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/projects/manage-projects.md#export-and-import-project-content) 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](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition.md#dockerfile-instructions) 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](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition.md#run-setup-scripts) 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.

> [!NOTE]
>
> 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](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables#reserved-variable-names-in-domino).

## Project and execution

| Variable | Value |
| - | - |
| `DOMINO_PROJECT_ID` | ID of the Project. |
| `DOMINO_PROJECT_NAME` | Name of the Project. |
| `DOMINO_PROJECT_OWNER` | Username of the Project owner. |
| `DOMINO_RUN_ID` | ID of the execution. |
| `DOMINO_RUN_NUMBER` | Number of the execution within the Project. |
| `DOMINO_STARTING_USERNAME` | Username of the user who started the execution. |
| `DOMINO_STARTING_USER_ID` | User ID of the user who started the execution. |
| `DOMINO_USER_NAME` | Username of the user who started the execution. |
| `DOMINO_HARDWARE_TIER_ID` | ID of the hardware tier the execution runs on. |
| `DOMINO_ENVIRONMENT_ID` | ID of the execution's Compute Environment. Set in Workspaces, Apps, and Launcher runs. |
| `DOMINO_ENVIRONMENT_REVISION_ID` | ID of the Compute Environment revision. Set in Workspaces, Apps, and Launcher runs. |
| `DOMINO_IS_GIT_BASED` | `true` in a Git-based Project, `false` in a Domino File System (DFS) Project. |
| `DOMINO_IS_WORKFLOW_JOB` | `true` when a [Flow](https://docs.domino.ai/cloud/platform-capabilities/features/flows) started the Job, otherwise `false`. |
| `DOMINO_IS_LOCAL_DATA_PLANE` | `true` when the execution runs on the local [Data Plane](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data-plane.md), `false` on a remote Data Plane. |
| `DOMINO_NODE_NAME` | Name of the compute node that runs the execution. |
| `DOMINO_NODE_IP` | IP address of that compute node. |
| `DOMINO_USER_ID` | `12574`, the Linux user ID that runs your code. |
| `DOMINO_GROUP_ID` | `12574`, the Linux group ID. |

## 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](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/netapp-volumes).

### Git-based Projects

| Variable | Path | Contents |
| - | - | - |
| `DOMINO_WORKING_DIR` | `/mnt/code` | Project code |
| `DOMINO_ARTIFACTS_DIR` | `/mnt/artifacts` | Project artifacts |
| `DOMINO_DATASETS_DIR` | `/mnt/data` | The Project's Datasets |
| `DOMINO_IMPORTED_DATA_DIR` | `/mnt/imported/data` | Datasets from other Projects |
| `DOMINO_IMPORTED_ARTIFACTS_DIR` | `/mnt/imported/artifacts` | Artifacts from imported Projects |
| `DOMINO_IMPORTED_CODE_DIR` | `/mnt/imported/code` | Imported Git repositories |
| `DOMINO_NETAPP_VOLUMES_DIR` | `/mnt/netapp-volumes` | NetApp Volumes |

### DFS Projects

| Variable | Path | Contents |
| - | - | - |
| `DOMINO_WORKING_DIR` | `/mnt`, or `/mnt/<owner>/<project>` when the Project imports another Project | Project files and artifacts |
| `DOMINO_DATASETS_DIR` | `/domino/datasets` | Datasets: the Project's own under `local/`, others directly under this path |
| `DOMINO_IMPORTED_CODE_DIR` | `/repos` | Imported Git repositories |
| `DOMINO_IMPORTED_PROJECTS_DIR` | `/mnt` | Imported Projects |
| `DOMINO_NETAPP_VOLUMES_DIR` | `/domino/netapp-volumes` | NetApp Volumes |

See [Understand Dataset paths](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots.md#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](https://docs.domino.ai/cloud/reference/api/data_api/trainingsets_usecases) 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

| Variable | Value |
| - | - |
| `DOMINO_API_PROXY` | Address of a local proxy that adds your access token to Domino API requests, such as `http://localhost:8899`. Send Domino API calls here; see [Use the API proxy](https://docs.domino.ai/cloud/reference/api/domino-api-authentication.md#use-the-api-proxy-for-domino-api-authentication). |
| `DOMINO_USER_HOST` | Address of the Domino API from inside the execution. Use `DOMINO_API_PROXY` for authenticated calls. |
| `MLFLOW_TRACKING_URI` | Address of the Domino [experiment tracking](https://docs.domino.ai/cloud/platform-capabilities/features/development/track-monitor.md) server. MLflow clients read it automatically. |
| `DOMINO_DATASOURCE_PROXY_HOST` | Address of the Data Source proxy. The [Domino Data API](https://docs.domino.ai/cloud/reference/api/data_api) reads it. |
| `DOMINO_DATASOURCE_PROXY_FLIGHT_HOST` | Arrow Flight address of the Data Source proxy. The Domino Data API reads it. |
| `DOMINO_DATA_API_GATEWAY` | Address the Domino Data API uses for vector database Data Sources. |
| `DOMINO_WEBVFS_HOST` | Address for Web Volume File System (WebVFS) requests, which perform file operations on NetApp Volumes and remote Datasets. Read this variable instead of hardcoding an address. |

## Apps and Workspaces

| Variable | Value |
| - | - |
| `DOMINO_RUN_HOST_PATH` | URL path that Domino's reverse proxy routes to the Workspace or App, ending in `/`. Use it as your App's base path; see [Request headers and environment variables for Apps](https://docs.domino.ai/cloud/platform-capabilities/features/apps/authentication-and-identity/request-headers-and-env-variables-apps.md). |
| `DOMINO_APP_ID` | ID of the App. Set in deployed agents only. |
| `DOMINO_APP_VERSION_ID` | ID of the App version. Set in deployed agents only. |
| `DOMINO_AGENT_IS_PROD` | `true` in deployed agents. Puts `init_tracing()` in the [Agents Python SDK](https://docs.domino.ai/cloud/reference/experiment-agent-sdk/python-sdk-agents.md) into production mode. |
| `DOMINO_WORKSPACE_PERSISTS_HOME` | `true` in a Workspace with [Home Directory Persistence](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/workspaces/use-package-persistence.md#home-directory-persistence) on. |

Deployed agents are Apps that you [deploy as agentic systems](https://docs.domino.ai/cloud/platform-capabilities/features/agents/deploy.md).

## Credentials

| Variable | Value |
| - | - |
| `AWS_SHARED_CREDENTIALS_FILE` | Path to the Amazon Web Services (AWS) credentials file that Domino writes when AWS credential propagation is enabled. AWS client libraries and command-line tools read it automatically. |
| `AWS_CREDENTIAL_PROFILES_FILE` | The same path, set when AWS credential propagation is enabled and a Spark cluster is attached. |
| `KRB5_CONFIG` | Path to a `krb5.conf` file. Set when [Kerberos authentication](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/spark/hadoop-and-spark/kerberos-authentication.md) is configured and the Project, or a Project it imports, contains the file. |

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](https://docs.domino.ai/cloud/platform-capabilities/features/model-deployment) 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:

| Variable | Value |
| - | - |
| `DOMINO_PROJECT_NAME` | Name of the Project when the version was built. |
| `DOMINO_PROJECT_OWNER` | Username of the Project owner when the version was built. |
| `DOMINO_WORKING_DIR` | Location of the Project files: `/mnt/code` for a Git-based Project, `/mnt/<owner>/<project>` for a DFS Project. |
| `DOMINO_USER_HOST` | Internal address of the Domino API. |
| `DOMINO_DATASOURCE_PROXY_HOST` | Address of the Data Source proxy. |
| `DOMINO_DATASOURCE_PROXY_FLIGHT_HOST` | Arrow Flight address of the Data Source proxy. |
| `MLFLOW_MODEL_URI` | `$DOMINO_WORKING_DIR/mlflow`, which holds the registered model. Set only for versions built from the Model Registry. |

Build a new version to pick up a Project rename or ownership change. To pass other values to an endpoint, set [Domino endpoint variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/3-create-model-variables.md).

## Compute clusters

When you attach a cluster to a Workspace or Job, Domino adds variables that point your code at the cluster:

| Variable | Value | Cluster |
| - | - | - |
| `SPARK_MASTER_HOST`, `SPARK_MASTER_PORT` | Host name and port (`7077`) of the Spark master. | [Spark](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/spark/on-demand-spark) |
| `RAY_HEAD_SERVICE_HOST`, `RAY_HEAD_SERVICE_PORT` | Host name and port (`10001`) of the Ray head's client service. | [Ray](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/ray) |
| `DASK_SCHEDULER_SERVICE_HOST`, `DASK_SCHEDULER_SERVICE_PORT` | Host name and port (`8786`) of the Dask scheduler. | [Dask](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/dask) |
| `OMPI_MCA_orte_default_hostfile` | `/domino/mpi/hosts`, the host file that lists the Message Passing Interface (MPI) workers. | [MPI](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/mpi) |
| `SLURM_CONF_SERVER` | Address of the Slurm controller. | [Slurm](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/slurm.md) |
| `SBATCH_PARTITION` | Slurm partition for the cluster. | Slurm |
| `CLUSTER_MLFLOW_TRACKING_URI` | Value of `MLFLOW_TRACKING_URI` inside the cluster's pods. | Any |

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](https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/slurm.md#submit-hpc-jobs-from-the-jobs-page) 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.

| Variable | Value | Use instead |
| - | - | - |
| `DOMINO_API_HOST` | Same value as `DOMINO_USER_HOST`. | `DOMINO_USER_HOST`, or `DOMINO_API_PROXY` for authenticated calls |
| `DOMINO_USER_API_KEY` | API key of the user who started the execution, when that user has one. | `DOMINO_API_PROXY` |

## Related

* [Manage environment variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) explains how to set your own variables at the Compute Environment, Project, endpoint, and user levels.
* [Access environment variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/4-setup-user-environment-variables.md#access-environment-variables) shows how to read a variable in Python and R.
* [Domino API authentication](https://docs.domino.ai/cloud/reference/api/domino-api-authentication.md) covers the API proxy and token options.
* [Request headers and environment variables for Apps](https://docs.domino.ai/cloud/platform-capabilities/features/apps/authentication-and-identity/request-headers-and-env-variables-apps.md) lists the headers Domino adds to App requests.


## Related topics

- [User Environment Variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/4-setup-user-environment-variables.md)
- [Compute Environment Variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/1-compute-environment-variables.md)
- [Manage Environment Variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/index.md)
- [Model Variables](https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables/3-create-model-variables.md)
