Teral
Configure

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=value form
  • drop a .env file 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:

VariableValue
PORTThe port from the app's settings. Listen on it.
TERAL_DEPLOYMENT_IDThe ID of the deployment.
TERAL_ENVIRONMENT_SLUGproduction or preview.
TERAL_REGIONThe region the instance runs in.
TERAL_INSTANCE_IDThe ID of this instance. Different for every instance.
TERAL_GIT_COMMIT_SHAThe deployed commit. Empty for image apps.
TERAL_GIT_BRANCHThe branch of the deployed commit.
TERAL_GIT_REPOThe repository, as owner/name.
TERAL_GIT_COMMIT_MESSAGEThe 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.

Edit on GitHub

On this page