The Variables tab holds your application's configuration as environment variables. They are passed to the process when it runs, which is how you set things like a port, a feature flag, an API key or a database URL.
Add variables
- Add one at a time with a Name and a Value.
- Paste a .env file to add many at once: one
KEY=valueper line, up to 100 at a time. - For a GitHub source, Read .env.example from GitHub pulls the keys from your repository's example file so you can fill in the values.
A variable name must start with a letter and use only uppercase letters, digits
and underscores, for example DATABASE_URL or LOG_LEVEL.
Secrets are protected
Every value is encrypted at rest. A value whose name looks like a secret, for
example anything with SECRET, TOKEN, PASSWORD, KEY or CREDENTIAL in it,
is masked in the portal and shown as dots. Editing other fields leaves a
masked value untouched, so you do not have to re-enter a secret to change
something next to it.
Changes apply on your next deploy
Changing a variable does not restart the app by itself. It stages a new release with the updated configuration, which you apply by deploying. The tab reminds you that changes apply on your next deploy. This keeps configuration versioned: a rollback brings back the variables that release was deployed with.
Database credentials are better attached than pasted
If the value is a connection to one of your managed databases, attach the database instead of copying its URL into a variable. Attached credentials are injected at boot and follow a password rotation on their own.