GuidesDatabase
Supabase
Use Supabase as your PostgreSQL database.
Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter.
Supabase is an open-source Firebase alternative with a hosted PostgreSQL database and a generous free tier.
Setup
- Create a free account at supabase.com
- Create a new project
- Click Connect in the top header
- Go to ORMs → Drizzle
- Copy the Connection string (URI format)
Configure
Add to .env.local:
DATABASE_URL="postgresql://postgres.[PROJECT-ID]:[PASSWORD]@aws-1-us-east-1.pooler.supabase.com:6543/postgres"Run Migrations
pnpm db:generate
pnpm db:migrateNotes
- Use the pooled connection string (port
6543) for production deployments to handle connection limits - Use the direct connection string (port
5432) for running migrations - The free tier supports 2 projects with 500 MB storage each