Vercel Environment Variables Setup
None Are Required
A copy builds and goes live on Vercel with no environment variables at all. With none, it has no sign-in, /admin and /party stay locked, and database-backed sections are empty. Add a group when you want what it opens.
The step-by-step version is DEPLOY.. Every optional key is documented in .env.example.
What Each Group Opens
| Keys | What they open | Walkthrough |
|---|---|---|
DATABASE_URL, DIRECT_DATABASE_URL | Thoughts, votes, steps, submissions, your admin data | CREATE YOUR DATABASE. |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY | Sign-in, /party, /admin | ADD SIGN-IN. |
FOUNDER_USER_ID | Marks your account as the founder's | MAKE YOURSELF ADMIN. |
CRON_SECRET | The daily jobs in vercel.json. Set it once you have a database. Without it they answer Unauthorized, which is harmless | DEPLOY. |
- Keys
DATABASE_URL,DIRECT_DATABASE_URL- What they open
- Thoughts, votes, steps, submissions, your admin data
- Walkthrough
- CREATE YOUR DATABASE.
Adding One in Vercel
1. Open your project, then Settings → Environment Variables.
2. Add the name and value, with no quote marks and no spaces at either end.
3. Open Deployments, click ⋯ on the newest one, and choose Redeploy. A site only sees a new value after a redeploy, and NEXT_PUBLIC_ values are built into it.
If Something Is Off
Sign in says "no sign-in here yet" after you added Clerk: the two keys are missing or swapped. The one starting pk_ is the publishable key. Fix them, then redeploy.
Pages can't reach the database: a value probably kept its quote marks or picked up a space. Edit it, then redeploy.
A cron job answers Unauthorized after you added a database: CRON_SECRET is missing in Vercel, or you changed it without redeploying.
Never commit .env. Git ignores it.