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.
Neon is a serverless PostgreSQL service with a generous free tier.
Setup
- Create a free account at neon.tech
- Create a new project
- 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=requireRun Migrations
pnpm db:generate
pnpm db:migrateNotes
- 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 1 project with 512 MB storage