Docs

Environment variables

Define, edit, and apply project environment variables at build and runtime.

What is an environment variable?

An environment variable is a KEY=value pair your app reads at build time and at runtime. It lets you change environment settings, such as a database URL or runtime mode, without changing code.

Edit variables

  1. Open the project page.
  2. Go to the Settings tab.
  3. Select Envs.
  4. Edit the variables.
  5. Click update envs.
You can enter each variable in its own row or switch to text mode and paste them all at once. In text mode, every line must be KEY=value.
Limits:
  • Up to 300 variables.
  • A key may contain letters, numbers, -, _, and ..
  • A value must not contain " or end with \.
  • A line starting with # is accepted as a comment.

What happens after saving?

How the change is applied depends on the project type and status:
  • Frontend and some Node project types create a new pipeline.
  • Other projects restart the app.
  • If the project is in Insufficient balance, the change is saved but not applied until you top up.
After saving, check the Pipelines or Logs tab.

Security notes

  • Put secrets and tokens in environment variables, not in the repository.
  • Variables are visible to project team members.
  • Limit team access for sensitive values.

Troubleshooting

  • Changes not applied: check whether a new pipeline was created or the project restarted.
  • Build fails after the change: check the value; double quotes and trailing backslashes are not allowed.
  • App does not start: make sure keys match the names the app expects.

Related