1. Install Node.js
2. Get your app onto the server
Clone from Git or upload via the File Manager:3. Install PM2
4. Start your app with PM2
package.json:
5. Save and enable auto-start on reboot
sudo env PATH=... command that pm2 startup prints. That registers PM2 as a systemd service.
Common PM2 commands
Run multiple instances (cluster mode)
Use all available CPU cores automatically:Environment variables
Create anecosystem.config.js file for cleaner deploys:
