Skip to content

Migrate from Heroku to Layerbase

Move your Heroku Postgres or Key-Value Store to a managed Layerbase database in one guided pass. Paste the URL Heroku already gives you and we copy the schema and data. Your app keeps running on Heroku: the only thing that changes is a config var.

Still comparing? Heroku alternatives

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

Why teams leave Heroku

No cliff between hobby and production

Heroku Postgres Essential tops out at $20 a month and the next plan up is $50, with nothing in between. Layerbase runs Postgres on the Free tier, then $5/mo Solo and $15/mo Pro. Growing is a plan change, not a jump.

Upgrading on Heroku is already a migration

Heroku does not upgrade an Essential database into the Standard tier in place. Its own docs send you to pg:copy, which they document at about three minutes of downtime per gigabyte. If you are going to take that downtime, take it once and land somewhere the price stays flat.

The features Essential does not have

Heroku documents Essential as having no rollbacks, no forks or followers, no Postgres logs, no extra credentials, and unannounced maintenance with automatic version upgrades. Layerbase gives every plan daily backups, a web SQL console, copy-on-write branching, and TLS connection strings.

Your app does not move

This migrates the database, not the deployment. Your dynos keep serving traffic: copy the data across, set the new connection string as a config var, and restart. If you use the Key-Value Store as well, it comes across in a second pass into Valkey.

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

    Run heroku config:get DATABASE_URL -a your-app, or heroku pg:credentials:url DATABASE -a your-app, and paste the postgres:// string it prints. You can also copy it from the datastore Credentials tab in the Heroku Dashboard. Essential, Standard, and Premium databases run on the Common Runtime, which Heroku documents as accessible from anywhere, so the string works as it is and TLS is negotiated for you. A database inside a Private Space or a Shield space is not reachable from outside that space, so it needs mTLS or Trusted IPs configured on your side before any external tool can dial it.

  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 Heroku 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 Heroku migration questions

Where do I find my Heroku connection string?

For Postgres, run heroku config:get DATABASE_URL -a your-app, or heroku pg:credentials:url DATABASE -a your-app. For the Key-Value Store, run heroku config:get REDIS_URL -a your-app. Both are also on the datastore Credentials tab in the Heroku Dashboard. Copy it right before you start the migration, because Heroku rotates these values on its own schedule.

Will my Heroku 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 app keeps serving traffic throughout. There is no ongoing sync afterwards, so plan a cutover rather than running both for a while.

Why does my Key-Value Store land on Valkey?

Because that is what it already is. Heroku renamed Heroku Redis to Heroku Key-Value Store in October 2024 and now runs Valkey, with 9.0 as the default. Layerbase Valkey 9.0 reads its binary key format directly, so every key, type, and TTL comes across. A Redis 7.2 target would refuse a Valkey 9 payload as too new, which is why Valkey is the target we pick for you.

Can you migrate a Private Space or Shield database?

Not by pasting a string. Heroku keeps those databases unreachable from outside their space, so an external tool cannot dial one without mTLS or the Trusted IPs beta configured on your side first. Common Runtime databases, which is every Essential, Standard, and Premium plan, are documented as accessible from anywhere and work as they are.

What about Heroku Kafka?

We do not host Kafka, so that one does not move here. Layerbase Cloud runs 18 database engines, from Postgres and MySQL through Redis and Valkey to search, analytics, and vector stores, but a Kafka cluster needs a different kind of home.

What does it cost?

Postgres and Valkey are both 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 Heroku?

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