Before You Deploy
Make sure you’ve checked off these prerequisites:Your app runs and works locally
Better Auth env vars are configured
Drizzle migrations have been applied to your production database
You know your production domain
You have your env vars ready to paste into Vercel
Deploy to Vercel
Push your repo to GitHub
If you haven’t already, push your code to a GitHub repository. Vercel connects directly to GitHub for automatic deployments.
Import into Vercel
Head to vercel.com, click Add New Project, and import your GitHub repo. Vercel will auto-detect that it’s a Next.js app.
Configure build settings
Use these defaults:
| Setting | Value |
|---|---|
| Install command | pnpm install |
| Build command | pnpm build |
| Start command | pnpm start |
After Deployment
Once your app is live, come back and update these settings to use your production domain:Update auth-related URLs
- Set
NEXT_PUBLIC_APP_URLto your live domain (if not already) - Update
BETTER_AUTH_URLif you use the override - Update your Google OAuth redirect URIs to
https://yourdomain.com/api/auth/callback/google - Update auth email sender/domain settings in your email provider
Update payment and webhook URLs
Point your payment webhook URLs to your live domain. Each payment provider (Polar, Stripe, LemonSqueezy) has its own webhook settings — update them to use your production URL.
Optional Env Vars
You only need to add env vars for the features you actually use. Here are the common extras:- Auth Emails
- Google OAuth
- Other Services
OpenAI is still required if you want PDF RAG embeddings or GPT Image, even if you use a different LLM provider for chat.
Post-Deploy Verification
Run through this checklist to make sure everything is healthy:The live landing page loads
Auth works on the live domain (sign up, sign in)
/ loads after sign-inYour main enabled feature works in production

