
Heroku alternatives: what a Rails app with Postgres costs
October 20, 2026
Aron Wagner
CEO & Co-Founder
On Heroku, this example Rails app costs $215 a month: two Standard-2X web dynos, a Standard-2X Sidekiq worker, Postgres Standard-0 and Key-Value Premium 0. $150 of that is dyno memory, at $50 per GB. Elsewhere it costs $51 to $315, and who runs Postgres matters most: under $70 if you do, $94 and up if someone else does.
On American Cloud it's $65 on one server you run yourself, or $120.78 with the app on a server and Postgres on our managed database. If someone on your team is comfortable running Linux, we'd take the server.
Heroku pricing for a Rails app with Postgres: what the $215 pays for
Here's the app's bill at Heroku's list prices:
- Two web dynos, Standard-2X, 1 GB of memory each: $100
- One Sidekiq worker, Standard-2X, 1 GB: $50
- Heroku Postgres Standard-0, 4 GB of RAM, 64 GB of storage, rollback up to 4 days: $50
- Heroku Key-Value Store Premium 0, 50 MB: $15
Look at what the dynos cost per GB. Standard-1X is $25 for 0.5 GB and Standard-2X is $50 for 1 GB, so both work out to $50 per GB a month. When a web dyno needs more than 1 GB, the next size up is Performance-M: $250 for 2.5 GB, or $100 per GB. So the bill grows in steps of memory, whether you add a dyno for traffic or move one up a size.
Heroku also bills by elapsed time. Its docs say it "computes usage from wall-clock time, not CPU time," so a dyno that sits idle at 3 a.m. costs the same as one at full load. Our own Heroku migration guide puts it this way: you're paying for a web dyno, workers, a Postgres add-on and a Redis add-on, "each its own line on the bill, none of them a server you can size yourself."
Is Heroku being discontinued?
No. On February 6, 2026, Heroku said it is "transitioning to a sustaining engineering model focused on stability, security, reliability, and support." Customers who pay by credit card see "no changes to pricing, billing, service, or day-to-day usage," and new customers can't sign Enterprise contracts anymore. It's still shipping, too: its blog has an October 2026 update and the launch of Heroku Postgres Advanced.
The free plans are gone. In August 2022, Heroku said that starting November 28, 2022, it would stop offering free plans and begin shutting down free dynos and data services. Eco dynos now cost $5 a month and sleep after 30 minutes without traffic. And on June 10, 2025, an outage caused "up to 24 hours of downtime for many customers," by Heroku's own account.
Rails and Postgres hosting prices in 2026: three ways to move this app
Here's the same app nine ways, from each provider's own US list prices on October 20, 2026, grouped by who runs Postgres.
| Way to move | Platform | This app costs a month | How we sized it |
|---|---|---|---|
| One server | American Cloud | $65.00 | 2 vCPU, 8 GB, 80 GB |
| One server | Hetzner (US) | $50.99 | CCX13: 2 dedicated vCPU, 8 GB, 80 GB |
| One server | DigitalOcean Droplet | $63.00 | General Purpose: 2 dedicated vCPU, 8 GiB, 25 GiB |
| App on a server, managed Postgres | American Cloud | $120.78 | VM with 2 vCPU, 4 GB ($43.13), managed PostgreSQL with 5 cores, 4 GB, 25 GB ($77.65) |
| App on a server, managed Postgres | DigitalOcean | $102.90 | CPU-Optimized Droplet, 2 vCPU, 4 GiB ($42), Managed PostgreSQL, 2 vCPU, 4 GiB ($60.90) |
| Managed platform | Railway | About $94 | 7.25 GB, 1 vCPU, by use |
| Managed platform | DigitalOcean App Platform | $111.90 | Three 1 GiB shared-vCPU containers, Postgres 4 GiB, Valkey 1 GiB |
| Managed platform | Render | $167.70 | Pro $25, three 2 GB services, Postgres 4 GB, Key Value 256 MB |
| Managed platform | Fly.io | $314.90 | Three 1 GB shared-CPU machines, Postgres 8 GB with failover |
| For reference | Heroku | $215.00 | The bill above |
Every row runs two web processes and a worker with 1 GB each, Postgres with at least 4 GB of RAM and 10 GB of data, and the smallest paid Redis; on the server rows, Redis runs on the server. Each platform gets its smallest size at or above that. Server rows use dedicated CPUs and don't count a public IP, and no row includes taxes, support plans or a deploy tool.
Run everything on one server
This is the cheapest way off Heroku, and it's the setup our Migrate from Heroku recipe builds: both web processes, the worker, Postgres and Redis on one machine. Hetzner's CCX13 is the lowest price we found, at $50.99. Ours is $65 for 2 vCPU, 8 GB and 80 GB, priced at $10 per vCPU, $1 per 16 GB of disk and $5 per GB of memory, so memory is priced per GB instead of in dyno-size steps. As our Heroku guide says, the same workload that forced several dynos "usually fits on one VM you can resize as you grow."
What you take on is the server and the database: OS updates, Postgres upgrades, and backups you've actually restored. Our backups recipe runs a nightly pg_dump to object storage, $5 a month for the first 250 GB, plus a restore drill on a temporary VM. Downloading a backup costs nothing, and neither does any other outbound traffic. The Migrate from Heroku recipe sets Postgres and Redis to listen only on localhost, so neither one is reachable from the internet. This fits a team with one person who's comfortable on a Linux server, and when something on it breaks, our support replies in under 2 minutes.
Move the app, keep Postgres managed
If you'd rather not run the database, put the web processes, the worker and Redis on a 2 vCPU, 4 GB VM for $43.13, and Postgres on our managed PostgreSQL for $77.65. DigitalOcean's version of the same split, a CPU-Optimized Droplet and Managed PostgreSQL with 4 GiB, is $102.90.
You can also start with everything on one server and move Postgres to the managed service later. Once you point a managed database at a backup bucket, it backs up on a schedule you set, and when you want failover, the data redundancy plan runs Postgres on three nodes. Our post on managed databases vs self-hosted goes through that choice in more detail.
Stay on a managed platform
These four run the app and the database for you, which is closest to how Heroku works.
- Railway bills by use: $10 per GB of memory and $20 per vCPU a month. Its Postgres is "a single node that Railway maintains"; failover and backups are things you turn on. You can set an email alert or a hard limit on usage, and the hard limit takes every workload offline when you reach it.
- DigitalOcean App Platform runs web and worker components, the same split as a Procfile, priced by container size: $12 a month for 1 shared vCPU and 1 GiB, next to Managed PostgreSQL at $60.90 for 4 GiB and Valkey at $15.
- Render has no 1 GB service size. The step above 512 MB is 2 GB for $25, so three processes are $75, on top of the $25 Pro plan, Postgres with 4 GB at $55 and Key Value at $10.
- Fly.io machines are $6.70 a month for 1 GB, but its Managed Postgres jumps from 2 GB at $72 to 8 GB at $282, with failover on every plan. On the 8 GB plan this app is $314.90; on the 2 GB plan, $104.90. Fly doesn't support billing alerts yet.
Outbound traffic changes these totals. At 1 TB of outbound traffic a month, Render adds $146.25 (Pro includes 25 GB, then $0.15 per GB), Railway $50, Fly.io $20 and App Platform $9.63. Heroku soft-limits bandwidth at 2 TB per app a month, and we found no per-GB fee. Every server in the table includes at least 1 TB.
We left Vercel and Netlify out of the table because this app is a Rails backend with Postgres and a worker, not a frontend project. If yours is a Next.js frontend, see our Vercel alternatives instead.
Kamal, Hatchbox or Dokku: deploying Rails to your own server
Moving to a server doesn't mean giving up git push deploys. Each Heroku piece has a plain equivalent:
- Procfile lines become services on the server.
- Heroku Scheduler becomes cron.
- Config vars become an environment file.
- Heroku Postgres becomes Postgres with a nightly dump to object storage.
Then pick a deploy tool:
- Kamal 2 comes preconfigured in Rails 8 and deploys Docker containers with zero downtime. Postgres and Redis run beside the app as extra containers, which Kamal calls accessories.
- Dokku calls itself "an open source PAAS alternative to Heroku": you
git push, and it builds with Heroku buildpacks. - Hatchbox is $15 a month per server, for any number of apps.
- Coolify gives you a dashboard and preview deployments for pull requests, free when you host it yourself. Our marketplace has a one-click Coolify image.
If you're on Rails 8, check whether you need Redis at all. The Rails 8 release notes say Solid Queue "replaces the need for not just Redis, but also a separate job-running framework, like Resque, Delayed Job, or Sidekiq, for most people." That takes the Redis line off every row in the table.
Our Migrate from Heroku recipe does the move with your AI assistant and our MCP server. It reads your Procfile and prices the VM before it creates anything, so the first thing you get is your own app's monthly number. Then it turns each process into a service and moves Postgres with pg_dump and pg_restore while the Heroku app sits in maintenance mode.