Shared Environment Variables are Environment Variables that you define at the level of a Vercel Team and can link to multiple Projects.
In the past, when you need to use the same Project Environment Variable in another Project, you will re-create it in that Project. If the value of the Environment Variable changes, you must update the value on both Projects.
Shared Environment Variables help streamline the management of Environment Variables across multiple Projects. These allow you to define an Environment Variable at the Team level and link it to multiple Projects. When a Shared Environment Variable is updated, the change is applied to all linked Projects.
Shared Environment Variables are created on the Team Settings page. To create a new Shared Environment Variable, follow these steps:
From the scope selector, select the Team where you would like to create the Environment Variable. Click on the Settings tab and then select Environment Variables from the left navigation.


- Key: Fill in the
key
of the environment variable - Value: Fill in the
value
of the environment variable - Click Add another to add another key-value pair
- Paste the contents of a
.env
file inside any key field - Import the contents of a
.env
file by clicking the Import button at the bottom of the form - Environment: Select the Environments where you want to include it
- Link to Projects: Select one or more Projects in succession to link the new Shared Environment Variable by using the searchable drop-down. You can keep this empty and link to Projects later as shown in Linking to Projects
- Click Save to save your new Shared Environment Variable
A Shared Environment Variable is activated once it is linked to at least one Project. As shown above, you can link an Environment Variable to a Project during the creation process.
You can link an existing Shared Environment Variable to a Project either at the Project level or the Team level.
For Project-level linking, go to Project Settings → Environment Variables.
- Click on the Link Shared Environment Variables tab
- Select one or more Shared Environment Variables using the search box
- Click the Link button
For the Team where the Environment Variables are defined, go to Team Settings → Environment Variables.
Scroll down below the Shared Environment Variable creation form
Find the variable you would like to link. You can use the Search box, the Environments drop-down filter and sort by last updated date, name or type to more easily find the variable
Open the context menu for the specific Shared Environment Variable using the vertical ellipsis icon on the right hand side of the row, and click Edit
From the Environment Variable form, you can link additional Projects using the Link to Projects field
Click Save when you are done
There are two ways to remove a Shared Environment Variable from a Project:
- Unlinking: It is disassociated from the selected Project(s) but continues to exist at the level of the Team
- Deleting: It is permanently removed from the Team and disconnected from all Projects it was previously linked to
For the Project that you would like to unlink from, go to Project Settings → Environment Variables.


- Scroll down to the Shared Environment Variables section
- Open the context menu for the specific shared environment variable you would like to unlink using the vertical ellipsis icon on the right hand side
- Click Unlink from this Project
For the Team where the Environment Variables are defined, go to Team Settings → Environment Variables.
Scroll down below the Environment Variable creation form
Find the variable you would like to link. You can use the Search box, the Environments drop-down filter and sort by last updated date, name or type to more easily find the variable
Open the context menu for the specific shared environment variable using the vertical ellipsis icon on the right hand side of the row, and click Edit
From the Environment Variable form, click the minus icon to unlink existing Projects
Click the Save button when you are done
For the Team where the Environment Variables are defined, go to Team Settings → Environment Variables.
- Scroll down below the Environment Variable creation form
- Use the context menu on the specific Shared Environment Variable by clicking the vertical ellipsis icon on the right side of the row
- Click the Delete button
- Branch-specific variables are not currently supported with Shared Environment Variables
Was this helpful?