Next.js on Easel
Deploy App Router and Pages Router applications to Easel with support for server rendering, streaming, Server Actions, route handlers, proxy (middleware), image optimization, and framework-native caching.
Easel deploys standard Next.js applications with no adapter. Static output goes to the CDN, dynamic routes run in Functions, and the Next.js route and data caches use shared storage, so revalidation reaches every instance. For how the platform fits together, see How Easel works.
At a glance
| Support level | Production-ready |
| Routers | App Router and Pages Router |
| Rendering | Static, SSR, streaming, ISR, and Partial Prerendering |
| Server runtime | Node.js |
| Adapter required | No |
| Automatic detection | Yes |
| Most recently tested with | Next.js 16.3.x |
Deploy a Next.js application
Easel detects Next.js projects automatically. In most cases, you can deploy an existing application without changing its framework configuration.
Create a project and connect the Git repository, or deploy with the CLI:
Easel installs dependencies with the detected package manager, runs
next build, and provisions what the build output needs. You can override the
install command, build command, root directory, and Node.js version in
build configuration.
What Easel deploys
| Next.js output | Easel resource |
|---|---|
| Static pages | CDN assets |
| JavaScript, CSS, fonts, and other static files | CDN assets |
| Server Components and SSR routes | Easel Functions |
| Route Handlers and API Routes | Easel Functions |
| Server Actions | Easel Functions |
| Proxy (middleware) | Easel Function (US East) |
| ISR and cached route output | ISR cache and CDN |
next/image requests | Image optimization service |
| OpenTelemetry instrumentation | Easel observability pipeline |
Supported features
| Feature | Support | Notes |
|---|---|---|
| App Router | Supported | Includes layouts, Server Components, loading states, and error boundaries |
| Pages Router | Supported | Includes pages, API Routes, and data-fetching methods |
| Static Site Generation | Supported | Generated pages are deployed to the CDN |
| Server-Side Rendering | Supported | Dynamic routes run in Easel Functions |
| React Server Components | Supported | Supported through the App Router |
| Streaming | Supported | Dynamic responses stream without waiting for the complete render |
| Server Actions | Supported | Run in the application's server function |
| Route Handlers | Supported | Includes standard and streaming responses |
| API Routes | Supported | Pages Router API Routes run in Functions |
| Incremental Static Regeneration | Supported | Includes time-based and on-demand revalidation |
| Cache Components | Supported | 'use cache: remote' is backed by Easel's regional Runtime Cache |
| Partial Prerendering | Supported | Static shells and dynamic regions are deployed together |
revalidatePath | Supported | Invalidates matching route-cache entries |
revalidateTag | Supported | Invalidates data by cache tag |
updateTag | Supported | Expires tagged data for read-your-own-writes behavior |
after() | Supported | Work can continue after the response, within the function's duration |
| Proxy (middleware) | Supported | Runs before the application route |
| Node.js runtime | Supported | Used for server-rendered routes and server code |
| Edge runtime APIs | Supported | API compatibility doesn't mean execution at every CDN location |
next/image | Supported | Requests use Easel's image optimization service |
| Redirects, rewrites, and headers | Supported | Includes rules defined in next.config |
| Internationalized routing | Supported | Includes domain and subpath routing |
| Draft Mode | Supported | Preview cookies are forwarded to the application runtime |
| OpenTelemetry | Supported | Framework telemetry can be exported through Easel |
| Turbopack builds | Supported | Used when enabled by the selected Next.js version |
| Static export | Supported | Deploys the exported application as a static site |
| WebSockets | Not supported | Function requests use HTTP request-response semantics |
Rendering
Routes generated during next build deploy as immutable CDN assets. That
includes statically rendered App Router routes, Pages Router routes using
getStaticProps, and dynamic routes generated with generateStaticParams.
Requests for them don't invoke a Function unless Next.js needs runtime
revalidation.
Routes that read request-time data run in Easel Functions. That includes routes
that call cookies() or headers(), Pages Router routes using
getServerSideProps, dynamic Route Handlers, API Routes, and uncached data
access. Server Components and streaming responses are forwarded chunk by chunk
as they render.
Partial Prerendering
Easel deploys the static shell to its cache and keeps the postponed rendering state Next.js needs. On a request, Easel can start returning the shell while the Function resumes and streams the dynamic regions. The shell and its rendering state update together when the route revalidates.
Caching and revalidation
Easel backs the Full Route Cache and Data Cache with shared storage, so cached
data isn't tied to one Function instance's filesystem. With Cache Components,
'use cache' uses Next.js's in-memory cache in each Function instance, and
'use cache: remote' stores entries in Runtime Cache,
shared across instances in a region. Time-based, path-based, and tag-based
revalidation work through the standard Next.js APIs from any instance. See
revalidation.
Attach tags to cached data:
Invalidate it from a Server Action or Route Handler:
Easel coordinates the invalidation across active CDN and Function instances.
Work after the response
after() runs work once the response is sent:
Easel keeps the invocation alive while registered work runs, and that time counts toward the route's duration. See background work for when to use a durable job system instead.
Proxy
Easel runs Next.js proxy, the file convention formerly called middleware,
before the matching application route. Use proxy.ts and export a proxy
function. A middleware.ts file still works, but Next.js 16 deprecates it.
Proxy runs as a Function in US East (iad), so every request it matches makes
a round trip there. Keep the matcher narrow.
Proxy can rewrite, redirect, check authentication, and change headers. See routing for where it sits in the request order.
Image optimization
next/image works without extra configuration. Easel's
image optimization service handles the
transformation requests and caches the results on the CDN. Allow remote sources
in next.config.ts:
Environment variables
Variables without the NEXT_PUBLIC_ prefix are available only during the build
and in server code. Variables with NEXT_PUBLIC_ are embedded in browser
bundles at build time, so changing one requires a new deployment. See
environment variables for scopes and
how changes apply.
OpenTelemetry
Next.js loads instrumentation.ts from the project root or src directory:
Use standard OpenTelemetry SDKs in the Node.js module. See tracing for how Easel adds application spans to request traces.
Project configuration
| Setting | Default |
|---|---|
| Install command | Detected from the package manager |
| Build command | Package script or next build |
| Output directory | Detected from the Next.js build |
| Development command | Package script or next dev |
| Node.js version | Project or platform default |
In a monorepo, set the root directory to the folder containing the Next.js
application's package.json. See monorepos.
Don't set output: "export" unless the application is intentionally static.
Easel deploys the standard Next.js server output and its dynamic routes.
Set a route's maximum duration with route segment config:
Easel reads maxDuration from the build output. See
function limits for the default and maximum.
Keep using next dev locally, and use a
preview deployment to check production behavior.
Known limitations
- WebSockets. Functions can't hold long-lived WebSocket connections. See Functions runtime.
- Experimental features. Next.js experimental APIs can change their deployment contract, and Easel may need an update before every behavior works. The table above reflects the most recently tested stable release.
Troubleshooting
The project deploys as a static site
Check that next.config doesn't set output: "export", and that the build
command runs next build.
A public environment variable has the old value
NEXT_PUBLIC_ variables are embedded in the browser bundle during the build.
Redeploy after changing one.
A remote image is rejected
Add the image host to images.remotePatterns in next.config.
Compatibility policy
Easel tests this guide against the version in At a glance. Test new Next.js releases and experimental features in a preview deployment first. See the compatibility policy.