# How to deploy

Here is a guide on how to deploy the application. This entire documentation is referenced from Next.js, so for a better view, please check this Next.js tutorial - <https://nextjs.org/docs/app/getting-started/deploying>

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

| Deployment Option                                                                     | Feature Support   |
| ------------------------------------------------------------------------------------- | ----------------- |
| [Node.js server](https://nextjs.org/docs/app/getting-started/deploying#nodejs-server) | All               |
| [Docker container](https://nextjs.org/docs/app/getting-started/deploying#docker)      | All               |
| [Static export](https://nextjs.org/docs/app/getting-started/deploying#static-export)  | Limited           |
| [Adapters](https://nextjs.org/docs/app/getting-started/deploying#adapters)            | Platform-specific |

### [Node.js server](https://nextjs.org/docs/app/getting-started/deploying#nodejs-server) <a href="#nodejs-server" id="nodejs-server"></a>

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

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](https://nextjs.org/docs/app/guides/custom-server).

Node.js deployments support all Next.js features. Learn how to [configure them](https://nextjs.org/docs/app/guides/self-hosting) for your infrastructure.

#### [Templates](https://nextjs.org/docs/app/getting-started/deploying#templates) <a href="#templates" id="templates"></a>

* [Flightcontrol](https://github.com/nextjs/deploy-flightcontrol)
* [Railway](https://github.com/nextjs/deploy-railway)
* [Replit](https://github.com/nextjs/deploy-replit)

### [Docker](https://nextjs.org/docs/app/getting-started/deploying#docker) <a href="#docker" id="docker"></a>

Next.js can be deployed to any provider that supports [Docker](https://www.docker.com/) containers. This includes container orchestrators like Kubernetes or a cloud provider that runs Docker.

Docker deployments support all Next.js features. Learn how to [configure them](https://nextjs.org/docs/app/guides/self-hosting) for your infrastructure.

#### [Templates](https://nextjs.org/docs/app/getting-started/deploying#templates-1) <a href="#templates-1" id="templates-1"></a>

* [Docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker)
* [Docker Multi-Environment](https://github.com/vercel/next.js/tree/canary/examples/with-docker-multi-env)
* [DigitalOcean](https://github.com/nextjs/deploy-digitalocean)
* [Fly.io](https://github.com/nextjs/deploy-fly)
* [Google Cloud Run](https://github.com/nextjs/deploy-google-cloud-run)
* [Render](https://github.com/nextjs/deploy-render)
* [SST](https://github.com/nextjs/deploy-sst)

### [Static export](https://nextjs.org/docs/app/getting-started/deploying#static-export) <a href="#static-export" id="static-export"></a>

Next.js enables starting as a static site or [Single-Page Application (SPA)](https://nextjs.org/docs/app/guides/single-page-applications), then later optionally upgrading to use features that require a server.

Since Next.js supports [static exports](https://nextjs.org/docs/app/guides/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](https://nextjs.org/docs/app/guides/static-exports) **does not** support Next.js features that require a server. [Learn more](https://nextjs.org/docs/app/guides/static-exports#unsupported-features).

#### [Templates](https://nextjs.org/docs/app/getting-started/deploying#templates-2) <a href="#templates-2" id="templates-2"></a>

* [GitHub Pages](https://github.com/nextjs/deploy-github-pages)

### [Adapters](https://nextjs.org/docs/app/getting-started/deploying#adapters) <a href="#adapters" id="adapters"></a>

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:

* [AWS Amplify Hosting](https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components)
* [Cloudflare](https://developers.cloudflare.com/workers/frameworks/framework-guides/nextjs)
* [Deno Deploy](https://docs.deno.com/examples/next_tutorial)
* [Netlify](https://docs.netlify.com/frameworks/next-js/overview/#next-js-support-on-netlify)
* [Vercel](https://vercel.com/docs/frameworks/nextjs)
