Skip to content

Environment Variables

File Strategy

FileGit TrackedPurpose
.env.developmentYesLocal Supabase defaults (localhost)
.env.productionYesProduction key names only (values empty)
.env.localNoPersonal overrides (Supabase Cloud keys, etc.)

How It Works

  • next dev automatically loads .env.development
  • next build automatically loads .env.production
  • .env.local overrides all environments (highest priority)
  • Vercel deployment: set environment variables in Vercel dashboard

Variables

VariableDescription
NEXT_PUBLIC_SUPABASE_URLSupabase API URL
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anonymous key (public)
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (server-only)
DATABASE_URLPostgreSQL connection string