BetterStarter logo
BetterStarter
Docs
Quick Start

Go Live

Deploy BetterStarter to production in 2 minutes.

Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).

Deploy early — even before the app is "finished." Going live on a skeleton is 10x easier than deploying a feature-heavy app for the first time.

What You Need

  1. A hosting platform for the app — Vercel (recommended) or Netlify
  2. A PostgreSQL database — Neon (recommended) or Supabase

Step 1 — Set Production Environment Variables

In your hosting platform, add these required variables:

APP_BASE_URL=https://yourdomain.com
BETTER_AUTH_URL=https://yourdomain.com
BETTER_AUTH_SECRET=<random secret>
DATABASE_URL=postgres://...

Add optional variables (Stripe, Plunk, Google) as you enable each feature.

Step 2 — Run Database Migrations

Temporarily change .env.local with DATABASE_URL=postgres://your_production_db_url_neon_or_supabase_or_others

Then run:

pnpm db:migrate

This will apply your database changes to your production database.

Note: Be sure to revert the DATABASE_URL back to the local-db-url to continue local development

Step 3 — Deploy

See the Vercel or Netlify deploy guides for step-by-step instructions.

In short BetterStarter comes with vercel.json and netlify.toml. Vercel and Netlify will read those settings and know exactly how to deploy your project.

BetterStarter outputs a standard Node.js server and also works on Railway, Render, Fly.io, and Cloudflare Workers.

Production Database Workflow

For schema changes after launch:

  1. Edit schema in src/db/schema/
  2. pnpm db:generate — creates migration SQL
  3. Review generated SQL in drizzle/
  4. Back up production DB
  5. pnpm db:migrate — applies migration

Avoid db:push in production. Use db:migrate for all schema changes.

On this page