Deployment
In general you can deploy the application to any hosting provider that supports Node.js, but we recommend using Vercel for the best experience.
Read further deployment guides on our blog:
Deploying to Vercel
Vercel is the easiest way to deploy Next.js apps. It's the company behind Next.js and has first-class support for Next.js.
Setup vercel account
To host your project on Vercel you first have to create an account.
Connect your git repository
After signing up you will be promted to import a git repository. Select the git provider of your project and connect your git account with Vercel.
Now you will see a list of all your projects. Select the project you want to deploy and click on the Import button.
In the Configure Project view expand the Enviornment Variables section and add the following variables one by one (you can copy them from the .env file in your projects root too):
The NEXT_PUBLIC_SITE_URL is the main url of your site, e.g. https://your-app.com
.
Then click the Deploy button and your project will be deployed.