Skip to content
Home / Migrations / Self-hosted PostgreSQLNeon

Self-hosted PostgreSQL Neon

easy

Neon adds branching, autoscaling, scale-to-zero, and managed backups. Zero config for the features you'd spend weeks building on self-hosted.

Estimated: 1-3h · 5 steps
Progress0%
Step 1: Create Neon project

Sign up at neon.tech. Get your connection string from the dashboard.

Step 2: Dump existing database
pg_dump -h localhost -U postgres mydb > mydb.sql
Step 3: Restore to Neon
psql $NEON_CONNECTION_STRING < mydb.sql
Step 4: Update connection string

Replace localhost Postgres URL with Neon connection string in your app and CI.

DATABASE_URL=postgres://user:pass@ep-xyz.neon.tech/mydb?sslmode=require
Step 5: Enable connection pooling

Use Neon's pooler URL for serverless environments to avoid connection limit issues.

App connects. All queries work. pgvector extensions re-enabled if needed.
Get started with Neon

What this migration involves

Moving from Self-hosted PostgreSQL to Neon is rated easy and takes about 1-3h on a typical project. The guide breaks it into 5 steps, 3 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Self-hosted PostgreSQL to Neon take?

Around 1-3h for a typical project — 5 steps, difficulty rated easy, 3 of them with copy-paste commands.

Is moving from Self-hosted PostgreSQL to Neon reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Self-hosted PostgreSQL data before you start.

What does Neon cost compared to Self-hosted PostgreSQL?

Neon: freemium from $19/mo, free plan available.