Published on
Heroku alternatives: which one should you pick in 2026?
The most common Heroku alternatives today are Render, Railway, Fly.io, and DigitalOcean App Platform, with Vercel for teams that only ship a frontend or Next.js. A 512 MB app with a small PostgreSQL database costs US$ 12.00 a month on Heroku, US$ 13.30 on Render, about US$ 12.15 on Railway, US$ 7.69 on Fly.io in Ashburn, and US$ 12.00 on DigitalOcean; on a Brazilian card, with the PTAX selling rate of November 27, 2026 (R$ 5.5430) and the 3.5% IOF, that ranges from R$ 44.12 to R$ 76.30. Among these platforms, only Fly.io has machines in São Paulo, and Vercel has functions in São Paulo. On Zenifra, which runs in Brazil and bills in Brazilian reais, the same pair costs R$ 42.00. This guide compares price, regions, Procfile, buildpacks and Docker, workers, cron, managed Postgres, add-ons, and the specific case of Rails, with the source and date of every number.
What is Heroku, and why are so many people looking for an alternative?
Heroku is a platform as a service (PaaS) created in 2007 and bought by Salesforce at the end of 2010. It made popular a way of shipping apps that feels obvious today: you push the code, a buildpack detects the language and builds the app, and a Procfile says which processes to run, such as web and worker. Each process runs in containers Heroku calls dynos, and databases, caching, email, and monitoring come in as add-ons from a marketplace.
People look for an alternative for four recurring reasons. The first is the end of the free plan: on November 28, 2022, exactly four years before this guide’s date, Heroku began shutting down free dynos and free databases, and everyone with side projects or prototypes there either started paying or left. The second is price as the app grows: the Basic dyno costs US$ 7, but Standard-1X, the next step, costs US$ 25 with the same 512 MB, and Heroku Postgres Standard-0 costs US$ 50.
The third reason is region. Heroku’s Common Runtime runs only in the United States and Europe, and Private Spaces are in ten cities, none in South America. For an app serving users in Brazil, every request crosses the continent. The fourth is billing: the invoice comes in US dollars, on a credit card, and on a Brazilian card it also carries the day’s exchange rate and the 3.5% IOF tax on international purchases.
None of this makes Heroku a bad platform. It is still mature, stable, and has the largest add-on marketplace in the segment. The question is whether what you pay for it still makes sense for your case, and that is what the next sections compare. All prices were read on the official pages on November 28, 2026. The conversion uses the PTAX selling rate of November 27, 2026, published by Brazil’s Central Bank, of R$ 5.5430 per dollar, plus the 3.5% IOF. Zenifra prices come from the public plans API, checked the same day.
How much does Heroku cost today, from Eco to Standard?
To compare alternatives, it helps to know your starting point. Heroku charges per dyno and per add-on plan, with a fixed monthly price prorated by usage time. There is no free plan: the cheapest option is Eco, a US$ 5 subscription that gives a pool of 1,000 hours a month shared by all Eco dynos on the account. Eco sleeps after 30 minutes without traffic and is not available to Heroku Enterprise customers, so it is meant for personal projects, not production.
The table shows the plans that come up most often on a small or mid-sized account. The reais column uses the PTAX selling rate of November 27, 2026 and the 3.5% IOF.
| Heroku plan | What you get | Monthly price | In reais, with PTAX and 3.5% IOF |
|---|---|---|---|
| Eco dyno | 512 MB, sleeps after 30 minutes without traffic, 1,000-hour pool | US$ 5.00 | R$ 28.68 |
| Basic dyno | 512 MB, does not sleep | US$ 7.00 | R$ 40.16 |
| Standard-1X dyno | 512 MB | US$ 25.00 | R$ 143.43 |
| Standard-2X dyno | 1 GB | US$ 50.00 | R$ 286.85 |
| Heroku Postgres Essential-0 | 1 GB of storage, 20 connections | US$ 5.00 | R$ 28.68 |
| Heroku Postgres Essential-1 | 10 GB of storage, 20 connections | US$ 9.00 | R$ 51.64 |
| Heroku Postgres Essential-2 | 32 GB of storage, 40 connections | US$ 20.00 | R$ 114.74 |
| Heroku Postgres Standard-0 | 4 GB of RAM, 64 GB of storage, 120 connections | US$ 50.00 | R$ 286.85 |
| Heroku Key-Value Store Mini | 25 MB, 20 connections | US$ 3.00 | R$ 17.21 |
The jump that hurts most is from Basic to Standard-1X: same memory, but the price goes from US$ 7 to US$ 25. Anyone who needs more than 512 MB moves to Standard-2X at US$ 50, and Performance dynos start at US$ 250. The pricing page also lists the Fir generation, built on Kubernetes, whose dynos require a Private Space and start at US$ 25.
A small app with one Basic dyno and Essential-0 costs US$ 12 a month, or R$ 68.85 on a Brazilian card. That is the reference number for the comparisons below.
How much does an app with a small Postgres cost on each alternative?
With a 512 MB app running all month and each platform’s smallest paid PostgreSQL, the monthly bill lands between US$ 7.69 and US$ 13.30 on the foreign alternatives, against US$ 12.00 on Heroku. In reais, with PTAX and the 3.5% IOF, the range goes from R$ 44.12 to R$ 76.30. On Zenifra, which bills in reais, the same scenario costs R$ 42.00.
The scenario is the same for every row: a 512 MB web process running all month, a small PostgreSQL database, and 1 GB of data in it. Outbound traffic is left out because each platform meters it differently, and it is covered right below the table. On Railway, which bills by usage, the number is an estimate with 1 GB of memory across app and database, 0.1 vCPU on average, and a 1 GB volume.
| Platform | Setup | Monthly price | In reais, with PTAX and 3.5% IOF | Region closest to Brazil |
|---|---|---|---|---|
| Heroku | Basic dyno (512 MB) + Postgres Essential-0 (1 GB of storage) | US$ 12.00 | R$ 68.85 | United States (Common Runtime) |
| Render | Starter (0.5 CPU, 512 MB) + 256 MB Postgres + 1 GB of storage at US$ 0.30 | US$ 13.30 | R$ 76.30 | Virginia (US) |
| Railway (Hobby) | Estimated usage: 1 GB of memory at US$ 10 per GB, 0.1 vCPU at US$ 20 per vCPU, and a 1 GB volume | About US$ 12.15 | R$ 69.71 | Virginia (US) |
| Fly.io | 512 MB shared-cpu-1x in Ashburn + Managed Postgres Developer (256 MB, storage included) | US$ 7.69 | R$ 44.12 | São Paulo (gru) |
| DigitalOcean App Platform | 512 MiB container + PostgreSQL dev database (512 MiB) | US$ 12.00 | R$ 68.85 | US East Coast |
| Zenifra | Basic (0.5 vCPU, 512 MB) + DB-Starter PostgreSQL (0.3 vCPU, 256 MB) + 1 GB of storage | R$ 42.00 | R$ 42.00, no IOF | São Paulo |
Every row has a caveat that can change the choice. On Fly.io, the US$ 3.69 machine price applies to Ashburn and Secaucus, the cheapest regions; in São Paulo, the same 512 MB machine costs US$ 5.97, because Fly applies a 61.5% markup in gru. The Managed Postgres Developer plan has 256 MB and goes up to 5 GB of storage, and a personal organization with a card on file gets US$ 5 of monthly usage included in the Free plan, which lowers a small account’s bill.
On DigitalOcean, the US$ 5 512 MiB container is a fixed instance that cannot scale beyond one, and the US$ 7 dev database is meant for development. With DigitalOcean’s smallest managed PostgreSQL, 1 GiB for US$ 15.15, the total rises to US$ 20.15, or R$ 115.60. On Render, the Hobby workspace has no monthly fee but only one seat; for a team, Pro costs US$ 25 a month plus services.
Traffic also adds up depending on the platform. Render includes 5 GB on Hobby and charges US$ 0.15 per extra GB. Railway charges US$ 0.05 per GB. Fly.io charges US$ 0.02 per GB in North America and Europe and US$ 0.04 in South America. DigitalOcean includes 50 GiB with the 512 MiB container and charges US$ 0.02 per GiB beyond that. On Zenifra, the R$ 42.00 adds up R$ 29.90 for Basic, R$ 11.90 for DB-Starter, and R$ 0.20 for the GB of database storage, and the amount does not move with the exchange rate.
Which alternatives have servers in São Paulo, and how much does that affect latency?
Among the most cited Heroku alternatives, only Fly.io has machines in São Paulo, and Vercel has functions in São Paulo. Render, Railway, DigitalOcean App Platform, and Heroku itself run the app in the United States, Europe, or Asia. Zenifra runs in São Paulo.
Region matters because every new connection and every sequential API call pays for the distance. In the benchmark Zenifra published, measured with Globalping on November 6, 2026, a new HTTPS connection from São Paulo reached the first byte in 18 ms on a server in São Paulo and in 378 ms on a server in Washington, in the Virginia region. On an open connection, the round trip was 5 ms against 124 ms.
| Platform | Where the app runs | São Paulo? |
|---|---|---|
| Heroku | Common Runtime in the US and Europe; Private Spaces in Dublin, Frankfurt, London, Montreal, Mumbai, Oregon, Singapore, Sydney, Tokyo, and Virginia | No |
| Render | Oregon, Ohio, Virginia, Frankfurt, and Singapore | No |
| Railway | California, Virginia, Amsterdam, and Singapore | No |
| Fly.io | 17 regions, including Ashburn, Dallas, Frankfurt, Tokyo, and São Paulo | Yes (gru), with machines 61.5% pricier than in Ashburn; supports Managed Postgres |
| DigitalOcean App Platform | 12 regions for dynamic apps, such as New York, Atlanta, Toronto, Amsterdam, Frankfurt, and Bangalore | No |
| Vercel | 19 function regions; the default is Washington (iad1) | Yes (gru1), for functions |
| Zenifra | São Paulo | Yes |
An app screen that opens a new connection and makes four more sequential calls waits about 874 ms with the API in Washington and 38 ms with the API in São Paulo, based on the benchmark measurements. If you only serve Brazil, that gap shows up on every screen. If your users are spread around the world, platforms with many regions, such as Fly.io, Render, and Railway, have the edge.
Whatever the platform, keep the app and the database in the same region. An app in São Paulo querying a database in Virginia pays the round trip on every query, and 20 sequential queries spend about 2.5 seconds just waiting on the network.
Procfile, buildpacks, or Docker: how does code become an app on each platform?
Anyone coming from Heroku is used to not thinking about builds: the buildpack detects the language, installs dependencies, and the Procfile defines the processes. The alternatives follow three different paths, and knowing which one each takes avoids surprises on the first deploy.
Render has native runtimes for the most common languages, Ruby included, and accepts Dockerfiles. You set the build and start commands in the dashboard or in a render.yaml file, and the Procfile stops being the source of truth. Railway builds code with Railpack, which detects commands defined in a Procfile, although the docs recommend setting the start command in the service settings; Dockerfiles are accepted too.
Fly.io works with Docker images: the app is described in a Dockerfile and the processes live in the fly.toml file, under [processes]. DigitalOcean App Platform uses buildpacks, and its Ruby buildpack is Heroku’s own, besides accepting Dockerfiles. Of the four, it is the closest to Heroku in automatic detection.
On Zenifra, deploys from GitHub, GitLab, or Forgejo build Node.js, Python, Bun, Go, Java, and PHP projects without a Dockerfile, with Pre-build Command, Build Command, and Start Command fields. Zenifra does not read the Procfile: the web: line becomes the Start Command and each other process becomes a project. Ruby, .NET, and other languages outside that list go in as a Docker image, built from a Dockerfile and pushed to a registry, and Zenifra’s GitHub Action automates the build and deploy on every push. Each pull request can get a Preview environment, like Heroku Review Apps.
Workers, cron, Postgres, and backups: what does each alternative offer?
A real Heroku app is rarely just the web process. There is almost always a worker processing queues, a release running migrations, tasks in Heroku Scheduler, and a Postgres database with backups. The table shows where each piece lives on each platform.
Backup details come from the official docs and from our Render vs Railway comparison of November 10, 2026. Before deciding, check the recovery window of the plan you will buy, because it changes a lot between entry plans and production plans.
| Piece | Heroku | Render | Railway | Fly.io | DigitalOcean | Zenifra |
|---|---|---|---|---|---|---|
| Queue worker | worker dyno | Background worker, at the instance price | Another service in the project | Process group in fly.toml | Worker component | Another project, with private exposure |
| Migrations before deploy | Release phase | Pre-deploy command, on paid plans | Pre-deploy command, with a configurable timeout | release_command, on a temporary machine | Pre-deploy job | At the start of the Start Command, or run by hand |
| Scheduled tasks | Heroku Scheduler (add-on) | Cron jobs, from US$ 0.00016 per minute | Cron with at least 5 minutes between runs | Scheduled Machines, hourly to monthly, or Supercronic | Scheduled jobs, at least 15 minutes apart | Scheduled Jobs with cron, billed per minute of execution |
| Entry managed Postgres | Essential-0, US$ 5 | 256 MB, US$ 6, plus US$ 0.30 per GB | Postgres as a service, billed by usage | Developer, US$ 4 | Dev database, US$ 7 | DB-Starter, R$ 11.90, plus R$ 0.20 per GB |
| Postgres backups | PGBackups | Point-in-time recovery: 3 days on Hobby, 7 on Pro | Scheduled volume backups | Backups included on all plans | Varies between dev and managed databases | Daily, kept for 7 days on DB-Starter; restore through support |
| Payment | Card, in US dollars | Card, in US dollars | Postpaid card, in US dollars | In US dollars | In US dollars | PIX, boleto, or card, in reais |
Two differences deserve attention. The first is when migrations run: Heroku, Render, Railway, Fly.io, and DigitalOcean run the command once before releasing the new version, and if it fails the deploy stops. Zenifra has no equivalent step, so the migration goes at the start of the start command, must be idempotent, and runs on every instance that boots, or it is run by hand before the deploy, which is the safest option for long migrations.
The second is cron. Railway requires at least 5 minutes between runs and DigitalOcean 15 minutes; Heroku Scheduler offers every 10 minutes, hourly, or daily. Zenifra Scheduled Jobs accept cron expressions in UTC, are billed only for execution time, and run from GitHub or a Docker image. Zenifra also offers pull request previews, PostgreSQL 15 to 18, MariaDB, and Valkey in the same console.
What about Heroku add-ons, do they have a replacement elsewhere?
It depends on the add-on, and this is where Heroku has the biggest edge in the comparison. Its marketplace has dozens of services that install with one command and create the environment variables in the app: email, monitoring, logs, search, queues, and databases from many vendors. No alternative has a catalog of the same size.
In practice, add-ons fall into two groups. Data add-ons, such as Postgres and Redis, have a direct equivalent on every platform: Render has Postgres and Key Value, Redis-compatible, from US$ 10 for 256 MB; Railway offers Postgres, MySQL, MongoDB, and Redis as services; Fly.io has Managed Postgres; DigitalOcean has separate managed databases. On Zenifra, there is PostgreSQL, MariaDB, Valkey in Key-Value and Cache profiles, queues with Valkey or RabbitMQ, and Armazém, which is S3-compatible.
The second group is third-party add-ons, such as transactional email or monitoring services. Most of them also sell directly, outside Heroku: you create an account with the vendor, copy the key, and put it in the new platform’s environment variables. The add-on leaves your Heroku invoice and gets billed by the vendor, sometimes at a different price. Before leaving, list every add-on, check whether it sells outside the marketplace, and how much it costs that way.
A few are exclusive to Heroku, such as Heroku Connect, which syncs data with Salesforce. If your app depends on one of those, migration costs more, and that is a good reason to stay.
Railway vs Heroku: how do they compare for app deployment?
Railway is the Heroku alternative with the most similar developer experience, and the biggest difference is how it bills. Heroku charges per dyno at a fixed price: Basic costs US$ 7 whether the app is busy or idle. Railway charges a subscription, which becomes credit, plus whatever the app uses in memory, CPU, volume, and traffic, metered minute by minute.
For a 512 MB app with a small Postgres, the two land close together: US$ 12.00 on Heroku and about US$ 12.15 on Railway in our example. Railway’s bill drops when the app sits idle a good part of the time and rises when it stays busy all month. With twice the memory and 0.5 vCPU on average, the same bill goes past US$ 30.
| Criterion | Heroku | Railway |
|---|---|---|
| Pricing model | Fixed price per dyno and per add-on plan | Subscription that becomes credit, plus metered usage |
| Paid entry point | Eco at US$ 5 (sleeps) or Basic at US$ 7 | Hobby at US$ 5, with US$ 5 of usage included |
| 512 MB app with a small Postgres | US$ 12.00 (R$ 68.85) | About US$ 12.15 (R$ 69.71), varying with usage |
| Free option | None since 2022 | Trial with a one-time US$ 5 and a Free plan with US$ 1 of monthly usage |
| Regions | US and Europe; Private Spaces in ten cities | California, Virginia, Amsterdam, and Singapore |
| Build | Buildpacks and Procfile | Railpack, which reads the Procfile, or a Dockerfile |
| Migrations | Release phase | Pre-deploy command |
| Cron | Heroku Scheduler, every 10 minutes, hourly, or daily | Native cron, with at least 5 minutes between runs |
| Entry plan limits | Basic with 512 MB per dyno | Hobby with up to 5 GB of volume and 6 replicas per service |
| For teams | Teams and Heroku Enterprise | Pro at US$ 20 a month, which also becomes credit |
Choose Railway if you like the Heroku experience, want to pay for consumption, and have an app that sits idle a good part of the day. Stay on Heroku if you depend on the add-on marketplace, prefer the same amount every month, or need Private Spaces. Either way, the app runs outside Brazil and the invoice comes in US dollars.
One Railway limit matters in production: on Hobby, volumes go up to 5 GB, so a growing database requires Pro. And Railway bills a postpaid card, with no prepaid credits.
Which Heroku alternative is best for Rails?
For Rails, Render is the alternative that requires the fewest changes, because it has a native Ruby runtime and an official guide covering build, migrations, and Sidekiq. Fly.io is the most flexible for teams already using the Dockerfile Rails generates. Railway and DigitalOcean work well with the same layout as Heroku. On Zenifra, Rails runs as a Docker image, in São Paulo.
Three points decide a Rails migration. The first is assets: on Heroku, the Ruby buildpack runs assets:precompile on its own. On Render, the official guide uses a build script with bundle install, bin/rails assets:precompile, and bin/rails assets:clean. On Docker-based platforms, the Dockerfile Rails has generated since version 7.1 already precompiles assets inside the image.
The second is migrations. The release: bundle exec rails db:migrate line in the Procfile becomes the pre-deploy command on Render, which requires a paid plan, and on Railway, the release_command in Fly.io’s fly.toml, and a pre-deploy job on DigitalOcean. On Zenifra, the bin/docker-entrypoint Rails generates already runs db:prepare before starting the server, which covers the common case; for long migrations or several instances, run the migration by hand before shipping the new version.
The third is Sidekiq. On every platform it becomes a separate process, with the same code and environment variables as the web process, and it needs a Redis or Valkey with persistence so the queue survives a restart. In Rails 8, Solid Queue, the framework default, keeps the queue in the database itself and removes the need for Redis, which saves one service on the bill.
| Platform | Web + Sidekiq worker | PostgreSQL | Redis or Valkey for the queue | Monthly total | In reais, with PTAX and 3.5% IOF |
|---|---|---|---|---|---|
| Heroku | 2 Basic dynos, US$ 14.00 | Essential-0, US$ 5.00 | Key-Value Mini (25 MB), US$ 3.00 | US$ 22.00 | R$ 126.22 |
| Render | 2 Starter instances, US$ 14.00 | 256 MB with 1 GB of storage, US$ 6.30 | 256 MB Key Value, US$ 10.00 | US$ 30.30 | R$ 173.83 |
| Railway (Hobby) | 0.5 GB + 0.5 GB of memory | 0.5 GB of memory and a 1 GB volume | 0.25 GB of memory and a 1 GB volume | About US$ 20.80, with 0.15 vCPU on average | R$ 119.33 |
| Zenifra | 2 Basic projects, R$ 59.80 | DB-Starter with 1 GB, R$ 12.10 | Valkey Key-Value DB-Starter with 1 GB, R$ 12.10 | R$ 84.00 | R$ 84.00, no IOF |
Heroku’s Key-Value Mini has only 25 MB, which is fine for a small queue but fills up fast with large jobs or many scheduled ones. Render has a free 25 MB Key Value, but free instances are not meant for production. On Zenifra, Valkey Key-Value persists data with AOF, so the queue survives a restart.
On Zenifra, the path for Rails is the framework’s own Dockerfile, a GitHub Action that builds and publishes the image on every push, and two projects: the public web one and the Sidekiq one, with private exposure and an image whose start command is bundle exec sidekiq. The Heroku migration guide covers the rest of the plan, from Config Vars to the DNS switch.
I’m migrating from Heroku and need a cheaper option: which should I pick?
The short answer is that no alternative is best for everyone, and the criterion that matters most is where your users are. In US dollars, the cheapest in the table is Fly.io in Ashburn, at US$ 7.69 for the app and the entry Postgres. In reais, for users in Brazil, Zenifra comes in at R$ 42.00 in São Paulo, with no exchange rate and no IOF. Below, each case with the alternative that usually makes the most sense.
If you want to leave Heroku changing as little as possible and prefer fixed prices, Render is the shortest path. Each service has a known monthly price, the dashboard feels like Heroku’s, and the Rails guide covers the classic web, worker, and Postgres layout. The trade-off is staying in the United States, billed in US dollars.
If your app has low and irregular traffic, Railway tends to be cheaper, because it charges only for the memory and CPU the app uses. It works well for internal APIs, bots, and projects that sit idle overnight. Watch the usage dashboard in the first weeks, because the bill follows consumption.
If you need several regions at once, or want a machine in São Paulo and are comfortable with Docker and fly.toml, Fly.io is the most flexible option. It needs more configuration than the others and the São Paulo machine costs 61.5% more than in Ashburn, but it is the only one in the group running the app in Brazil.
If your company already uses DigitalOcean droplets, Spaces, or databases, App Platform keeps everything on the same account and uses Heroku’s buildpack for Ruby. For production, plan on the US$ 15.15 managed database instead of the dev database.
If your users are in Brazil and you want to pay in reais, Zenifra solves both: the app and the database run in São Paulo, billing is by PIX, boleto, or card, with no IOF, and it can be hourly, monthly, or yearly. To test before migrating, hourly billing only charges the time the project is running: Basic costs R$ 0.05 per hour.
Where do Vercel, Koyeb, and Northflank fit in this comparison?
Vercel is excellent for frontends and Next.js, but it does not replace Heroku for a Rails or Django app or one with workers. It was built for sites and serverless functions: the Hobby plan is free with usage caps, and Pro costs US$ 20 a month per developer seat, with US$ 20 of usage credit included. Functions can run in São Paulo (gru1), but the default is Washington (iad1). An always-on process like Sidekiq, and a database with the same lifecycle as the app, fit better on the other platforms in this list.
A common setup is to keep the frontend on Vercel and the API, workers, and database on a container platform. In that case, put the API and Vercel functions in the same region, or close to it, so you do not pay for the distance on every call.
Koyeb charges US$ 29 a month on the Pro plan, with US$ 10 of compute included, and lists regions in the US, Europe, and Asia, with none in South America. On November 28, 2026, its pricing page showed a banner saying Koyeb is joining Mistral AI, without detailing what changes for customers. Northflank has a free Sandbox tier with up to US$ 20 of resources a month, requires a card, and the smallest plan shown on its pricing page has 0.5 vCPU and 1 GB for US$ 12 a month; it also lets you run on your own cloud account. Both are solid options for teams that want more than a classic PaaS, but neither lists a region in Brazil on its pricing page.
When is staying on Heroku the best choice?
Staying on Heroku is the best choice when the cost of migrating outweighs the savings, and that happens more often than comparisons suggest. If your invoice is US$ 12 a month, the difference to any alternative is a few dollars, and one day of a teammate’s work is worth more than a year of those savings.
It also makes sense to stay when the app depends on add-ons with no equivalent outside the marketplace, such as Heroku Connect for teams integrating with Salesforce, or when the company needs Private Spaces, network isolation, and regions in several countries for compliance. None of the alternatives in this list replicates the whole package.
If your revenue is in US dollars, the exchange rate stops being a risk, because revenue and cost move together. And if your users are in the United States or Europe, Heroku’s regions are already close to them. In those cases, the question stops being where to go and becomes whether you can pay less within Heroku itself: swapping Standard-1X dynos that use little memory for Basic, reviewing forgotten add-ons, and turning off idle test apps usually lowers the bill without changing platforms.
How do you switch platforms without taking the app offline?
The plan is similar on every alternative and has four phases. First, the inventory: list the processes, add-ons, variables, domains, and scheduled tasks of the Heroku app with heroku config, heroku ps, and heroku addons. Then set up the app on the destination pointing at a new database and validate everything on the platform’s temporary URL.
The third phase is copying the data. For small databases, heroku pg:backups:capture and heroku pg:backups:download produce a file that pg_restore loads into the destination. For larger databases, use pg_dump directly against the database URL. Do a full rehearsal before switch day and time it: that is your maintenance window.
Finally, on switch day, turn on Heroku maintenance mode, do the final copy, point DNS at the destination, and keep the old app running for a few days as a rollback. Lowering the DNS TTL to 300 seconds the day before makes the switch, and any rollback, faster. The detailed step by step for Zenifra, with a translation of every Heroku concept, is in the migration guide.
# Inventory of the Heroku app
heroku config --shell -a my-app > heroku.env
heroku ps -a my-app
heroku addons -a my-app
# Copy the database to the destination
heroku pg:backups:capture -a my-app
heroku pg:backups:download -a my-app
pg_restore --no-owner --no-acl --dbname="$DESTINATION_DATABASE_URL" latest.dumpSummary
Heroku is still a mature PaaS, but it has had no free plan since 2022, has steep price steps above Basic, no region in South America, and bills in US dollars. A 512 MB app with a small Postgres costs US$ 12.00 on Heroku, US$ 13.30 on Render, about US$ 12.15 on Railway, US$ 7.69 on Fly.io in Ashburn, and US$ 12.00 on DigitalOcean. Render is the smoothest move for Rails, Railway pays off with irregular usage, Fly.io is the most flexible and the only foreign option here with machines in São Paulo, and Vercel is for the frontend.
If your users are in Brazil, it is worth running the same numbers with a platform in São Paulo: on Zenifra, the same pair costs R$ 42.00 in reais, and the calculator shows your own scenario.