What each stack includes
| Stack | Keys (examples) | Detailed page |
|---|---|---|
| Next.js | NEXTAUTH_SECRET, Supabase, Stripe keys | Next.js .env |
| Node.js | PORT, DATABASE_URL, JWT_SECRET | Node.js .env |
| Django | SECRET_KEY, ALLOWED_HOSTS, Redis, Celery | Django .env |
| Rails | RAILS_MASTER_KEY, SECRET_KEY_BASE | Rails .env |
| Laravel | APP_KEY, DB_*, REDIS_* | Laravel .env |
| Stripe | secret, publishable, webhook, price IDs | Stripe .env |
| Supabase | URL, anon key, service role key | Supabase .env |
| Docker / Kubernetes | Postgres, Redis, app settings | Docker .env |
Every stack page explains its keys, shows how the framework loads them, and lists the errors people hit most. The rest: React, Python, Go, Kubernetes, Firebase, OpenAI.
From generated file to running app
- Generate, download, and save the file as
.env(Next.js:.env.local) in the project root. - Add
.env*with an exception for.env.exampleto.gitignore: see how to hide .env from git. - Replace placeholders with real service credentials from each dashboard.
- Check the result with the .env validator.
- For production, generate new secrets and set them in your host's environment settings instead of uploading the file.
# .gitignore .env* !.env.example
Why framework secrets need the right format
| Key | Expected format | What happens with a wrong one |
|---|---|---|
Laravel APP_KEY | base64: + base64 of 32 bytes | "Unsupported cipher or incorrect key length" |
Rails RAILS_MASTER_KEY | 32 hex characters | credentials can't be decrypted |
Rails SECRET_KEY_BASE | 128 hex characters (by convention) | works, but differs from bin/rails secret |
NEXTAUTH_SECRET / AUTH_SECRET | any long random string; base64 of 32 bytes by convention | MissingSecret if empty |
Django SECRET_KEY | any string ≥ 50 characters | deploy check warning W009 if too short |
For a single key with more options, use the dedicated generators: Laravel APP_KEY, Rails secret keys, NextAuth secret, Django secret key.