This will save a PM2 script to boot at startup. This requires root permissions to execute.
pm2 startup | grep "sudo" | bash
This will add a system wide event to cron, a task scheduling process, to auto resurrect saved PM2 processes. This will apply for all system users.
crontab -e# choose a text editor (i.e. nano)
Add the line:
@reboot pm2 resurrect, at the end. Then save the file and exit.