# Environment variables

> Which environment variables Elide programs see in `process.env`, the TMPDIR and ELIDE_SYS_TMP values Elide sets, loading .env files, and `--allow-env`.

Programs read their application environment through `process.env`; writes do not reach subprocesses.

## Variables Elide sets

| Variable | Value |
| --- | --- |
| `TMPDIR` | A per-run directory, removed on exit. `TMP` and `TEMP` on Windows. |
| `ELIDE_SYS_TMP` | The system temporary directory. `os.tmpdir()` returns it. |

Elide does not set `NODE_ENV`.

## Dotenv files

Since Elide 1.6.2, application commands load `.env` and then `.env.local` before the program starts. Inherited
environment variables take precedence. Use `--env-file` to choose files explicitly or `--no-env` to disable automatic
loading. See [Environment and properties](https://elide.help/docs/environment) for directory selection, precedence and encrypted values.

`process.loadEnvFile([path])` also remains available to load a file from JavaScript; its default path is `./.env`.

## Security

`elide.pkl` reads only a short list of variables; `--allow-env[=NAMES]` lets it read more
([Build Flags](https://elide.help/docs/toolchain/build-flags#environment-variables)). It does not filter `process.env`.

Variables that configure Elide itself: [Runtime Environment Variables](https://elide.help/docs/runtime-env-variables).
