Skip to content

Migrate from Replit to Layerbase

Move the Postgres behind your Replit app to a managed Layerbase database. Paste the connection string from your production database and we copy the schema and data in one pass. Your app keeps running on Replit: the only thing that changes is DATABASE_URL.

Still comparing? Replit alternatives

Old database never modified or deleted
Credentials never stored
Free tier, no credit card

Why teams leave Replit

Off the usage meter

A Replit production database is Neon underneath, billed by compute and storage as your app gets used. A Layerbase Postgres is $0 on the Free tier, then $5/mo Solo or $15/mo Pro, and the number does not move when your traffic does.

Your app stays where it is

This migrates the database, not the deployment. Your Repl keeps running: copy the data across, swap DATABASE_URL in your Repl secrets, and redeploy. If your app uses the @neondatabase/serverless HTTP driver, as most Replit Agent apps do, it keeps working: Layerbase Postgres speaks the same HTTP protocol.

Development databases move too

A Replit development database (Helium) is sealed inside the Repl and cannot be dialed from outside, so it goes the other way: run pg_dump in the Repl shell and pipe it straight into your new Layerbase database, which is publicly reachable. One command, no export files to shuttle around.

A database with a dashboard

Daily backups, copy-on-write branching, a web SQL console, TLS connection strings, and a real Postgres you can point psql at. Every other engine we host, Redis and Valkey through search and analytics, sits in the same account for when your app outgrows one database.

Four steps, one pass

  1. 1

    Create a free account or sign in

    Sign in with Google or GitHub. No credit card is needed to start, and the migration wizard opens with this platform already selected.

  2. 2

    Paste your connection string

    Open your Repl, click Database in the tools pane, then the Settings tab, and copy the connection string for your production database: postgresql://user:password@ep-something.neon.tech/neondb. Replit production databases are Neon-backed Postgres and are reachable from anywhere, so the string works as it is. If yours has -pooler in the hostname, paste it anyway: we switch to the direct endpoint automatically.

  3. 3

    Pick what to migrate and name it

    Choose what to bring over, give the new Layerbase database a name, and start the migration. Progress streams live in the dashboard.

  4. 4

    We copy it in one pass

    The migration reads from Replit once and never writes to it. Credentials are used for the copy and never stored. When it finishes, you land in your new database with a live TLS connection string.

Common Replit migration questions

Where do I find my Replit connection string?

In your Repl, open Database in the tools pane and go to the Settings tab, which lists the connection details for your production database. Copy the full postgresql:// string and paste it into the migration. Replit production databases are Neon-backed Postgres and are reachable from any client, so nothing else is needed. A -pooler hostname is fine: we switch to the direct endpoint for you.

Can you migrate my development database?

Not by pasting a string, because Replit deliberately keeps a development database (Helium) unreachable from outside the Repl. Run the copy from inside instead. Create the Layerbase Postgres first, copy its connection string, then in the Repl shell run: pg_dump "$DATABASE_URL" --no-owner --no-privileges | psql "<layerbase-connection-string>". The Layerbase side is publicly reachable, so the dump flows out of the sandbox rather than trying to reach into it.

My app uses @neondatabase/serverless. Does it keep working?

Yes. Layerbase Postgres implements the same HTTP query protocol, so @neondatabase/serverless, @vercel/postgres, and Drizzle neon-http accept your Layerbase connection string as-is. Only DATABASE_URL changes. The one gap is interactive transactions over WebSocket; sql.transaction() batches work, and switching to the standard pg client covers the rest.

What about my ReplDB key-value data?

That migrates too, in one click. Replit Database (ReplDB) is the legacy key-value store behind the secret REPLIT_DB_URL, and Layerbase imports it into a managed Valkey: create a Valkey database, open its Migrate tab, pick Replit, and paste the URL. Get the current one by running echo $REPLIT_DB_URL in the Repl shell, and copy it fresh right before you start, because Replit rotates the token. Every key comes across as a plain string value, which is all ReplDB holds: no TTLs, no hashes or lists. A store is capped at 50 MiB and 5,000 keys, so the copy takes seconds. It is separate from the Postgres path above, so run both if your app uses both.

Will my Replit database be modified?

No. The migration is read-once: we connect with the string you paste, copy the schema and data, and disconnect. Nothing is written back and your Repl keeps serving traffic throughout. There is no ongoing sync afterwards either, so plan a cutover rather than running both for a while.

What does it cost?

Postgres is on the Layerbase Free tier, so you can migrate and compare without a credit card. Paid plans start at $5 a month when you need more databases or resources.

Ready to leave Replit?

Sign in, and the migration wizard opens with Replit already selected. Your source is read once and never modified, so there is nothing to undo if you change your mind.