# dflow apps:env:set

> Merge one non-secret variable; wait for deploy when the app is already running.

Web page: /docs/cli/apps/apps-env-set/

This sets one environment variable that is not a secret. Before the first deploy it only stores the value and prints `status stored`. After an image exists, it waits for a new deploy unless you pass `--wait=false`.

```bash
dflow apps:env:set APP KEY=VALUE
```

## Flags

`--wait` defaults to true. `--wait-timeout` defaults to 5m.

## What you see

Before the first deploy, the API stores the value and prints `status stored`. After an image exists, the command waits for the deploy operation to finish unless `--wait=false`.

## When it fails

A missing application exits 3. A name that starts with `DFLOW_`, and the names `PORT` and `KUBERNETES_SERVICE_HOST`, are reserved and exit 1.

After `db:link`, PostgreSQL, MySQL, and MongoDB keep `DFLOW_DATABASE_*`, including `DFLOW_DATABASE_HOST`, `DFLOW_DATABASE_PORT`, `DFLOW_DATABASE_NAME`, and `DFLOW_DATABASE_USERNAME`. Redis keeps `DFLOW_REDIS_*`. This command does not send those names back. Setting or changing one of them is refused.
