Skip to content

Connecting PostgreSQL

Post AI connects to any PostgreSQL-compatible database via Cloudflare Hyperdrive. Currently tested with Neon, Supabase, and standard Postgres.

Using the Cloudflare CLI:

Terminal window
npx cf-workers hyperdrive create post-ai-postgres \
--connection-string="postgres://user:password@host:5432/dbname"

Note the returned config ID (e.g. 22be071d).

In your wrangler.toml (or contact support to configure via dashboard):

[[hyperdrive]]
binding = "HYPERDRIVE"
id = "22be071d"
Terminal window
curl https://postdb.dev/api/health \
-H "Authorization: Bearer YOUR_API_KEY"

Response includes hyperdrive: "ok" when connected.

  • Neon — recommended, serverless Postgres
  • Supabase — use the direct connection string (not pooler)
  • Self-hosted Postgres — any Postgres 14+
  • Amazon RDS — standard Postgres connection string