Docs
Installation

Installing and Deploying Next.js Template to Server

In this documentation - We are going to explore the world of Next.js and learn how to install and deploy a Next.js template on your server or PaaS

This is a quick start guide to help you get started with Next.js Templates.

How to Install

To get started with the template first you’ll have to install its dependencies. Before installing the dependencies make sure you have Node.js installed on your machine, otherwise, the commands won’t work. This is applicable for ordinary UI templates, if you're using starter templates, please follow starter template installation guide

Here are the steps you need to follow to install the dependencies:

1.After downloading the template extract it and CD into that directory. Then run this command:

npm install

or

yarn install

2.When the installation is done you can run this command to start the template:

npm run dev

or

yarn dev

When this command runs successfully the template will open on localhost:3000, you can see all the changes you make on the browser.


Deploying to server

After the installation and customization are done you have to deploy the template. Here are the steps you need to follow to deploy the template:

You can deploy the template in two ways,

Build the template locally and then deploy it to the server. Build the template using the following command, When you run this command you’ll get a build folder. Now you can upload this folder to your server and your site will be live.

npm run build

or

yarn build

Installing Starter Templates

Installing our starter template is different than normal UI templates, please follow this guide to install starter templates

Deploying on PaaS

If you are using a GitHub repo then you can go with free-of-cost and easy-to-use options like Vercel (opens in a new tab), or Netlify (opens in a new tab) they offer decent-free tiers for Next.js hosting.