Variables
Environment variables for your app, and the ones Teral sets.
Variables are passed to your app as environment variables, and to the build as build secrets. Teral stores them encrypted. You manage them on the app's Environment Variables page.
Add variables
Give each variable a name, a value and an environment. All Environments adds it to both. You can add several at once:
- paste lines in
KEY=valueform - drop a
.envfile on the form
A name can exist once per environment. To change a name everywhere at once, use Rename in all environments.
Names should be valid environment variable names: letters, digits and underscores, not starting with a digit.
Sensitive variables
Mark a variable as sensitive for API keys, passwords and tokens. After you save it, nobody can see or copy its value again, not even you. You can still replace it with a new value or delete it. You can't make a sensitive variable readable again.
Variables that aren't sensitive can be revealed and copied in the dashboard, which is handy for settings such as URLs or feature flags.
When changes take effect
A deployment keeps the variables it started with. After changing variables, start a new deployment, for example with Redeploy, so your app picks them up.
Variables Teral sets
Every instance also gets these variables:
| Variable | Value |
|---|---|
PORT | The port from the app's settings. Listen on it. |
TERAL_DEPLOYMENT_ID | The ID of the deployment. |
TERAL_ENVIRONMENT_SLUG | production or preview. |
TERAL_REGION | The region the instance runs in. |
TERAL_INSTANCE_ID | The ID of this instance. Different for every instance. |
TERAL_GIT_COMMIT_SHA | The deployed commit. Empty for image apps. |
TERAL_GIT_BRANCH | The branch of the deployed commit. |
TERAL_GIT_REPO | The repository, as owner/name. |
TERAL_GIT_COMMIT_MESSAGE | The message of the deployed commit. |
TERAL_EPHEMERAL_DISK_PATH | /data, if the app has storage. |
If you define a variable with one of these names, Teral's value wins.