env.dev

Vercel Environment Variables: Dashboard, CLI & Edge

How to configure environment variables on Vercel. Covers the dashboard, CLI (vercel env pull), system variables, per-environment settings, and Edge function access.

Last updated:

Loading…

Frequently Asked Questions

How do I set environment variables on Vercel?

Go to Project Settings > Environment Variables in the Vercel dashboard. Add each variable with its value and select which environments it applies to: Production, Preview, Development, or all three.

Why are my environment variables not working in Vercel preview deployments?

Check that the variable is enabled for the Preview environment in your Vercel project settings. Also ensure you are using the correct branch scope if you have branch-specific overrides configured.

What is VERCEL_URL?

VERCEL_URL is a system environment variable that contains the deployment URL (without the protocol). It changes for every deployment. Use it to construct absolute URLs in your application, but prefer NEXT_PUBLIC_VERCEL_URL for client-side access in Next.js.

Was this helpful?

Stay up to date

Get notified about new guides, tools, and cheatsheets.