Docs Hub

🇮🇷
iran mirrors
LaravelLaravelLivewireLivewireAlpine.jsAlpine.jsNext.jsNext.jsVue.jsVue.jsZustandZustandNuxt.jsNuxt.jsFilamentFilament
BootstrapBootstrap
Nest.jsNest.js
ReactReact
Vite.jsVite.js
Tailwind CSSTailwind CSS

© 2026 Juza66 and Arash Fadaee

Docs Hub

🇮🇷 iran mirrors
InstallationProject StructureLayouts And PagesLinking And NavigatingServer And Client ComponentsFetching DataMutating DataCachingRevalidatingError HandlingCssImagesFontsMetadata And Og ImagesRoute HandlersProxyDeployingUpgradingOverview
GlossaryOverview
Overview
Docs Hub

Next.js can be deployed as a Node.js server, Docker container, static export, or adapted to run on different platforms.

Deployment OptionFeature Support
Node.js serverAll
Docker containerAll
Static exportLimited
AdaptersPlatform-specific

Node.js server

Next.js can be deployed to any provider that supports Node.js. Ensure your package.json has the "build" and "start" scripts:

json
filename="package.json"
{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  }
}

Then, run npm run build to build your application and npm run start to start the Node.js server. This server supports all Next.js features. If needed, you can also eject to a custom server.

Node.js deployments support all Next.js features. Learn how to configure them for your infrastructure.

Templates

  • Flightcontrol
  • Railway
  • Replit
  • Hostinger

Docker

Next.js can be deployed to any provider that supports Docker containers. This includes container orchestrators like Kubernetes or a cloud provider that runs Docker. For containerization best practices, see the Docker guide for React.js.

Docker deployments support all Next.js features. Learn how to configure them for your infrastructure.

Note for development: While Docker is excellent for production deployments, consider using local development (npm run dev) instead of Docker during development on Mac and Windows for better performance. Learn more about optimizing local development.

Templates

The following examples demonstrate best practices for containerizing Next.js applications:

  • Docker Standalone Output - Deploy a Next.js application using output: "standalone" to generate a minimal, production-ready Docker image with only the required runtime files and dependencies.
  • Docker Export Output - Deploy a fully static Next.js application using output: "export" to generate optimized HTML files that can be served from a lightweight container or any static hosting environment.
  • Docker Multi-Environment - Manage separate Docker configurations for development, staging, and production environments with different environment variables.

Additionally, hosting providers offer guidance on deploying Next.js:

  • DigitalOcean
  • Fly.io
  • Google Cloud Run
  • Render
  • SST

Static export

Next.js enables starting as a static site or Single-Page Application (SPA), then later optionally upgrading to use features that require a server.

Since Next.js supports static exports, it can be deployed and hosted on any web server that can serve HTML/CSS/JS static assets. This includes tools like AWS S3, Nginx, or Apache.

Running as a static export does not support Next.js features that require a server. Learn more.

Templates

  • GitHub Pages

Adapters

Next.js can be adapted to run on different platforms to support their infrastructure capabilities.

Refer to each provider's documentation for information on supported Next.js features:

  • Appwrite Sites
  • AWS Amplify Hosting
  • Cloudflare
  • Deno Deploy
  • Firebase App Hosting
  • Netlify
  • Vercel
Note: We are working on a Deployment Adapters API for all platforms to adopt. After completion, we will add documentation on how to write your own adapters.