Deploying Next.js (App & Pages Router)
Complete guide for deploying Next.js 14 and 15 applications with standalone output, Server Components, and edge caching.
Step-by-Step Overview
Next.js on AcadSites
AcadSites provides native execution for Next.js applications, supporting Server-Side Rendering (SSR), Server Components (RSC), API Route handlers, and client components. Static assets are served directly from our global CDN, while dynamic routes execute in high-performance sandboxed micro-containers.
Configuring next.config.js for Standalone Mode
To minimize container memory footprint and accelerate deployment speeds, enable standalone output in your configuration file. Next.js will automatically trace your dependencies and generate an isolated, lightweight production server.
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
};
module.exports = nextConfig;Server Components & API Route Handlers
App Router route handlers (app/api/.../route.ts) and server actions execute natively within your project micro-container. External outbound API calls to payment processors, databases, or AI APIs (such as OpenAI or Anthropic) are fully supported with strict network encryption.
Next.js Static Export Alternative
If your application does not require dynamic server logic or API routes, you can deploy it as a purely static site by setting output: "export". Static Next.js sites are served entirely from our global CDN with zero container spin-up time.
Frequently Asked Questions
Does AcadSites support Next.js 15?+
Yes! AcadSites fully supports Next.js 14 and Next.js 15, including asynchronous request headers and React 19 Server Components.
What port should my Next.js container listen on?+
AcadSites automatically injects the PORT environment variable (default 3000 or 8080) into your container and routes traffic seamlessly.
Deploy your Next.js application in 60 seconds
Zero-overage hosting with automated SSL and edge caching for Next.js 14 and 15.