Next.js on Fly.io
Fly.io publishes its own guide for deploying Next.js.
React framework with file-based routing, server components and a build step that produces both static and server-rendered output.
What Next.js needs.
Every host claims to run Next.js, so the claim on its own decides nothing. These are the things Next.js actually requires from the platform underneath it, and what Fly.io publishes about each. Fly.io documents 3 of the 6.
Max request duration
Not documented
Server components and route handlers run per request. The wall-clock ceiling decides whether a slow upstream API or a model response can finish at all.
Streaming response limit
No duration or size ceiling documented. Streaming works, but Fly Proxy buffers responses before compressing them, so progressive server-side rendering needs Content-Encoding: none set on those responses.
The App Router streams the dynamic parts of a page as they resolve. A host that buffers the whole response first removes the benefit.
Sources (1) →Sources ↓
- Content Encoding — Fly Docs ↗
“The proxy buffers responses before compressing them. That can break HTML streaming—e.g., progressive server-side rendering. To avoid buffering, disable compression by setting Content-Encoding: none for those responses”
Read 2026-09-05 · official docs
Edge network
Limited
Middleware runs on every matched request before the cache is consulted. Where it executes decides how much latency it adds.
Sources (1) →Sources ↓
- The Fly.io Architecture — Fly Docs ↗
“We broadcast and accept traffic from ranges of IP addresses (both IPv4 and IPv6) in all our datacenters. When we receive a connection on one of those IPs, we match it back to an active customer application, and then proxy the TCP connection to the closest available microVM.”
Read 2026-09-05 · official docs
Build allowance
Not documented
A large Next.js app prerenders at build time, so the build allowance is a recurring cost rather than a one-off.
Git deployment
Limited
The Next.js workflow assumes a push builds and ships. A host without git-triggered deploys means wiring CI yourself before the first deploy, which is most of the setup cost.
Sources (1) →Sources ↓
- Continuous deployment with GitHub Actions — Fly Docs ↗
“push to the repository's master branch. If your repository uses a default branch other than master, such as main, then you should change that here. [...] jobs: deploy: name: Deploy app runs-on: ubuntu”
Read 2026-09-07 · official docs
Concurrent builds
Not documented
Next.js builds are slow enough that queueing is felt. One build at a time is workable alone and becomes the bottleneck the moment two people merge in the same hour.
What Fly.io documents.
Fly.io publishes its own guide for deploying Next.js.
You can deploy your Next.js app on Fly with minimal effort, our CLI will do the heavy lifting.
Sources (1) →Sources ↓
- Run a Next.js App · Fly Docs ↗
“You can deploy your Next.js app on Fly with minimal effort, our CLI will do the heavy lifting.”
Read 2026-09-05 · official docs
Next.js features on Fly.io
Capabilities Fly.io documents specifically for Next.js, with the constraint it documents alongside each.
Image optimization
Supported
Fetch failure when optimizing images [...] Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization. [...] Follow the instructions in the message, and then redeploy:
Sources (1) →Sources ↓
- Run a Next.js App · Fly Docs ↗
“Fetch failure when optimizing images [...] Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization. [...] Follow the instructions in the message, and then redeploy:”
Read 2026-09-13 · official docs
What it costs to run there.
- 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
Sources (2) →Sources ↓
- Pricing — Fly.io Docs ↗
“Plans get complicated, so we just charge based on usage. Pick and choose which pieces you need for your application; that's all you'll see on your invoice.”
Read 2026-09-14 · official docs
- Regions - Fly.io Documentation ↗
“You can host your apps in any of the following regions. Region ID Region Location Gateway MPG ams Amsterdam, Netherlands ✓ ✓ arn Stockholm, Sweden ✓ cdg Paris, France ✓ dfw Dallas, Texas (US) ✓ ✓ ewr Secaucus, NJ (US) ✓ fra Frankfurt, Germany ✓ ✓ gru Sao Paulo, Brazil ✓ iad Ashburn, Virginia (US) ✓ ✓ jnb Johannesburg, South Africa lax Los Angeles, California (US) ✓ ✓ lhr London, United Kingdom ✓ ✓ nrt Tokyo, Japan ✓ ✓ ord Chicago, Illinois (US) ✓ ✓ sin Singapore, Singapore ✓ ✓ sjc San Jose, California (US) ✓ ✓ syd Sydney, Australia ✓ ✓ yyz Toronto, Canada ✓ ✓”
Read 2026-09-27 · official docs
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.
Visit Fly.io documentation