Skip to content
inetGeek

Next.js on Railway

Railway publishes its own guide for deploying Next.js.

Compare Railway with

React framework with file-based routing, server components and a build step that produces both static and server-rendered output.

01.

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 Railway publishes about each. Railway documents 4 of the 6.

Max request duration

15 minutes while data keeps transferring; closed after 5 minutes with no data transferred. Websocket connections are exempt and can stay open indefinitely.

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.

Sources (1) →
  • Specs & Limits — Railway Docs ↗

    “HTTP requests can run for up to 15 minutes if data keeps transferring (for example, keep-alive heartbeats), and are otherwise closed after 5 minutes with no data transferred. [...] Websocket connections are exempt from these duration and inactivity limits, and can stay open indefinitely, even while idle.”

    Read 2026-09-05 · official docs

Streaming response limit

Platform-wide: an HTTP request may run up to 15 minutes while data keeps transferring, and is closed after 5 minutes with none. Idle HTTP/1.1 connections close after 60 seconds between requests. WebSocket connections are exempt. Railway documents the connection's duration here, not how the response is delivered.

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) →
  • Specs & Limits ↗

    “HTTP requests can run for up to 15 minutes if data keeps transferring (for example, keep-alive heartbeats), and are otherwise closed after 5 minutes with no data transferred. [...] Websocket connections are exempt from these duration and inactivity limits, and can stay open indefinitely, even while idle.”

    Read 2026-09-05 · official docs

Edge network

Supported

Middleware runs on every matched request before the cache is consulted. Where it executes decides how much latency it adds.

Sources (1) →
  • Edge Networking — Railway Docs ↗

    “Railway uses a globally distributed edge network to route traffic to your deployments. [...] Edge POPs are the entry points where user traffic first reaches Railway. Each request is terminated at the nearest POP and tagged with that POP's ID in the X-Railway-Edge header.”

    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

Supported

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) →

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.

The requirement and the reason it matters are ours. Every value beside them was read from Railway's own pages — expand a source to see the sentence it came from.

02.

What Railway documents.

Railway publishes its own guide for deploying Next.js.

This guide covers how to deploy a Next.js app to Railway and connect it to a Postgres database.

Sources (1) →

Next.js features on Railway

Capabilities Railway documents specifically for Next.js, with the constraint it documents alongside each.

Image optimization

Supported

Next.js Optimization: Built-in support for all Next.js features including ISR, SSR, and API routes [...] Confirm image optimization is working

ISR / revalidation

Limited

On Railway: deploy as a Node service (same as SSR). The server must stay running to handle revalidation requests. [...] Cache is lost on every deploy. Railway replaces the container on each deployment. All cached pages are regenerated from scratch. [...] Cache is not shared across replicas. If you scale to multiple instances, each instance maintains its own cache.

Streaming SSR

Supported

On Railway: deploy the same way as SSR. Railway does not buffer streaming responses, so chunks reach the browser as they are sent. Ensure your application does not add buffering middleware on the SSE or streaming routes.

Sources (2) →
  • Migrate from Vercel to Railway | Railway Docs ↗

    “Next.js Optimization: Built-in support for all Next.js features including ISR, SSR, and API routes [...] Confirm image optimization is working”

    Read 2026-09-13 · official docs

  • Choose Between SSR, SSG, and ISR for Your Frontend | Railway Guides ↗

    “On Railway: deploy as a Node service (same as SSR). The server must stay running to handle revalidation requests. [...] Cache is lost on every deploy. Railway replaces the container on each deployment. All cached pages are regenerated from scratch. [...] Cache is not shared across replicas. If you scale to multiple instances, each instance maintains its own cache.”

    Read 2026-09-13 · official docs

03.

What it costs to run there.

Entry paid plan
$5 / month (Hobby)
Pricing model
A base subscription fee that goes towards usage, with the plan's own credit included; anything beyond the credit is billed as resource usage.
When you exceed a cap
Billed automatically: on the Hobby plan ($5/month, includes $5 of resource usage) usage above the included amount is charged as a delta on top of the subscription — no throttling or suspension is documented
Regions
4 regions: California, Virginia, Amsterdam, Singapore
Sources (3) →
  • Plans — Railway Docs ↗

    “Plan Price Free $0 / month Hobby $5 / month Pro $20 / month Enterprise Custom”

    Read 2026-09-13 · official pricing

  • Pricing Plans | Railway Docs ↗

    “If your total resource usage exceeds $5 in any given billing period, you will be charged the delta”

    Read 2026-09-05 · official docs

  • Regions — Railway Docs ↗

    “Name Location Region Identifier US West Metal California, USA us-west2 US East Metal Virginia, USA us-east4-eqdc4a EU West Metal Amsterdam, Netherlands europe-west4-drams3a Southeast Asia Metal Singapore asia-southeast1-eqsg3a”

    Read 2026-09-13 · official docs

04.

Whether it suits you.

Teams that want a plan fee which doubles as usage credit, and deploy services straight from a Dockerfile without managing servers. The $5 Hobby fee comes back as $5 of resource usage.

Consider something else if…

You need to run in a region outside California, Virginia, Amsterdam or Singapore.

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.

Visit Railway documentation

When these numbers change, hear about it. Sources are re-checked monthly; a repricing goes out as a short note.

Confirm by email; unsubscribe from any issue. Your address goes to Kit and nowhere else — what we do with it.

Every page here is sourced and dated.