# Node.js on Fly.io

Canonical: https://inetgeek.com/stacks/nodejs-on-fly-io/

Fly.io publishes its own guide for deploying Node.js.

JavaScript runtime used to run servers and build tooling outside the browser.

## What Node.js needs

Every host claims to run Node.js, so the claim on its own decides nothing. These are the things Node.js requires from the platform underneath it, and what Fly.io publishes about each. Fly.io documents 3 of the 4.

| Requirement | Fly.io | Why it matters |
| --- | --- | --- |
| Persistent processes | Supported — A stopped or suspended Machine still bills for its root filesystem at $0.15 per GB per month. | A long-running process is the point: WebSocket connections, in-memory caches and job queues all die with it. A host that only runs functions cannot keep one alive. |
| Max request duration | Not documented | Anything the process does inside a request — a large upload, a slow query, a streamed response — is bounded by this ceiling. |
| Docker deployment | Supported | Node apps routinely need a system binary the platform's buildpack does not ship. A Dockerfile is the escape hatch when they do. |
| Scales to zero | Supported | An always-on process bills while idle. Scaling to zero removes that cost and adds a cold start to the next request instead. |

- Persistent processes source: https://docs.fly.io/about/billing/
- Docker deployment source: https://docs.fly.io/launch/deploy
- Scales to zero source: https://fly.io/docs/launch/autostop-autostart/

## What Fly.io documents

> The Basics covers everything you need to set up, run, and manage production Node.js apps on Fly.

Source: https://fly.io/docs/js/

### Node.js features on Fly.io

- **background_workers**: Supported — Instead, you should offload that work to a background worker. [...] BullMQ is a Redis-backed queue system for Node.js apps. ([source](https://fly.io/docs/blueprints/work-queues/))
- **ssh_shell_access**: Supported — Use SSH to log into or run commands on Machines [...] Connect to a running instance of the current app. ([source](https://fly.io/docs/flyctl/ssh/))

## What it costs to run there

|  | Fly.io |
| --- | --- |
| Pricing model | Usage-based, no compute plan tiers; billing is pro-rated for the time resources are provisioned. |
| When you exceed a cap | No plan cap to exceed — Fly bills per second for provisioned resources. The only documented enforcement is unspecified automated scaling limits, which surface as an error message (platform-wide, all plans) |
| Regions | 17 regions |

- Pricing model source: https://fly.io/docs/about/pricing/
- When you exceed a cap source: https://fly.io/docs/about/pricing/
- Regions source: https://docs.fly.io/reference/regions/

## Whether it suits you

Workloads that ship as Docker images and need placement in particular regions. Billing is purely usage-based with no plan tiers, which suits spiky or region-pinned traffic better than a flat monthly fee.

Consider something else if: You want a predictable flat bill rather than charges that track the resources provisioned for each app.

Written by Palash Bagchi on 2026-09-05. This is a recommendation, not a sourced fact — it carries no citation because it is an opinion.

## Related

- Best hosting for Node.js: https://inetgeek.com/stacks/nodejs/
- Fly.io: https://inetgeek.com/hosting/fly-io/
