PostgreSQL for SaaS: Neon, Supabase, RDS or self-hosted

Run a ShipAny app on PostgreSQL with Drizzle ORM — connection strings for Neon, Supabase and managed Postgres, schema setup, production migrations and Cloudflare Hyperdrive.

Last updated: Oct 8, 2026

PostgreSQL is the most common production database for ShipAny apps. ShipAny talks to it through Drizzle ORM with a dedicated Postgres schema, so any provider that gives you a standard connection string works: Neon, Supabase, AWS RDS, Aliyun RDS or your own server.

What ShipAny handles

  • A Postgres schema template with all built-in tables — auth, orders, subscriptions, credits, API keys, RBAC, config and content — plus strong TypeScript types for each.
  • Development and production workflows: db:push for fast local iteration, db:generate + db:migrate for reviewable SQL migrations in production.
  • Optional schema: set DB_SCHEMA to use a schema other than public.
  • Cloudflare Workers support through Hyperdrive, which pools connections near your database.

Setup

  1. Create a database and copy its connection string:
    • Neon: Connect in the console — postgresql://…neon.tech/neondb?sslmode=require
    • Supabase: Connect → ORMs → Drizzle — replace [YOUR-PASSWORD] with your database password
  2. Set the environment:
DATABASE_PROVIDER=postgresql
DATABASE_URL=<your-postgres-connection-string>
  1. Copy the Postgres schema template and create the tables:
pnpm db:setup
pnpm db:push        # development
# production: pnpm db:generate && pnpm db:migrate
  1. Seed roles and permissions with pnpm rbac:init.

Tips

  • Never use db:push against production — generate migrations and review the SQL for destructive changes first.
  • Test the connection with psql before debugging the app; most problems are SSL flags or IP allowlists.
  • On Cloudflare Workers, connect through Hyperdrive and run migrations directly against Postgres, not through Hyperdrive.

Related reading

More in Integrations

Ship your AI SaaS with ShipAny

Auth, payments, credits, i18n and admin are pre-wired — start from a production-ready template and focus on your product.