Skip to content
Hoist

Shared variables

A shared variable group holds variables that several projects need, such as a mail provider's key or a monitoring token. Change a value once and every linked project gets it on its next deploy.

Shared groups are on the Team plan. If you move to another plan, existing groups keep working, but you can't create or link new ones.

Creating a group

Go to Team settings → Shared variables → New group, give it a name and an optional description, then add its variables. You can add them one by one or paste a whole .env file.

As with a project's own variables, each one can apply to Deploys (the project's own deployments), Preview deploys, or both. Values are encrypted at rest and hidden in logs.

Linking a group to a project

On the project's Settings → Environment variables page, choose Link a group. Its variables are added on the next deploy.

When the same name is set in more than one place:

  1. the project's own variable wins
  2. then the group linked most recently
  3. then groups linked earlier

Unlink a group to remove its variables from the project on the next deploy.

Applying a change

Changing a group doesn't restart anything. Linked projects pick up the change on their next deploy, or choose Redeploy linked projects on the group's page to apply it now.

History

The group's History shows which variable was added, changed or removed, by whom and when. Values are never shown in the history.

Who can do what

  • Admins and owners create, rename and delete groups, and edit their variables.
  • Developers, admins and owners can reveal a value. Every reveal is recorded in the audit log.
  • Developers can redeploy linked projects.