You built a Node.js app that needs a database: an Express API with Postgres behind it, a Next.js app with user accounts, a bot that remembers things. Most hosting pages price the app and the database separately, so the "$5/mo" you saw first turns into $12 or $13 once the database is added.
Short answer: for an always-on Node.js app plus PostgreSQL, the cheapest single bill we found is InstaPods Build at $7/mo flat: 2 vCPU, 2 GB RAM and 25 GB disk, with the app and Postgres on the same pod, no bandwidth fees, and nothing extra for the database. Fly.io is next at $7.69/mo (a $3.69 machine with 512 MB plus the $4 Developer Postgres), billed by usage. Heroku and DigitalOcean App Platform are both $12/mo, and Render is $13/mo. Railway bills by usage, so it has no fixed number.
Disclosure: we build InstaPods. Every competitor price here was checked on the vendor's own page on 25 November 2026, and each section links its sources.
Node.js hosting with a database: monthly cost compared
Ranked by the monthly price of the cheapest always-on setup that gives the app at least 512 MB of RAM and adds a PostgreSQL database, from the same vendor.
| Host | App | Database | Total ($/mo) | Billing |
|---|---|---|---|---|
| InstaPods | Build pod: 2 vCPU, 2 GB RAM, 25 GB disk | Postgres on the same pod, $0 extra | $7 | Flat, no bandwidth fees |
| Fly.io | shared-cpu-1x, 512 MB: $3.69 | Managed Postgres Developer, 256 MB: $4 | $7.69 | Usage, per second |
| Heroku | Basic dyno, 0.5 GB: $7 | Essential-0 Postgres, 1 GB storage: $5 | $12 | Prorated, capped monthly |
| DigitalOcean App Platform | 1 vCPU, 512 MiB: $5 | Development Database, 512 MB: $7 | $12 | Hourly, monthly invoice |
| Render | 0.5c-512mb web service: $7 | Postgres 0.1c-256mb: $6 | $13 | Monthly, storage and bandwidth extra |
Not in the table because it has no fixed price: Railway, where Hobby is $5/mo including $5 of usage and every service, Postgres included, draws from usage on top. Fly.io's 256 MB machine would bring Fly to $6.19/mo, below InstaPods, which is why the ranking fixes the app at 512 MB; see the Fly.io section.
InstaPods: app and Postgres on one $7 pod
InstaPods puts your Node.js app and its database on the same real Linux server (a pod), so there is one price and no network hop between them. The Build plan is $7/mo for 2 vCPU, 2 GB RAM and 25 GB disk, and it is the first plan that can add PostgreSQL, MySQL or Redis. The $3/mo Launch plan (1 vCPU, 512 MB, 10 GB) runs the app alone. Every plan runs 24/7, there are no bandwidth or egress fees, and daily backups include the database (Build keeps 5).
The Node.js preset ships Node 22 LTS by default (Node 24 is available), nginx in front with HTTPS, and a systemd service that runs your app's start script from package.json on port 3000:
instapods deploy my-api --preset nodejs --plan build instapods services add my-api -s postgresql -w instapods services creds my-api -s postgresql instapods env set my-api DATABASE_URL=postgresql://instapod:<password>@localhost:5432/instapod env set writes the variable and restarts the app, so new pg.Pool({ connectionString: process.env.DATABASE_URL }) connects on the next request. The full deploy walkthrough is in how to deploy a Node.js app, and the Express specifics are on the Express deploy page.
The trade-offs are real: two regions (Europe and North America), no autoscaling, and the database shares the pod's 2 GB of RAM and 25 GB of disk with the app rather than running on its own managed cluster. There is no free tier; adding a card gives a one-time $10 credit.
Fly.io: $7.69 with 512 MB, if you keep it awake
Fly.io is the closest on price. Its pricing docs list a shared-cpu-1x machine at $2.19/mo with 256 MB and $3.69/mo with 512 MB in its cheapest regions (iad, ewr), billed per second while it runs. Fly Managed Postgres starts with the Developer plan at $4/mo: Shared-1x, 256 MB, storage included up to a 5 GB cap, no connection pooling and no support. The next plan, Basic, is $38/mo for 1 GB with pooling and support.
Two details change the bill. First, Fly's Free plan gives $5 of usage a month once you add a card, but if usage passes $5 "the whole month's usage is billed at standard rates from the first cent", and an app plus Postgres at $6.19 or $7.69 is over that line. Second, Fly enables auto-stop by default when you launch an app (autostop docs), so an idle app stops and the next request waits for a cold start; set min_machines_running = 1 or auto_stop_machines = "off" to keep it up. Bandwidth out is $0.02/GB in North America and Europe.
Fly.io wins if you want apps in many regions close to users, or a dedicated database cluster you can grow to 1 TB later. We compare the two in InstaPods vs Fly.io.
Heroku: $12 for Basic plus Essential-0
Heroku is the most familiar path for a Node app with Postgres, and adding Postgres is one add-on. The Basic dyno is $7/mo for 0.5 GB of RAM and runs always on; the $5 Eco dyno sleeps after 30 minutes of inactivity. The cheapest database, Heroku Postgres Essential-0, is $5/mo for 1 GB of storage and 20 connections, with a 4,000-table limit. Essential-1 is $9/mo for 10 GB.
That makes $12/mo for an always-on app and a small database. Heroku is a good fit if your team already runs on it, or if you rely on its add-on marketplace for logging, email and queues. If you are leaving it, Heroku alternatives covers the options.
DigitalOcean App Platform: $5 app plus a $7 development database
DigitalOcean App Platform is the managed option from DigitalOcean, and its cheapest service is $5/mo for 1 shared vCPU and 512 MiB, with 50 GiB of outbound transfer included (App Platform pricing). The cheapest database you can attach is the Development Database at $7/mo for 512 MB, billed hourly (App Platform pricing docs). It is a lighter product than DigitalOcean's Managed Databases, sized for getting started.
A Managed PostgreSQL cluster starts at $15.15/mo for 1 vCPU and 1 GiB on the managed databases page, which would put the stack at about $20. The other DigitalOcean route is a $4/mo Droplet (1 vCPU, 512 MiB, 10 GiB SSD) where you install Node, Postgres, nginx and TLS yourself. That is cheaper on paper and is a good way to learn server admin, but it is also an evening of setup plus OS updates after that.
Render: $13, and the free database expires
Render prices the app and the database as separate instances. The cheapest paid web service is 0.5c-512mb at $7/mo and the cheapest paid Postgres is 0.1c-256mb at $6/mo, with database storage priced separately at $0.30/GB a month (render.com/pricing). The Hobby workspace includes 5 GB of bandwidth a month, then charges $0.15/GB.
The free tier does not hold up for an app with data. Render's free tier docs say a free web service spins down after 15 minutes without inbound traffic, and free Postgres databases expire 30 days after creation, with a 14-day grace period to upgrade before deletion. Render is the stronger pick if you want managed Postgres with point-in-time recovery (3 days of history on the Hobby workspace, 7 on Pro) and, on Pro and above, per-service autoscaling. More on that in InstaPods vs Render and Render alternatives without cold starts.
Railway: usage-billed, so the total depends on the month
Railway is the easiest of the usage-billed hosts to start on: a Postgres template and a Node service side by side in one project. The Hobby plan is $5/mo and includes $5 of usage, then bills about $20 per vCPU-month, $10 per GB of RAM per month, $0.15 per GB of volume storage per month and $0.05/GB of egress. Free-plan services sleep after 5 to 10 minutes without outbound traffic; Hobby runs always on.
There is no fixed price for an app plus Postgres. Two services that each hold 256 MB of RAM all month use about $5 on RAM alone, before any CPU, storage or egress, so a small stack usually lands above the $5 included usage. If your app is busy for an hour a day and quiet otherwise, usage billing can come out cheaper; if it holds memory around the clock, a flat plan is easier to predict. See InstaPods vs Railway.
A free database elsewhere: Neon and Supabase
A free hosted database is the other way to keep the bill under $7, if your app can live with its limits. Neon's free plan gives 1 GB of storage per project and 100 CU-hours of compute per project a month, and the database suspends after 5 minutes idle with no way to turn that off, so the first query after a quiet spell waits for it to wake. Supabase's free plan gives a 500 MB database, and free projects are paused after 1 week of inactivity; Pro starts at $25/mo.
Paired with a $3/mo InstaPods Launch pod or a $3.69 Fly machine, that is a working app plus Postgres for $3 to $4 a month. It suits a side project with light traffic. For anything with real users, the wake-up delay and the size caps are usually the first thing you outgrow.
How to pick
Pick by what the database has to survive, not only by the sticker price:
- One app plus Postgres on one predictable bill: InstaPods Build, $7 flat, with the database in the daily backups.
- The lowest number and you are fine tuning
fly.toml: Fly.io at $6.19 (256 MB) or $7.69 (512 MB), usage-billed. - Your team already runs on Heroku add-ons: Heroku Basic plus Essential-0, $12.
- You want a managed database with point-in-time recovery: Render, from $13, or a DigitalOcean Managed PostgreSQL cluster from $15.15 for the database alone.
- A hobby project with almost no traffic: a $3 app pod plus Neon or Supabase free.
If an AI agent wrote the app, InstaPods also has an MCP server, so Claude or Cursor can deploy it and add the database for you. Running Python instead of Node? The same comparison for Flask and FastAPI is in Python hosting.
FAQ
What is the cheapest way to host a Node.js app with a database?
For an always-on app with at least 512 MB of RAM plus a PostgreSQL database, InstaPods Build at $7/mo flat is the cheapest single bill we found: 2 vCPU, 2 GB RAM and 25 GB disk, with the app and Postgres on the same pod and no bandwidth fees. Fly.io comes next at $7.69/mo (a $3.69 512 MB machine plus the $4 Developer Managed Postgres), billed by usage. Heroku (Basic $7 plus Essential-0 Postgres $5) and DigitalOcean App Platform ($5 plus a $7 development database) are both $12/mo, and Render ($7 plus $6 Postgres) is $13/mo.
Is there anything cheaper than $7 a month for Node.js plus Postgres?
Yes, with trade-offs. Fly.io's 256 MB machine ($2.19 in iad/ewr) plus its $4 Developer Postgres is $6.19/mo, but 256 MB is tight for most Node apps and Fly's Developer database has a 5 GB storage cap and no support. You can also run the app on a $3/mo InstaPods Launch pod and point it at a free Neon or Supabase database, as long as you accept Neon's scale-to-zero after 5 minutes or Supabase pausing free projects after a week of inactivity.
Does Render's free Postgres work for a real app?
Not for long. Render's docs say free Postgres databases expire 30 days after creation, with a 14-day grace period to upgrade. The cheapest paid Render Postgres is $6/mo for 256 MB of RAM, on top of $7/mo for the web service.
How much does Railway cost for a Node.js app with Postgres?
Railway's Hobby plan is $5/mo and includes $5 of usage, then bills CPU at about $20 per vCPU-month, RAM at about $10 per GB-month and volume storage at about $0.15 per GB-month. There is no fixed price for an app plus Postgres: two services each holding 256 MB of RAM all month use about $5 on RAM alone, before any CPU or storage.
Can I run Postgres on the same server as my Node.js app?
On InstaPods, yes: from the $7 Build plan you can add PostgreSQL, MySQL or Redis to the same pod with one command, and the database is included in daily backups. On Render, Fly.io, Heroku and DigitalOcean App Platform the database is a separate product with its own monthly price.
Originally published on instapods.com. Prices checked 25 November 2026.
What does your small Node app plus its database actually cost you each month right now, and is that one bill or three? Curious how people are running this.


