Skip to content
Skip to Content

Variables

Environment variables for a service, set on the whole project, on one environment or on the service itself, and how they reach its containers.

Variables are the environment variables your service's containers get. You can set one for a single service, or share it with every service of a project or of one environment.

In the console, a service's own variables are on its Variables tab, and the ones shared with the whole project or one environment are on the project's Shared variables page. The CLI, the API and MCP do the same.

Where a variable is set

ScopeWho gets it
ProjectEvery service in the project.
EnvironmentEvery service in that environment of the project: production, or another a project admin added, such as staging.
ServiceThat service only.

When the same name is set in more than one scope, the narrowest wins: the service's own over the environment's, the environment's over the project's.

Set, list and remove

  • For one service: open the project, click the service on the canvas, and go to its Variables tab. It lists the service's own variables, and under them what the project and its environment share with it.
  • For the whole project or one environment: open the project's Shared variables page. It has a card for the whole project and one for each environment.
  • Add: click Add variable, give a Name and a Value, tick Secret to keep the value sealed, and click Add variable.
  • Change or remove: use Edit or Delete on the variable's row. A secret's value can only be replaced, never shown.

Changes take effect at the service's next deploy.

Setting a name that is already set in the same scope replaces it.

Changes take effect at the next deploy

Setting or removing a variable changes nothing that runs. The next deploy gives the service its variables as they are then, and its deployment keeps that copy, so a rollback runs with the variables of the day you roll back.

What a service gets

To see every variable a service will get at its next deploy, with the scope each comes from:

openpanel env get DATABASE_URL --project shop --service api

env get with --service reads one name as the service gets it. To write them all to a file, see .env files.

Values are shown as you typed them; references are worked out at the deploy.

Names and values

  • Names are letters, digits and underscores, do not start with a digit, and are at most 256 characters. Case matters.
  • Values are text up to 64 KB. Line breaks are kept.

Who can do what

Can viewCan deploy and above
List variables and read plain values✓✓
Set, replace and remove variables–✓
Read a secret's value––

Anyone who can see a project can read its plain values, so keep tokens and passwords as secrets. Access is per project: see Per-project access. Every change is in the audit log, by name, never by value.