5.4 - Other Hosting Options
Next.js can be deployed to any hosting provider that supports Node.js.
If youβve followed the instructions so far, your package.json
should have the following build
and start
scripts:
In your own hosting provider, run the build
script once, which builds the production application in the .next
folder.
After building, the start
script starts a Node.js server that supports hybrid pages, serving both statically generated and server-side rendered pages, and API Routes.
Tip: You can customize the
start
script inpackage.json
to accept aPORT
parameter by updating it as:"start": "next start -p $PORT"
.
Thatβs it! If you have questions about deploying Next.js, you can ask our community on GitHub Discussions.
Previous5.3 - Error when deploying to Vercel using the GitHub repo.NextStep 6. Set your Front-end Site URL. Congratulations π
Last updated