Vercel Deployment Guide
April 7, 2026 ยท View on GitHub
Recommended setup
- Import the GitHub repository into Vercel.
- Use the framework preset detected for Next.js.
- Keep the root directory as the repository root.
- Add environment variables in Project Settings instead of
vercel.json.
Minimum environment variables
NEXT_PUBLIC_APP_URLNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYPOSTGRES_HOSTorDATABASE_URLPOSTGRES_PORTPOSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDREDIS_URLAI_PROVIDERGEMINI_API_KEYorOPENAI_API_KEYorDEEPSEEK_API_KEYNEXT_PUBLIC_PARTYKIT_HOSTCORS_ALLOWED_ORIGINSSESSION_COOKIE_NAMESESSION_MAX_AGE_SECONDS
Production recommendations
- Set
NEXT_PUBLIC_APP_URLto the production domain. - Set
CORS_ALLOWED_ORIGINSto your production domain and preview domains when needed. - Use managed PostgreSQL and Redis instead of local services.
- Keep preview and production secrets separated in Vercel environments.
Before promoting to production
- Confirm
npm run buildpasses locally. - Verify Clerk keys match the target environment.
- Confirm database migrations or
prisma db pushstrategy. - Confirm PartyKit host points at the deployed collaboration service.
- Smoke test sign-in, dashboard, playground, practice, and API health routes.