Node.js Server
Running your Next.js application as a Node.js server is the easiest way to self host Next.js with a complete feature set.
You are basically running the commands npm run build
and npm run start
to start your application.
The concept
The idea here is to keep the setup, and the number of tools required, as small/simple as possible.
Node.js is directly running on your server. When your application is changing your CD environment usually does login to your server via SSH, builds the application and restarts the Node.js process.
PM2 to the rescue
For keeping your Node.js process running the tool of the trade usually is PM2.