Skip to main content
My Crypto Server uses PostgreSQL. Any Postgres works, but on Vercel you don’t set up connection strings by hand at all. Both Supabase and Neon are one-click integrations in the Vercel marketplace. Either works — both have a free tier, both give you the pooled and direct connections the app needs.
  1. Go to Vercel → your project → Integrations → Browse Marketplace.
  2. Add Supabase or Neon and create a database.
  3. Connect it to your project.
That’s it — the integration injects the environment variables automatically and the app auto-detects them. There’s nothing to copy or configure:
  • Supabase / Vercel Postgres inject POSTGRES_URL, POSTGRES_PRISMA_URL, and POSTGRES_URL_NON_POOLING.
  • Neon injects DATABASE_URL and DATABASE_URL_UNPOOLED.
The app maps whichever pair is present:
  • pooled URL → DATABASE_URL (for route handlers)
  • direct URL → DATABASE_URL_UNPOOLED (for migrations)

Self-managed Postgres (advanced)

If you’re hosting outside Vercel, or bringing your own database, set the two URLs yourself. You need one pooled connection and one direct (non-pooled) connection:

Running migrations

Migrations use Drizzle Kit.
For Vercel deployments, run migrations automatically as part of the build:
Or set it in vercel.json:

Connection URL resolution order

The app resolves database URLs in this order: Pooled (DATABASE_URL):
  1. DATABASE_URL
  2. POSTGRES_PRISMA_URL
  3. POSTGRES_URL
Direct (DATABASE_URL_UNPOOLED):
  1. DATABASE_URL_UNPOOLED
  2. POSTGRES_URL_NON_POOLING
You only need to set one pair — the app picks the first available value.

Troubleshooting

DATABASE_URL_UNPOOLED is required during build The migration runner needs a direct (non-pooled) connection. Set DATABASE_URL_UNPOOLED or attach Vercel Postgres storage which provides POSTGRES_URL_NON_POOLING. Too many connections Use the non-pooled URL only for migrations. Route handlers should use the pooled URL.