BetterStarter logo
BetterStarter
Docs
GuidesDatabase

Neon

Use Neon serverless PostgreSQL as your database.

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

Neon is a serverless PostgreSQL service with a generous free tier.

Setup

  1. Create a free account at neon.tech
  2. Create a new project
  3. Go to Connection Details and copy the Connection string

Configure

Add to .env.local:

DATABASE_URL=postgres://user:password@ep-xyz.us-east-2.aws.neon.tech/neondb?sslmode=require

Run Migrations

pnpm db:generate
pnpm db:migrate

Notes

  • Neon branches are great for staging environments — each branch gets its own isolated database
  • For production, use the pooled connection string for connection pooling at scale
  • The free tier supports 100 project with 0.5 GB of storage per project (Really generous)

On this page