# Environment variables | DRE

> Every DRE_* variable and what it does.

You're reading the docs for DRE 0.4 (v0.4.4). [This page for 0.5](https://getdre.com/docs/environment-variables/) · [New in 0.5](https://getdre.com/docs/new-in-0.5/)

# Environment variables

Variable

Effect

`DRE_PROFILES_DIR`

Directory holding `profiles.yml` (default: the project directory if it has one, else `~/.dre`). `--profiles-dir` overrides it.

`DRE_PLUGINS_DIR`

One plugins directory for every project, instead of each project’s `dre_deps/plugins`.

`DRE_REGISTRY_URL`

The plugin package registry index (a URL or a local path).

`DRE_TARGET`

The run’s target (environment), `target.name`: every profile uses its entry for it. `--target` overrides it; without either, each profile uses its own `target:` in `profiles.yml`, else `dev`. New in 0.2.

`DRE_TARGET_PATH`

Where DRE writes its generated files (default: `target/` in the project). `--target-path` overrides it; it overrides `target_path:` in `dre_project.yml`.

`GITHUB_TOKEN`

Sent to GitHub by `dre system update` and `github:` plugin sources (private repositories, rate limits).

`DRE_HTTP_TIMEOUT`

Seconds a download (the plugin registry, a plugin package, a DRE update) may receive nothing before it’s tried again (default 60; 3 tries in all, on connection errors, timeouts, 429 and 5xx). Connecting gives up after 30 seconds. It wins over `flags: http_timeout` in `dre_project.yml`. New in 0.4.

`DRE_RUN_TIMEOUT`

How long a `dre run` may take before it’s stopped (its Bindings recorded as `timed_out`, exit code 124): a duration such as `2h` or `90m`, or seconds. `--timeout` overrides it; it overrides `flags: run_timeout`. Off by default. New in 0.4.

`DRE_KEEP_RUNS`

How many runs of each report and Set to keep in the target path (default 1; the current run always stays). `--keep-runs` overrides it; it overrides `flags: keep_runs`. New in 0.4.

`DRE_THREADS`

How many Bindings may run at once in a `dre run`, over each connection entry’s `threads:` (see [Running Bindings at once](https://getdre.com/docs/v0.4/connections/#running-bindings-at-once)). `--threads` overrides it. New in 0.4.

`DRE_GITHUB_API_URL`

The GitHub API for `github:` plugin sources and `dre system update` (GitHub Enterprise, a mirror).

`DRE_RUN_DATE`

The run date (`YYYY-MM-DD`) behind `run.date`, instead of today. It wins over `DRE_RUN_AT`’s date.

`DRE_RUN_AT`

The instant a run was scheduled for (RFC 3339, e.g. `2026-09-01T06:00:00Z`). It becomes `run.now` and `run.scheduled_at`, gives `run.date` (that instant’s date in the run’s timezone) when `DRE_RUN_DATE` isn’t set, and is recorded as `scheduled_at` in `run_results.json`. `dre schedule ls` puts it in every occurrence’s command.

`DRE_TIMEZONE`

The run’s timezone (IANA name), above every `timezone:` setting. `--timezone` overrides it.

`DRE_PLUGIN_HANDSHAKE_TIMEOUT_MS`

How long to wait for a plugin to start (default 30,000).

`NO_COLOR`

Turns off coloured output.

`DRE_SECRET_*`

Values are masked as `*****` in the console, logs, JSON events, the manifest, `run_results.json`, schema snapshots and `target/compiled/`. If a source rejects SQL containing a secret, its opaque error detail is omitted because databases may truncate or transform the value. Variables that `profiles.yml` reads through `env_var()` into a secret field (`password`, `token`, `api_key`, or a field the plugin marks secret) are masked the same way; paths and hosts are not. `mask_secrets: false` in `dre_project.yml` turns masking off. Query result files are not altered.

## Give a scheduled run stable inputs

For the complete [regional reports project](https://github.com/get-dre/dre/blob/v0.4.4/examples/regional-reports/), persist artifacts and pass the intended instant rather than the retry’s wall clock:

```bash
export DRE_TARGET_PATH=/mnt/shared/dre/target
export DRE_KEEP_RUNS=7
export DRE_RUN_TIMEOUT=30m
cd examples/regional-reports
DRE_RUN_AT=2026-10-05T09:00:00Z dre run --schedule monday_north --preview 5
```

`monday_north` is that project’s named schedule. Command flags override their matching environment variables; those override YAML. `DRE_RUN_DATE` overrides the date derived from `DRE_RUN_AT`, so leave it unset when the scheduled instant should decide the date.

Configure secrets in the runner’s secret store and use `env_var('DRE_SECRET_NAME')` in profiles. Check only whether they exist, never print their values. `unset-env-var` means a required value was not available in the process that ran DRE; setting it in another terminal is not enough. `missing-target-entry` means `DRE_TARGET` named an entry absent from a used profile. See [orchestration](https://getdre.com/docs/v0.4/orchestration/), [CLI flags](https://getdre.com/docs/v0.4/cli-reference/), [error codes](https://getdre.com/docs/v0.4/reference-error-codes/), [target](https://getdre.com/docs/v0.4/glossary/#target) and [target path](https://getdre.com/docs/v0.4/glossary/#target-path).

[Previous  
Editor setup](https://getdre.com/docs/v0.4/editor-setup/)[Next  
Tested examples](https://getdre.com/docs/v0.4/examples/)
