Environment variables
These live in your .env file (or in Vercel → Settings → Environment Variables).
Copy from .env.example and fill in real values.
Required
| Variable | What it does |
|---|---|
DATABASE_URL | Connection to your database |
AUTH_SECRET | Secret used to sign login sessions — make it long and random |
NEXT_PUBLIC_APP_URL | Public URL of your site, like https://docs.example.com |
Admin seed (first setup)
| Variable | What it does |
|---|---|
SEED_ADMIN_EMAIL | Admin login email created by npm run db:seed |
SEED_ADMIN_PASSWORD | Admin password |
SEED_ADMIN_NAME | Display name |
Media (images & files)
| Variable | What it does |
|---|---|
SUPABASE_URL | Optional. Your Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY | Optional. Enables Supabase Storage for uploads |
If the service role key is not set, uploads are stored in the database instead. That works on any host (VPS, Docker, Vercel).
Custom domains
| Variable | What it does |
|---|---|
CUSTOM_DOMAIN_MAP | JSON map of hostname → project slug |
Example:
envCUSTOM_DOMAIN_MAP={"docs.myproduct.com":"guide"}
Visitors to docs.myproduct.com see the guide project docs.
Email (optional)
| Variable | What it does |
|---|---|
SMTP_HOST | Mail server host |
SMTP_PORT | Usually 587 |
SMTP_USER | SMTP username |
SMTP_PASS | SMTP password |
EMAIL_FROM | From address shown to users |
Without SMTP, the app still runs. Verification / reset messages go to the server console.
