网页 综合 更新时间 2026-08-06 00:00:00

Deploying

自动蜘蛛 nextjs.org 正文约 2890 字
Deploying
Next.js can be deployed as a Node.js server, Docker container, static export, or adapted to run on different platforms.
Next.js can be deployed to any provider that supports Node.js. Ensure your package.json has the "build" and "start" scripts:
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.
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 best practices on containerizing your app, refer to Docker's official Next.js and React.js guides.
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.
The following examples demonstrate best practices for containerizing Next.js applications:
Additionally, hosting providers offer guidance on deploying Next.js:
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.
Next.js can be adapted to run on different platforms to support their infrastructure capabilities. The Deployment Adapter API lets platforms customize how Next.js applications are built and deployed.
Verified adapters are open source, run the full Next.js compatibility test suite, and are hosted under the Next.js GitHub organization. The Next.js team coordinates testing with these platforms before major releases. Publicly visible test results for each adapter are coming soon. Learn more about verified adapters.
Cloudflare and Netlify are working on verified adapters built on the Adapter API. In the meantime, they offer their own Next.js integrations (see below).
The following platforms offer their own Next.js integrations. These are not built on the public Adapter API and are not verified by the Next.js team, so feature support and compatibility may vary. Refer to each provider's documentation for details:
For details on which Next.js features require specific platform capabilities, see Deploying to Platforms.
Last updated August 6, 2026
Subscribe to our newsletter
Stay updated on new releases and features, guides, and case studies.
访问原文 返回搜索 https://nextjs.org/docs/app/getting-started/deploying
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。