Deploy a Next.js App


You can deploy a Next.js application on Render in just a few clicks.

A sample app for this quick start is deployed at https://next-js.onrender.com.

You can choose to deploy it as a Node Server or Static Site.

Deploy as a Node Server

  1. Fork nextjs-hello-world on GitHub.
  2. Create a new Web Service on Render, and give Render permission to access your new repo.
  3. Use the following values during creation:

    EnvironmentNode
    Build Commandyarn; yarn build
    Start Commandyarn start

That’s it! Your web service will be live on your Render URL as soon as the build finishes.

See Specifying a Node Version if you need to customize the version of Node.js used for your app.

Deploy as a Static Site

  1. Fork nextjs-hello-world on GitHub.
  2. Create a new Web Service on Render, and give Render permission to access your new repo.
  3. Use the following values during creation:

    EnvironmentStatic Site
    Build Commandyarn; yarn build; yarn next export
    Publish Directoryout

That’s it! Your static site will be live on your Render URL as soon as the build finishes.