Originally published on the Hubfly blog.
Your Heroku bill is a dyno plus a database, and you want to know where to move and what it will cost. Heroku still works, and your app on it is fine today. But in February 2026 Heroku said it is moving to a "sustaining engineering" model, centered on upkeep and dependable operation, with new features no longer the priority, and it stopped offering Enterprise contracts to new customers (Heroku's announcement). Card-paying customers keep the same pricing. Still, if you're starting something new, or your bill keeps growing, it's a good moment to look around.
The problem: most "Heroku alternatives" lists give you a "starting at" price per platform and stop there. That's not what you pay. You pay for a web service plus a database, and sometimes a workspace fee on top. This guide prices the same small app everywhere, so the numbers compare.
Try it on Hubfly space: free tier, 360 compute hours a month, no card needed.
TL;DR
- What you get: the monthly cost of the same small app (one always-on web service with 512 MB of RAM plus a Postgres database) on Heroku and 7 alternatives, with every price linked to the vendor's own pricing page (prices as of 19 October 2026).
- Who it's for: anyone running a side project, an internal tool or an early SaaS on Heroku who wants to know where to go and what it will cost.
- Time needed: 10 minutes to read, about 15 minutes to move a small app.
- Short answer: for a managed database, Render and DigitalOcean cost about the same as Heroku. For the lowest bill on a managed platform, Fly.io and Hubfly space land around $7.50 a month, but you run Postgres in a container yourself. If you're happy to be your own ops team, Coolify on one Hetzner server is the cheapest per gigabyte.
The reference app
To compare Heroku alternatives fairly, every price below is for the same setup, the one most Heroku apps actually are:
- 1 web service, always on, about 512 MB of RAM (the size of a Heroku Basic dyno).
- 1 Postgres database, small, with at least 1 GB of storage.
- 730 hours a month (a full month, always on).
- Lowest-priced region where a platform charges differently by region.
Why this matters: a price per container alone hides the database, which is often half the bill. And a "free" plan that sleeps after 15 minutes isn't the same product as an always-on one. So the main table is always-on, and free tiers get their own section.
The comparison table (always on, per month)
| Platform | Web service (512 MB) | Postgres | Monthly total | Database is |
|---|---|---|---|---|
| Heroku | Basic dyno $7 | Essential-0, 1 GB $5 | $12 | Managed |
| Render | 512 MB instance $7 | 256 MB RAM, 1 GB SSD $6 | $13 | Managed |
| DigitalOcean App Platform | 1 vCPU, 512 MiB $5 | Dev database, 512 MiB $7 | $12 | Managed (dev tier) |
| Railway | 0.5 GB RAM, usage-based (rates) | Same, plus 1 GB volume | about $12.33 (see math, quiet app) | You run the template |
| Fly.io | shared-cpu-1x, 512 MB $3.69 | Same machine size + 1 GB volume ($3.69 + $0.15) | $7.53 | You run it |
| Fly.io + Managed Postgres | $3.69 | Basic $38 + 1 GB at $0.28 | $41.97 | Managed |
| Hubfly space | 1 vCPU, 512 MB, always on: $3.71 | Same size + 1 GB volume: $3.72 | $7.43 (see math) | You run it |
| Koyeb | eco-micro, 0.25 vCPU, 512 MB $2.68 | small, 1 GB RAM $29.76 + 1 GB at $0.50 | $32.94 | Managed |
| Coolify on Hetzner CX23 | One server, 2 vCPU, 4 GB: $6.49 excl. IPv4 | Runs on the same server | $6.49 + IPv4 | You run it, and the server |
All prices were read on the vendors' official pages on 19 October 2026, in USD, before tax. Prices change. Click through before you decide.
How the usage-based numbers are worked out
Hubfly space bills per resource: $0.004 per vCPU-hour, $0.002 per GB of RAM per hour, and $0.00001536 per GB of storage per hour (pricing). For one always-on dedicated container with 1 vCPU, 512 MB of RAM and 5 GB of disk:
- CPU: 1 × $0.004 × 730 h = $2.92
- RAM: 0.5 GB × $0.002 × 730 h = $0.73
- Disk: 5 GB × $0.00001536 × 730 h = $0.056
- Total: $3.71 a month per container
Two of those (web and Postgres) come to $7.41. The Postgres volume adds 1 GB on Balanced storage (1.5× the base rate): 1 × $0.00001536 × 1.5 × 730 = $0.017. Grand total: $7.43. The Stack Composer's Monthly Estimate prices each service as you set it up, before you deploy (screenshots below). Drop each container to 0.5 vCPU and the total falls to about $4.51.
Railway bills what your services actually use, per second: $0.00000386 per GB of RAM and $0.00000772 per vCPU (pricing). A 730-hour month is 2,628,000 seconds. Assume each service holds 0.5 GB of RAM and averages 0.05 vCPU (a quiet app):
- RAM: 0.5 × $0.00000386 × 2,628,000 = $5.07 per service
- CPU: 0.05 × $0.00000772 × 2,628,000 = $1.01 per service
- Two services: $12.17, plus a 1 GB volume at $0.16 = about $12.33
The Hobby plan's $5 minimum is included in that, not added. A busier app costs more; one that idles at 200 MB costs less. That's the point of usage pricing, and also why you can't know the bill in advance.
Fly.io prices above are for Ashburn (iad), one of its two lowest-priced regions. Fly lists higher prices elsewhere; a 1 GB machine is $6.70 in Ashburn and $7.73 in Frankfurt (pricing).
Free tiers: what you get, and the catch
| Platform | Free web service | Free database | The catch |
|---|---|---|---|
| Heroku | None. Eco is $5 | None | Eco dynos sleep after 30 minutes of inactivity |
| Render | Yes, 750 hours a month (docs) | Yes | Web spins down after 15 minutes without traffic and takes about a minute to wake. Free Postgres expires after 30 days, with a 14-day grace period |
| Railway | 30-day trial with $5 credit, then $1 a month (pricing) | Within credit | 0.5 GB RAM per service and 0.5 GB of volume on Free |
| Fly.io | Trial only: 2 hours of machine time or 7 days (pricing) | No | Pay as you go after that |
| DigitalOcean | Static sites only, up to 3 apps (pricing) | No | No free container |
| Koyeb | 1 web service, Frankfurt or Washington (instances) | 1 database, 5 hours of active time, 1 GB (FAQ) | Free instance scales to zero after 1 hour without traffic |
| Hubfly space | Shared tier, 360 compute hours a month, no card (pricing) | Postgres runs as a container on the same free hours | Shared containers sleep when idle. Volumes are still billed (1 GB is about $0.02 a month) |
If your app must answer instantly at 3 a.m., none of the free tiers is for you. Pay for always-on, on any platform.
Where each platform wins
A fair comparison says where the others are better.
Heroku is still the original "push and forget" experience, with a large add-on marketplace. Card customers keep the same prices. Stay if your app is stable and the bill doesn't hurt; the main risk is fewer new features from here on.
Render works the most like Heroku: managed Postgres, the same web-service model, and a free tier for experiments. You pay a little more than Heroku for the same setup, and $0.15 per GB after 5 GB of bandwidth on Hobby (pricing).
DigitalOcean App Platform matches Heroku's price with a cheaper web container ($5) and a $7 dev database. Bandwidth overage is only $0.02 per GiB. Good if you already use DigitalOcean.
Railway has a visual project canvas and bills by the second for what you really use. Great for spiky or idle apps. Harder to predict a monthly bill.
Fly.io wins on regions: you can run the same app close to users on several continents, at $3.69 for a 512 MB machine in Ashburn (pricing). Its managed Postgres is the most expensive line in this table, so most small apps run their own.
Koyeb has the cheapest small container here ($2.68 for 512 MB). Its managed Postgres starts at $29.76 a month, so it's cheapest when the database lives elsewhere.
Coolify on Hetzner gives you the most server for the money: 2 vCPU and 4 GB of RAM for $6.49. Coolify itself is free to self-host. But you're the ops team: OS updates, backups, monitoring and the 3 a.m. disk-full alert are yours. One more catch on 19 October 2026: Hetzner's cost-optimized page listed the CX23 as "currently unavailable".
Hubfly space lands next to Fly.io on price ($7.43 always on, $4.51 at half a vCPU), with no per-seat, per-project or custom-domain fee. You can also set a monthly budget cap per project, so a runaway app stops instead of surprising you. Where it's weaker today: Postgres runs as a container you manage, and Hubfly doesn't yet document database backups or snapshots. If you need to run in many regions at once, Fly.io is the stronger pick.
Moving a Heroku app to Hubfly space in about 15 minutes
Here's the path for the reference app: a web service and Postgres.
1. Create a project. In the dashboard, click Create Project, pick Cell, choose a region and, under Advanced Options, set a Monthly Budget Limit (for example $10). A budget cap means a bug can't run up a big bill.
2. Describe your app in a Compose file. Heroku's Procfile and add-ons become two services. Replace your-image with your app's image, or deploy from Git (Hubfly builds from a root Dockerfile or detects your stack from package files).
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: change-me
POSTGRES_DB: notes
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "app", "-d", "notes"]
interval: 5s
timeout: 3s
retries: 10
web:
image: your-image
environment:
DATABASE_URL: postgres://app:change-me@{{service:db.host}}:5432/notes
ports:
- "80:80"
depends_on:
db:
condition: service_healthy
volumes:
pgdata:
Replace change-me with a long random password (for example from openssl rand -hex 24) and keep the real value out of Git: set it in the service's environment variables in the dashboard.
Why the volume: it keeps your database files when the container restarts or redeploys. Without it, every update would wipe your data. Why {{service:db.host}}: Hubfly fills in the database's private address, so the app never goes over the public internet to reach Postgres.
3. Import and check the price. Click Create → Compose Stack, open the YAML tab, paste the file and click Import YAML. The Monthly Estimate shows the cost before anything runs. Both services start on the free shared tier.
4. Choose always-on, if you need it. Click the web service, open Resources and switch Service tier to Dedicated (Production). The default is 1 vCPU, 512 MB and 5 GB, with 24x7 On. The estimate updates right away.
5. Deploy. Click Deploy Stack. The volume is created, Postgres deploys first, then the web service. The whole stack is up in under a minute.
6. Give it a public URL. Open the web service, then Network → Add Domain → Auto Endpoint and click Create Subdomain. You get an HTTPS address like your-word.eu1.hubfly.app within seconds. The ports: "80:80" line only gives a raw TCP address; the Auto Endpoint is what gives you HTTPS. Add your own domain the same way under Custom Domain.
7. Move your data. Dump from Heroku with heroku pg:backups:capture and heroku pg:backups:download, then open a HubTunnel to the new database (hubfly tunnel create --project <project-id> --container <db-container-id> --port 5432 --local 15432) and restore: pg_restore --no-owner --no-acl -h 127.0.0.1 -p 15432 -U app -d notes latest.dump. Switch your DNS when the data is in.
What can go wrong
1. The app returns 502 Bad Gateway. Heroku sets PORT for you and your app listens on it. On Hubfly, the app must listen on 0.0.0.0 and on the port you expose. An app bound to 127.0.0.1 gives a 502. Fix: bind to 0.0.0.0 (full fix).
2. ports: "80:80" gives you a TCP address, not a website. Importing a Compose file with ports creates a raw TCP endpoint on tcp.eu1.hubfly.app. For HTTPS, add an Auto Endpoint or a custom domain as in step 6.
3. The web service starts before the database is ready. Don't count on depends_on: condition: service_healthy to hold the web service back. Add a connection retry with backoff in your app, so it keeps trying until Postgres accepts connections, and again after any restart (health checks explained).
Bonus: Hubfly doesn't read a Procfile. Put your start command in the Dockerfile or in Configuration → Process Settings.
Takeaway
- Want a managed Postgres and no ops? Render (about $13) or DigitalOcean (about $12). Same price range as Heroku.
- Want the lowest bill on a managed platform, and can run Postgres in a container? Fly.io ($7.53) or Hubfly space ($7.43, or $4.51 at half a vCPU), with a budget cap on Hubfly.
- Want the most server per dollar and don't mind ops? Coolify on Hetzner ($6.49 plus IPv4).
- Bill depends on traffic and you like per-second pricing? Railway.
- Just need the cheapest container, with the database elsewhere? Koyeb ($2.68).
Read next: Heroku vs Render vs Railway vs Hubfly: 4 prices for one app + Postgres, Deploy a docker-compose.yml as-is: 8 platforms compared and Gate your app on a Postgres migration job.
Go further on Hubfly space
- Ship a new version to 10% of users first with a weighted load balancer: canary releases guide.
- Keep uploads and images out of your app container with S3-compatible Storage buckets and on-the-fly image resizing.
- Lock an admin panel behind a login at the edge with Identity Access, no code changes.
Moving from Heroku? Paste your stack into the Stack Composer and see the monthly estimate before you deploy anything. Start free on Hubfly space.



Top comments (0)