Free Node.js Hosting That Doesn't Sleep (2026): What Actually Works
Why free Node.js hosts put your app to sleep, which ones still don't, whether keep-alive pings are worth it, and the cheapest way to stay always on in 2026.
- Published
- Reading time
- 5 min
On this page
Key takeaways
- Almost every free Node.js host sleeps idle apps: Render after 15 minutes, DockHosting after 1 hour; Heroku and Fly.io have no free tier.
- The only free always-on option is Northflank's sandbox, which isn't meant for production.
- Keep-alive pings are fragile; for an app people rely on, always-on hosting starts at $4/month.
Free Node.js hosting that never sleeps is almost gone in 2026. Most free tiers scale your app to zero after a quiet period and wake it on the next request. Render does it after 15 minutes, DockHosting after 1 hour, and Heroku and Fly.io no longer have free tiers for new users. The one free always-on option is Northflank's Developer Sandbox, which Northflank says isn't for production. Here's why hosts do this, what the workarounds really cost, and the cheapest way to stay awake.
Why free hosts put Node.js apps to sleep
An always-on app holds memory and CPU 24 hours a day, even when nobody's using it. Free tiers stay sustainable by scaling idle apps to zero. The container stops, and the next HTTP request starts it again. That restart is the cold start: the container boots, npm start runs, your app connects to its database, and only then does the request get its answer.
How long a cold start takes depends mostly on your app: large dependency trees, heavy imports and slow database connections all add time.
Which free Node.js hosts sleep (checked November 2026)
| Platform | Free Node.js hosting | Sleeps after | Notes |
|---|---|---|---|
| Render | Yes | 15 min without inbound traffic | 750 free instance hours per workspace per month |
| DockHosting | Yes | 1 hour without visits | Shows a "Waking up" page while starting; free database never expires |
| Northflank | Developer Sandbox | Never | "Should not be used for production" |
| Railway | $1 credit / month | Not stated | Usage-billed; small apps can use the credit up quickly |
| Heroku | No | Eco ($5) sleeps after 30 min | Basic ($7) is always on |
| Fly.io | 7-day trial only | n/a | Always-on VMs from $2.19/month |
Do keep-alive pings work?
Pinging your app every few minutes (with a cron service or uptime monitor) stops it from looking idle. The catch:
- It uses up free hours. On hosts with a monthly hour budget, an app that never sleeps uses all of it.
- It's one more thing that can break. When the pinger fails, your app sleeps again and nobody notices.
- It may go against the terms. Some providers don't allow working around their free-tier limits. Read the terms before you rely on it.
- It doesn't help background work. Timers, queue consumers and WebSockets still stop when the app sleeps between pings.
Pings are fine for a demo you want to feel snappy during a job interview. For anything people rely on, pay for always-on. It costs less than a coffee a month.
Make cold starts shorter
If you stay on a free tier, make waking up fast:
// server.js: listen first, warm up in the background
import express from "express";
const app = express();
app.get("/health", (_, res) => res.send("ok"));
// …routes
app.listen(process.env.PORT || 3000, () => {
console.log("listening");
// Open DB pools, load caches, etc. after the port is open,
// so the platform sees the app as up as soon as possible.
});- Keep dependencies lean. Every package is loaded on boot. Remove the ones you don't use.
- Build at build time. Compile TypeScript with
npm run build, and onlynode dist/server.jsat runtime. - Make the database connection lazy. Connect when the first query runs, and set a short connection timeout.
- Don't run migrations on every start unless you need to.
The cheapest always-on Node.js hosting
| Platform | Always-on from | Memory | Pricing model |
|---|---|---|---|
| DockHosting Hobby | $4/month | 1 GB shared by your apps | Flat, no bandwidth metering |
| Fly.io | ~$2.19–$3.69/month | 256–512 MB per VM | Usage |
| Railway Hobby | $5/month incl. $5 usage | Billed per GB | Usage |
| DigitalOcean App Platform | $5/month | 512 MiB | Fixed per container |
| Render Starter | $7/month | 512 MB | Per service |
| Heroku Basic | $7/month | 512 MB | Per dyno |
On DockHosting, Hobby keeps all your apps awake, adds your own domain and daily database backups, and runs Node.js 20 and 22 LTS with npm, pnpm or yarn picked from your lockfile.
Deploy a Node.js app that stays awake
curl -fsSL https://cli.dockhosting.dev/install.sh | sh # Windows: irm https://cli.dockhosting.dev/install.ps1 | iex
dock login
dock deployStart on Free (it sleeps after an hour without visits), then switch to Hobby when people depend on it. Plan changes are prorated. Full walkthrough: deploy a Node.js app in one command. Building a bot? Discord bots need always-on (guide), while Telegram webhook bots are fine on a sleeping free app.
Frequently asked questions
Why does my free Node.js app take so long to load the first time?
The host put it to sleep after a period without traffic. The first request has to start the container and your Node.js process again (a cold start) before it can answer. Later requests are fast until the app sleeps again.
Is there free Node.js hosting with no sleep at all?
Northflank's Developer Sandbox is free and always on, with no card required, but it's meant for experiments, not production. Most other free tiers sleep: Render after 15 minutes without traffic, DockHosting after 1 hour.
Should I ping my app every few minutes to keep it awake?
It can work, but it's fragile: it uses up any monthly free hours, adds a moving part that can fail, and may go against a provider's terms. If uptime matters, always-on hosting is cheap: $4/month on DockHosting Hobby.
- Node.js
- Free hosting
- Cold start
- Always on
- Express
Written by Doughmi ILYAS
Doughmi builds DockHosting, the developer-first platform behind dock deploy: the build system, the managed databases and the dashboard. On this blog: guides to shipping apps without running servers, written with the commands the platform actually ships.
