School · Module 4 · Lesson 1 of 4

Set env vars per environment

A live key in Preview is a live key on a public URL.

On Vercel, mark secrets for Production only when they are live keys. Give Preview and Development the test or sandbox equivalents.

Pull env locally with vercel env pull and keep the result gitignored. Do not paste live keys into a teammate's .env over chat.

Rotate a key in the dashboard and redeploy; changing the value without a redeploy leaves old serverless isolates on the previous value until they recycle.

On ShipSafe

Sources

Lab