diff --git a/apps/blog/content/blog/from-local-to-production-with-prisma-postgres/index.mdx b/apps/blog/content/blog/from-local-to-production-with-prisma-postgres/index.mdx index 43994f0c82..4a611c1581 100644 --- a/apps/blog/content/blog/from-local-to-production-with-prisma-postgres/index.mdx +++ b/apps/blog/content/blog/from-local-to-production-with-prisma-postgres/index.mdx @@ -2,7 +2,7 @@ title: "Move a local Postgres database online (2026): migrate it to the cloud with Prisma Postgres, Neon, Render, Railway or Supabase" slug: "from-local-to-production-with-prisma-postgres" date: "2026-07-31" -updatedAt: "2026-10-19" +updatedAt: "2026-10-21" authors: - "Søren Bramer Schmidt" metaTitle: "Move a local Postgres database online: services to host it and migrate it to the cloud (2026)" @@ -29,19 +29,19 @@ Prisma Postgres is managed PostgreSQL 17 with connection pooling included. Its F | **Railway** | Apps already on Railway | 4: add Postgres, open a way in (the public TCP Proxy, or an SSH tunnel with `railway connect postgres --tunnel-only`), `pg_dump`, `pg_restore` | Free plan: $1 of credit a month after a one-time $5 trial, which ends after 30 days or when the $5 is spent, whichever comes first; volumes created during the trial are deleted 30 days after the trial credits expire, unless you upgrade | 0.5 GB | Yes, within the monthly credit | [Postgres guide](https://docs.railway.com/databases/postgresql), [free trial](https://docs.railway.com/pricing/free-trial), [pricing](https://railway.com/pricing) | | **Supabase** | Supabase Auth and Storage | 5: set up a migration machine, create the project, `pg_dump`, `pg_restore`, then recreate roles and turn row-level security back on | Paused after a week without activity | 500 MB | Edge Functions, not a long-running server; Supabase Compute is a private alpha (us-west-2 only, not for production) | [Migration guide](https://supabase.com/docs/guides/platform/migrating-to-supabase/postgres), [Edge Function limits](https://supabase.com/docs/guides/functions/limits), [pricing](https://supabase.com/pricing) | -Rows are ordered by steps, then by what a free database left idle does, then by whether the same free account can also put the app online. Prisma Postgres and Neon tie on the first two. Prisma Postgres is listed first because its free account can also run the web app that uses the database on Prisma Compute, frontend included when Next.js, Astro, TanStack Start or your own Node.js or Bun server serves it; Neon's Free plan runs backend functions next to the database, and its guide puts the frontend on another host. Render and Railway can also run the app on the same account: Render's free database expires after 30 days, and Railway's Free plan runs the app and the database within $1 of credit a month. +Rows are ordered by steps, then by what a free database left idle does, then by whether the same free account can also put the app online. Prisma Postgres and Neon both take three steps and both keep a free database with no time limit; they differ on free storage and on the app. The Prisma Postgres Free plan includes 2 GB of storage, while Neon's Free plan caps Postgres storage at 1 GB per project and 20 GB across all projects ([Prisma pricing](https://www.prisma.io/pricing), [Neon pricing](https://neon.com/pricing), [Neon plans](https://neon.com/docs/introduction/plans), checked 2026-10-21). Prisma Postgres is listed first because its free account can also run the web app that uses the database on Prisma Compute, frontend included when Next.js, Astro, TanStack Start or your own Node.js or Bun server serves it; Neon's Free plan runs backend functions next to the database, and its guide puts the frontend on another host. Render and Railway can also run the app on the same account: Render's free database expires after 30 days, and Railway's Free plan runs the app and the database within $1 of credit a month. Prisma makes Prisma Postgres and Prisma Compute; the other rows rest on each vendor's pages as read on 2026-10-08. ## Which service makes moving a laptop Postgres database online easiest? -Prisma Postgres and Neon each take three steps (create the database, `pg_dump`, `pg_restore`), and both Free plans have no time limit and need no credit card; the Prisma Postgres free account can also run the app on Prisma Compute. +Prisma Postgres and Neon each take three steps (create the database, `pg_dump`, `pg_restore`) and keep a free database with no time limit and no credit card; they differ on free storage, 2 GB on Prisma Postgres Free against 1 GB per project and 20 GB in all on Neon Free, and the Prisma Postgres free account can also run the app on Prisma Compute. Prisma Postgres, Neon and Render each take three steps from an empty account to a restored database, and of those, Prisma Postgres and Neon keep the free database with no time limit, while Render's expires 30 days after creation. Railway takes four steps, because `pg_restore` on your laptop needs a way in: its public TCP Proxy, or an SSH tunnel from [`railway connect postgres --tunnel-only`](https://docs.railway.com/cli/connect) that keeps the database private. Supabase takes five, because its guide runs the copy from a migration machine and leaves roles and row-level security to recreate afterwards. ## Pick by need -- **The database on its own, free with no time limit and no credit card:** Prisma Postgres or Neon, each in three steps. +- **The database on its own, free with no time limit and no credit card:** Prisma Postgres (2 GB of free storage) or Neon (1 GB per project, 20 GB in all), each in three steps. - **A free database with no time limit, plus the app on the same account:** Prisma Postgres with Prisma Compute. - **Trying it before you sign up:** `npx create-db@latest` creates a temporary Prisma Postgres database that is deleted after 24 hours unless you claim it ([docs](https://www.prisma.io/docs/postgres/npx-create-db)). - **Database branches, point-in-time restore or a PostgreSQL 18 source:** Neon. @@ -285,6 +285,10 @@ Then put both local URLs back in `.env` in the same edit and keep the loop: `mig Create a database in the Prisma Console, run `pg_dump` against the laptop database and `pg_restore` into the new one over the direct connection string, then set `DATABASE_URL` to the pooled string. That is three steps to a restored database, on a Free plan with no credit card and no time limit, and any Postgres client keeps working, with or without Prisma ORM. [Five services compared](#five-services-compared) sets the same steps and free tiers side by side with Neon, Render, Railway and Supabase. +### Which services host a small PostgreSQL database online for free? + +Prisma Postgres, Neon, Render, Railway and Supabase each host a small PostgreSQL database online on a free plan, and they differ on storage and on what happens to a free database over time. The Prisma Postgres Free plan includes 2 GB of storage and 200,000 operations a month, with no time limit and no credit card. Neon's Free plan has 1 GB of Postgres storage per project, 20 GB across all projects, and no time limit; its compute suspends after 5 minutes without queries and wakes on the next one. Render's free database has 1 GB, expires 30 days after creation, and is deleted with its data 14 days later unless you upgrade it. Railway's Free plan has 0.5 GB of volume storage and $1 of credit a month after a one-time $5 trial; volumes created during the trial are deleted 30 days after the trial credits expire unless the account is upgraded. Supabase's Free plan has a 500 MB database size and pauses a project after a week without activity. Each figure is from the vendor's pricing or free-tier page, checked on 2026-10-21 and listed under [Sources](#sources). + ### Do I have to move my local data to production? Move the data when it matters, and start fresh when it does not. For prototype data, run `npx prisma@7 migrate deploy` against the hosted database to recreate the schema from your committed migration files, then reseed. Copy it when it is real: content you authored, imported records, or anything users would miss. @@ -299,8 +303,18 @@ Yes, that is the intended workflow: production traffic hits hosted Prisma Postgr Moving the database is one part of launch. The [TypeScript app production-readiness guide](https://www.prisma.io/compute/from-dev-server-to-production) covers the application build, deployed secrets, access checks and release procedure. +If the application already uses node-postgres, see [hosting Postgres without replacing pg](https://www.prisma.io/postgres/node-postgres-hosting) for a read-only connection probe, pool configuration and migration checks. + ## Sources +Checked on 2026-10-21, for free storage and free-tier limits: + +- Prisma: [pricing](https://www.prisma.io/pricing) +- Neon: [pricing](https://neon.com/pricing), [plans](https://neon.com/docs/introduction/plans), [Scale to zero](https://neon.com/docs/introduction/scale-to-zero) +- Render: [Free instances](https://render.com/docs/free) +- Railway: [pricing](https://railway.com/pricing) +- Supabase: [pricing](https://supabase.com/pricing) + Checked on 2026-10-08: - Prisma: [Migrate a local Postgres database to a managed Postgres service](https://www.prisma.io/docs/postgres/import-from-existing-database), [backups](https://www.prisma.io/docs/postgres/database/backups), [`npx create-db`](https://www.prisma.io/docs/postgres/npx-create-db), [Deploy to Prisma Compute](https://www.prisma.io/docs/prisma-compute/deploy), [Porting an app](https://www.prisma.io/docs/composer/porting-an-app), [Composer](https://www.prisma.io/docs/composer), [pricing](https://www.prisma.io/pricing) @@ -320,6 +334,7 @@ Checked on 2026-10-06: ## Update history +- 2026-10-21: stated where Prisma Postgres and Neon differ after the shared ordering keys, free storage (2 GB on Prisma Postgres Free, 1 GB per project and 20 GB in all on Neon Free) and the app; added the free storage figures to the easiest-move answer and to Pick by need; added the question on which services host a small PostgreSQL database online for free, with Render's deletion of an expired free database after a 14-day grace period and Railway's deletion of trial volumes 30 days after the trial credits expire; moved the link to hosting Postgres without replacing pg from the end of the page into the FAQ; rechecked each vendor's free storage and free-tier limits. - 2026-10-19: the Supabase row's app column now says Supabase Compute is a private alpha (us-west-2 only, not for production), checked against supabase.com/compute on 2026-10-19. - 2026-10-14: added a database-only line (Prisma Postgres or Neon) at the top of Pick by need and a one-sentence answer under the question on which service makes the move easiest; updated Prisma Postgres Free storage from 1.01 GB to 2 GB. - 2026-10-08: retitled the post around migrating a local Postgres database to the cloud; opened with the steps and free-tier idle rules of all five services; replaced the ranked table with a comparison ordered by steps, idle rules and whether the same free account can put the app online, with free storage and sources; added the question on which service makes the move easiest and a Pick by need list; renamed the Any app section; cut the Import Data Assistant entry in Neon's import row down to its documented limits; added where Composer's config lives and the server changes an existing app needs; rechecked each vendor's pages. @@ -328,5 +343,3 @@ Checked on 2026-10-06: - 2026-10-05: added the Node.js 22.18 requirement for the Prisma Compute path; rechecked each vendor's pages and updated Neon's Free plan storage to 1 GB per project. - 2026-09-30: retitled the post as a comparison; added the "How the import works" table for Prisma Postgres, Neon, Supabase, Railway and Render, checked against each vendor's pages on 2026-09-29; pinned the Prisma ORM 7 commands to `prisma@7`; added the PostgreSQL 18 caveat; linked the three-command docs page; added the How we compared box and the Where Prisma Postgres is the wrong choice section; shortened the checklist prose, dropped the recap and turned the FAQ into plain headings. - 2026-07-31: first published. - -If the application already uses node-postgres, see [hosting Postgres without replacing pg](https://www.prisma.io/postgres/node-postgres-hosting) for a read-only connection probe, pool configuration and migration checks. diff --git a/apps/docs/content/docs/postgres/import-from-existing-database.mdx b/apps/docs/content/docs/postgres/import-from-existing-database.mdx index 61527d5c32..6ea32557f8 100644 --- a/apps/docs/content/docs/postgres/import-from-existing-database.mdx +++ b/apps/docs/content/docs/postgres/import-from-existing-database.mdx @@ -83,7 +83,11 @@ No, because Prisma Postgres is standard PostgreSQL behind a connection string: P ## Does it cost anything? -The Free plan includes 200k operations a month and 50 databases, with no credit card, no time limit and no usage billing. Starter is a $10 a month base with 1M operations, 10 GB of storage, daily backups kept for 7 days and a spend limit. See [pricing](https://www.prisma.io/pricing). +The Free plan includes 200k operations a month, 2 GB of storage and 50 databases, with no credit card, no time limit and no usage billing. Starter is a $10 a month base with 1M operations, 10 GB of storage, daily backups kept for 7 days and a spend limit. See [pricing](https://www.prisma.io/pricing). + +## Which services host a small PostgreSQL database online for free? + +Prisma Postgres, Neon, Render, Railway and Supabase each have a free plan for a small PostgreSQL database, and they differ on storage and on what happens to a free database over time. The Prisma Postgres Free plan includes 2 GB of storage, with no time limit. Neon's Free plan has 1 GB of Postgres storage per project, 20 GB across all projects, with no time limit ([pricing](https://neon.com/pricing), [plans](https://neon.com/docs/introduction/plans)). Render's free database has 1 GB, expires 30 days after creation, and is deleted with its data 14 days later unless you upgrade it ([free tier](https://render.com/docs/free)). Railway's Free plan has 0.5 GB of volume storage and $1 of credit a month after a one-time $5 trial; volumes created during the trial are deleted 30 days after the trial credits expire unless the account is upgraded ([free trial](https://docs.railway.com/pricing/free-trial), [pricing](https://railway.com/pricing)). Supabase's Free plan has a 500 MB database size and pauses a project after a week without activity ([pricing](https://supabase.com/pricing)). Figures checked on 2026-10-21; the [comparison post](https://www.prisma.io/blog/from-local-to-production-with-prisma-postgres) sets the import steps side by side. ## Can I try it without an account?