Skip to content

Environment Variables Reference

Fresh

All variables go in .env.local (dev) or your hosting provider's environment settings (production).

Required Variables

VariableDescriptionWhere to Get
NEXTAUTH_URLApp URL (http://localhost:3000 for dev)Set manually
NEXTAUTH_SECRETRandom 15+ char string for JWTGenerate yourself

Authentication

VariableDescriptionWhere to Get
GOOGLE_IDGoogle OAuth Client IDGoogle Cloud Console
GOOGLE_SECRETGoogle OAuth Client SecretGoogle Cloud Console

Database

VariableDescriptionWhere to Get
MONGODB_URIMongoDB connection stringMongoDB Atlas

Email

VariableDescriptionWhere to Get
RESEND_API_KEYResend API keyResend Dashboard

Payments

VariableDescriptionWhere to Get
STRIPE_PUBLIC_KEYStripe publishable keyStripe Dashboard > Developers
STRIPE_SECRET_KEYStripe secret keyStripe Dashboard > Developers
STRIPE_WEBHOOK_SECRETWebhook signing secretStripe CLI or Dashboard > Webhooks

Rate Limiting (Optional)

VariableDescriptionWhere to Get
UPSTASH_REDIS_REST_URLUpstash Redis URLUpstash Console
UPSTASH_REDIS_REST_TOKENUpstash Redis tokenUpstash Console