# Configure Docker environment variables

> Add, import, review, and update environment values without placing secrets in source control.

Environment variables configure the app without hard-coding deployment-specific values into the image or repository.

## Add values during creation

In **Create New App**, add key and value rows, use **Pull from Repo** to scan supported repository environment files, or paste bulk values as one `KEY=value` entry per line and select **Use Bulk Values**.

Review imported values before creating the app. Repository examples may contain placeholders, development URLs, or non-secret defaults that are wrong for production.

## Update an existing app

Open **Apps → your app → Configuration** and use the environment editor. Add, edit, or remove values, then save. Redeploy or restart when the interface indicates that the running containers need the new configuration.

Masked saved values represent secrets that AppLaunch does not return in plain text. Do not overwrite a masked value unless you intend to replace it.

## Valid names and values

Use names such as `DATABASE_URL`, `APP_ENV`, or `PORT`. Names must use the format accepted by the dashboard, normally letters, numbers, and underscores without spaces. An empty value is different from a missing variable.

Multiline certificates or keys may require an application-specific encoding. Follow the application's official instructions rather than changing line breaks by guesswork.

## Keep secrets safe

- Do not commit production `.env` files.
- Do not paste secrets into build logs, support tickets, screenshots, or public repositories.
- Rotate a secret if it was exposed, then update AppLaunch and redeploy.
- Give each app its own database, API, and webhook credentials where possible.

## Verify the change

After saving, open **Deployments**, **Build Logs**, and **Logs**. Confirm the app reaches **Running** and test the affected function. A successful container start does not prove that external services or credentials work.

For repeated failures, see [Troubleshoot a Docker app](/docker/troubleshooting/).
