Watch: Add my API keys to Vercel production safely | Vovy

Watch Vovy do it on a Mac: "Move the keys from my .env file into Vercel production". Copy your .env values into Vercel's Environment Variables for Production and Preview, keep secret keys off the browser, and redeploy so they take effect.

"Move the keys from my .env file into Vercel production"

Copy your .env values into Vercel's Environment Variables for Production and Preview, keep secret keys off the browser, and redeploy so they take effect.

What happens in the video

  1. Read your local .env file: Vovy lists every variable in your .env and sorts them into public ones (like VITE_ or NEXT_PUBLIC_ names, which ship to the browser) and secret ones that must stay on the server.
  2. Flag secrets in the wrong place: If a secret key like a Stripe sk_live key has a VITE_ prefix, anyone can read it in the browser. Vovy warns you in a card before anything goes to production.
  3. Open Environment Variables in Vercel: Vovy opens your project's Settings, then Environment Variables, and pastes each key and value, choosing Production, Preview, or both.
  4. Redeploy so the keys load: Vercel only applies new variables to new deployments. Vovy asks, then clicks Redeploy on your latest production deployment.
  5. Confirm the app reads them: Vovy opens your live site and checks the console for errors like "Invalid API key" or undefined values, then shows a table of what's set where.
Read the step-by-step guide