Skip to main content

Next.js App

Next.js is a React framework that enables server-side rendering and generating static websites for React-based web applications.

Follow the steps below to get your Next.js app up and running on Replit:

Step 1: Fork the template

Login to Replit and fork the Next.js template by selecting the + Use Template button located at the top right of the page. Follow the onscreen instructions to complete the fork and create a Repl.

Step 2: Deploy the application

In the Workspace header, select the Deploy button and choose Autoscale from the types of Deployments. Then, select the Set up your deployment button and use the following configuration:

  • Machine configuration: You can keep the default values. The default machine configuration is a 1vCPU and 2 GiB RAM.
  • Max number of machines: Keep the default value of 3.
  • Primary domains: Choose a domain name for your app.
  • Build command: Enter the command npm run build into the Build command field.
  • Run command: Enter the command npm run start into the Run command field.

Select the Deploy button to deploy your application.

After a few minutes, your app will be live!

In the future, if you want to update your deployment, open the Deployments pane and either Redeploy or update the config in the settings.

Was this helpful?