Heroku alternatives for apps that need a database
Render, Railway, Fly.io, DigitalOcean App Platform, a self-hosted PaaS or a plain server, compared for a web process, a worker, cron jobs and PostgreSQL, with each provider's own prices.
TL;DR
- For a web process, a worker and the smallest always-on PostgreSQL (opens in a new tab), the list prices on 11 November 2026 were $19 a month on Heroku (opens in a new tab), about $20 on Render (opens in a new tab), $17 to $25 on DigitalOcean (opens in a new tab) App Platform and about $44 on Fly.io with its Managed Postgres; Railway (opens in a new tab) bills by the second for what you use.
- Render and DigitalOcean App Platform are the closest to Heroku's model: a service per process, managed PostgreSQL, cron jobs, git-push deploys.
- A server you rent runs the web process, the worker, cron and PostgreSQL together for one flat price (€16.99 a month for 2 vCPU and 4 GB at Hetzner (opens in a new tab) in Helsinki), but the upkeep and backups become yours.
- There is no lasting free tier for an app with a database: Render's free PostgreSQL expires after 30 days, Railway and Fly.io start with trial credit, Heroku has none.
On this page
The Heroku alternatives that fit an app with a database are Render and DigitalOcean App Platform (the closest to Heroku's model), Railway and Fly.io (billed by usage), a self-hosted PaaS such as Coolify (opens in a new tab) or Dokploy (opens in a new tab) on your own server, and a plain server you run yourself. None is the best for everyone: the right one depends on how much of Heroku's work you want to keep paying for.
This comparison is part of our guide to moving off Vercel, Heroku, Render or Railway. Prices and limits come from each provider's own pages and documentation, read on 11 November 2026, in US dollars excluding taxes unless marked otherwise. We did not benchmark performance or support.
What a Heroku app actually runs
A real Heroku app is usually more than one web process:
- a web dyno, and often a worker dyno for background jobs (both from the same Procfile);
- a release command that runs migrations before each release;
- Heroku Postgres, and sometimes Redis (Heroku Key-Value Store);
- Heroku Scheduler jobs, "expected but not guaranteed" to run, in Heroku's own words;
- config vars, custom domains with automatic certificates, logs and review apps.
Heroku today
Heroku has no free tier. On its pricing page, an Eco dyno costs $5 a month and sleeps after 30 minutes without traffic, a Basic dyno $7 (0.5 GB of memory), Standard-1X $25 (0.5 GB) and Standard-2X $50 (1 GB). Heroku Postgres starts at $5 for Essential-0 (1 GB of disk, 20 connections, shared memory), $9 for Essential-1 (10 GB) and $50 for Standard-0 (4 GB of memory, 64 GB of disk). The smallest Key-Value Store is $3.
Apps run in the us or eu region of the Common Runtime; Private Spaces add Dublin, Frankfurt and eight more locations. Heroku notes that picking a region "does not guarantee restriction of data residency" for its products and add-ons.
On 6 February 2026, Heroku announced it was "transitioning to a sustaining engineering model focused on stability, security, reliability, and support", that there was "no change for customers using Heroku today", and that Enterprise Account contracts "will no longer be offered to new customers". It still ships maintenance: its stacks were updated in October 2026. If your app runs well on Heroku and the bill is fine, that announcement alone is not a reason to move.
Heroku alternatives at a glance
| Option | Web | Worker | PostgreSQL | A month |
|---|---|---|---|---|
| Heroku | Basic, 0.5 GB: $7 | Basic: $7 | Essential-0, 1 GB disk: $5 | $19 |
| Render (Hobby workspace, $0) | Starter, 512 MB: $7 | Starter: $7 | 256 MB plan: $6, plus $0.30 per GB of storage | about $20.30 with 1 GB |
| DigitalOcean App Platform | 512 MiB: $5 | 512 MiB: $5 | Development database: $7, or Managed PostgreSQL 1 GiB: $15.15 | $17 or $25.15 |
| Fly.io (Ashburn) | shared-cpu-1x, 512 MB: $3.69 | 256 MB: $2.19 | Managed Postgres Basic: $38, plus $0.28 per GB | about $44.16 with 1 GB |
| Railway (Hobby) | Billed by the second for memory, CPU and volume used | PostgreSQL runs as a service on the same usage rates | At least $5, which includes $5 of usage | |
| Your own server (Hetzner CPX22, Helsinki) | All on one server: 2 vCPU, 4 GB, 80 GB, 20 TB traffic | €16.99, excl. VAT |
The table is a floor: bandwidth, more memory, backups, extra workers and support plans are on top on every platform, and on your own server the backups and your hours are. For users in Europe, hosting a Next.js app in the EU without Vercel sets out where each platform keeps your data; its table applies to any app.
Render
Render is the closest to Heroku's model: a web service, a background worker and a cron job are separate services built from your repository, next to managed PostgreSQL and a Redis-compatible Key Value store.
- Workspace: Hobby is $0 plus compute, "for individuals", with up to 25 services and 5 GB of bandwidth a month; Pro is $25 a month plus compute, for teams, with 25 GB. Bandwidth beyond that costs $0.15 per GB.
- Compute: web services and background workers share the same instance prices: $7 for 512 MB, $25 for 1 CPU and 2 GB, $85 for 2 CPU and 4 GB.
- PostgreSQL: $6 a month with 256 MB of memory, $19 with 1 GB, $40 with 2 GB, plus $0.30 per GB of storage; point-in-time recovery covers 3 days on Hobby and 7 on Pro.
- Cron jobs: billed by the second while they run, from $0.00016 a minute for 512 MB.
- Release command: Render lists a pre-deploy command, the equivalent of Heroku's release phase.
- Free: free web services stop after 15 minutes without traffic and take about a minute to start again; each workspace gets 750 free instance hours a month. A free PostgreSQL database has 1 GB and expires 30 days after creation. Background workers and cron jobs have no free instance.
- Regions: Oregon, Ohio, Virginia, Frankfurt and Singapore. A service's region cannot be changed later; you create a new one.
Suits: a Heroku app that wants the same shape, a lower entry price and managed PostgreSQL.
DigitalOcean App Platform
App Platform runs web services, workers and jobs as components of an app, from a Git repository or a container image.
- Containers: $5 a month for 1 shared vCPU and 512 MiB (a "fixed" size that runs one instance only), $10 for 1 GiB, $12 for 1 GiB that can scale out, $25 for 2 GiB. Each instance includes outbound transfer (50 GiB on the $5 size); more costs $0.02 per GiB.
- Databases: a development database (PostgreSQL, 512 MiB) costs $7, but DigitalOcean says it "is not backed up by default" and is destroyed with the app. For production, Managed PostgreSQL starts at $15.15 a month with 1 GiB of memory and 10 GiB of storage.
- Free: up to three apps with static sites only.
- Regions: dynamic apps run in New York, Amsterdam, San Francisco, Singapore, London, Frankfurt, Toronto, Bangalore, Sydney, Atlanta, Richmond and Kansas City.
Suits: an app that wants managed PostgreSQL at a moderate price, with Droplets and other DigitalOcean services in the same account.
Railway
Railway bills by the second for what each service uses, with no fixed instance sizes.
- Plans: Hobby has a $5 minimum and includes $5 of usage; Pro has a $20 minimum, includes $20 of usage and adds seats and higher limits. New accounts start with a 30-day trial and a one-time $5 credit; the Free plan includes $1 of usage a month, with each service limited to 1 vCPU and 0.5 GB.
- Rates: $0.00000386 per GB of memory per second and $0.00000772 per vCPU per second, which over a 30-day month is about $10 per GB of memory and $20 per vCPU kept busy all month; volumes about $0.15 per GB a month; $0.05 per GB of egress.
- Databases, workers and cron: PostgreSQL and other open-source databases run as services with volumes, which Railway can back up on a daily, weekly or monthly schedule; a worker is one more service; a cron job is a schedule on a service.
- Regions: California, Virginia, Amsterdam and Singapore, and a service can move region later (with downtime while a volume moves).
Suits: an app with modest, uneven load where paying for actual use beats a fixed size. Measure your usage for a month before you compare it with a fixed price.
Fly.io
Fly.io runs your Docker (opens in a new tab) image as Machines in the regions you choose, billed by the second while they run, with no monthly platform fee.
- Compute: in Ashburn, a shared-cpu-1x Machine costs $2.19 a month with 256 MB, $3.69 with 512 MB and $6.70 with 1 GB; prices vary by region (the 1 GB Machine is $7.73 in Frankfurt). A stopped Machine costs only its root file system.
- PostgreSQL: Managed Postgres from $38 a month (Basic) to $1,922, plus $0.28 per GB of storage.
- Data transfer: $0.02 per GB to the internet in North America and Europe; inbound is free.
- Free: a $1 trial credit for 7 days without a card; after that, a personal organization's bill under $5 a month is waived when a card is on file.
- Regions: 17, including Amsterdam, Stockholm, Paris, Frankfurt and London.
Suits: an app that needs to run close to users in several regions, or workers that are cheap to keep running. For a single-region app with one database, the Managed Postgres price dominates the bill.
A self-hosted PaaS on your own server
Coolify, Dokploy and CapRover give you a Heroku-like dashboard (deploy on git (opens in a new tab) push, databases, domains with automatic certificates) on a server you rent or own; Kamal does the deploy part from your terminal, without a dashboard. The software is free to self-host; you pay for the server, and you run and secure it and the panel. Self-hosted PaaS compared goes through all four: their licences, requirements, what they manage and what they leave to you.
Suits: several apps or services that can share one server's price, and someone willing to keep that server patched.
A plain server, by hand or with a tool
The web process, the worker, the scheduled jobs and PostgreSQL all run on one server with Docker Compose. A Hetzner CPX22 (2 vCPU, 4 GB, 80 GB, 20 TB of traffic) cost €16.99 a month excluding VAT in Helsinki on 11 November 2026 (€19.99 in Nuremberg); adding a worker or a cron job costs nothing until the server is full. What you take over: OS updates, the firewall, backups you have tested, and monitoring. Migrate a Heroku app and its Postgres database to a VPS shows the tested move, from the Procfile to the DNS cutover, and Hetzner vs DigitalOcean compares two providers for the server.
Suits: an app whose parts would each cost a monthly line on a platform, when you, or a tool, can own the upkeep. Our comparison of your own server and a hosting platform sets out that trade.
Cron jobs: what replaces Heroku Scheduler
| Option | Scheduled jobs |
|---|---|
| Heroku | Scheduler add-on: every 10 minutes, hourly or daily, not guaranteed; runs one-off dynos billed as usage |
| Render | Cron job services, any cron expression, billed for run time |
| Railway | A cron schedule on a service, in UTC, runs at least 5 minutes apart |
| DigitalOcean App Platform | Job components in the app |
| Fly.io | Scheduled Machines (hourly, daily, weekly or monthly, not at exact times), supercronic as a process, or Fly's Cron Manager app |
| Your own server | A cron in a container (such as supercronic) or the host's cron |
Doing this with OpsCrew
OpsCrew, the open-source tool we build, is the "plain server, with a tool" option. It reads your repository, including a Procfile, whose process types other than web and release become workers running from your app's image, and runs your cron jobs with supercronic in a container of their own (workers and cron jobs). It runs PostgreSQL, MySQL (opens in a new tab), MariaDB (opens in a new tab) or MongoDB (opens in a new tab) next to the app with a generated password and no public port (databases), on a server at Hetzner Cloud or DigitalOcean that it creates from a plan you approve, or on a server you already have. When a database outgrows the app's server, it can move to a server of its own (split placement), and opscrew advise reads the providers' prices and your server's figures to propose a better size (advice on size and cost). OpsCrew is free; you pay the provider for the server.
For the whole decision, including when a platform is the better choice, go back to moving off Vercel, Heroku, Render or Railway.
Key facts
| Fact | Value | Source |
|---|---|---|
| Heroku Basic dyno | 7 USD per month0.5 GB of memory. Eco dynos cost $5 and sleep after 30 minutes without traffic. | Heroku pricing (opens in a new tab)Verified on |
| Heroku Postgres Essential-0 | 5 USD per month1 GB of disk, 20 connections, shared memory. | Heroku pricing (opens in a new tab)Verified on |
| Render Starter instance | 7 USD per month512 MB, for a web service or a background worker; PostgreSQL from $6 (256 MB) plus $0.30 per GB of storage. | Render pricing (opens in a new tab)Verified on |
| Fly.io Managed Postgres, Basic | 38 USD per monthPlus $0.28 per GB of storage; a shared-cpu-1x Machine with 512 MB costs $3.69 a month in Ashburn. | Fly.io resource pricing (opens in a new tab)Verified on |
| DigitalOcean App Platform smallest container | 5 USD per month1 shared vCPU (fixed), 512 MiB, 50 GiB transfer; development database $7; Managed PostgreSQL from $15.15. | App Platform pricing (opens in a new tab)Verified on |
| Hetzner CPX22 in Helsinki (2 vCPU, 4 GB, 80 GB, 20 TB) | 16.99 EUR per month, excl. VAT | Hetzner Cloud, Regular Performance (opens in a new tab)Verified on |
Frequently asked questions
What is the best Heroku alternative?
If you want Heroku's model (a service per process, a managed database, git-push deploys) with lower prices for small apps, Render and DigitalOcean App Platform are the closest. If you want to pay only for what runs, Railway and Fly.io bill by usage. If you want one flat price for everything and accept looking after a server, run the app on a VPS, by hand or with a tool.
Can I keep my Heroku Postgres data when I switch?
Yes. Heroku's backups are standard pg_dump files: capture one with heroku pg:backups:capture, download it, and restore it with pg_restore into any PostgreSQL of the same or a newer major version, on a platform or on your own server.
Sources
- Heroku pricing (opens in a new tab)
- An Update on Heroku (opens in a new tab)
- Heroku Scheduler (opens in a new tab)
- Heroku-22, Heroku-24 and Heroku-26 stacks updated (opens in a new tab)
- Heroku regions (opens in a new tab)
- Render pricing (opens in a new tab)
- Deploy for free (opens in a new tab)
- Render regions (opens in a new tab)
- Railway pricing (opens in a new tab)
- Railway plans (opens in a new tab)
- Railway cron jobs (opens in a new tab)
- Railway backups (opens in a new tab)
- Railway deployment regions (opens in a new tab)
- Fly.io resource pricing (opens in a new tab)
- Fly.io free trial (opens in a new tab)
- Fly.io free waiver (opens in a new tab)
- Task scheduling guide (opens in a new tab)
- Fly.io regions (opens in a new tab)
- App Platform pricing (opens in a new tab)
- Managed Databases pricing (opens in a new tab)
- App Platform availability (opens in a new tab)
- Hetzner Cloud, Regular Performance plans (opens in a new tab)
Related articles
- Deploying
How to deploy a web app to a VPS: the complete guide
From an empty server to a production app: server size, Docker, a reverse proxy with HTTPS, DNS, CI/CD, secrets, backups, zero-downtime updates, previews, logs and hardening.
- Security
Backups for a small production server that you can restore
What to back up on a single-server app, how to send an encrypted copy off the server with pg_dump and restic, what the provider's backups add, and the restore drill that proves it works. Every command tested.
- Hosting
Self-hosted Supabase vs Supabase Cloud
What the official self-hosting setup includes, what it leaves to you (backups, upgrades, HTTPS, auth emails, storage, the dashboard), what Supabase Cloud's plans cost, and how to choose between them.