Vercel Environment Variables
Configure production environment variables in Vercel so your deployed web app has access to all required credentials. These mirror the variables from your local apps/web/.env.local.
Required variables
# Firebase (client-side)
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
# Firebase Admin (server-side)
FIREBASE_SERVICE_ACCOUNT_BASE64=...
# Stripe
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_STARTER_PRICE_ID=price_...
STRIPE_PRO_PRICE_ID=price_...
Method 1: Vercel Dashboard (recommended)
- Open your project in Vercel
- Go to Settings > Environment Variables
- Add each variable above for the Production environment
- Optionally add separate values for Preview (staging) environments
- Redeploy to apply changes
Method 2: Vercel CLI
cd apps/web
# Firebase
vercel env add NEXT_PUBLIC_FIREBASE_API_KEY production
vercel env add NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN production
vercel env add NEXT_PUBLIC_FIREBASE_PROJECT_ID production
vercel env add NEXT_PUBLIC_FIREBASE_APP_ID production
vercel env add NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET production
vercel env add FIREBASE_SERVICE_ACCOUNT_BASE64 production
# Stripe
vercel env add STRIPE_SECRET_KEY production
vercel env add NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY production
vercel env add STRIPE_WEBHOOK_SECRET production
vercel env add STRIPE_STARTER_PRICE_ID production
vercel env add STRIPE_PRO_PRICE_ID production
After adding variables
- Trigger a new deployment (push a commit or click Redeploy in Vercel)
- Verify env presence by visiting
/api/debug-envon the deployed URL (shows variable presence without revealing values)
Never commit real secrets to the repository. Use placeholders in documentation and store actual values only in Vercel's environment configuration.
Related docs
- Environment & Tooling — Complete variable reference
- Stripe Setup — Stripe configuration details
- Deployment Guide — Full deployment walkthrough