Skip to content
This page is also available as Markdown at /docs/app/api-reference/file-conventions/route-segment-config/runtime.md. For an index of Next.js documentation, see /docs/llms.txt.

runtime

Last updated March 13, 2026

The runtime option allows you to select the JavaScript runtime used for rendering your route.

layout.tsx | page.tsx | route.ts
export const runtime = 'nodejs'
// 'nodejs' | 'edge'
  • 'nodejs' (default)
  • 'edge'

Good to know:

  • Using runtime: 'edge' is not supported for Cache Components.
  • This option cannot be used in Proxy.

Was this helpful?

supported.