Vercel Integration: Environment variables explained
Last edited: 4/17/2026
Vercel has three environments, which map to different stages of the deployment lifecycle:
- Production is used for the branch configured as the production branch (usually main). Deployments from that branch go to the live site.
- Preview is used for all other Git branches, including pull requests, feature branches, and persistent branches like staging. If you deploy a staging branch, it still runs under the Preview environment unless you explicitly create a separate environment in Vercel and map that branch to it.
- Development is only used for local development via the Vercel CLI (
vercel dev). It allows your local environment to pull env vars from Vercel, but it does not apply to Git branches or deployments on the platform.
Creating a staging environment#
On the Hobby plan, staging is implemented by scoping Preview environment variables to a branch. On the Pro plan, staging can be configured as a dedicated environment with its own settings.
You can create a dedicated environment (Vercel Pro):
- Go to
Project→Settings→Environments - Click
Create Environment - Name it
staging - Enable
Branch Trackingand select thestagingbranch - Add environment variables scoped to this environment
With this setup, the staging branch deploys to its own environment and is fully separate from Preview and Production.