Realtime logs can be viewed by running
pm2 monit. Task errors will be shown in the
Logs for a particular services can be viewed by running
pm2 logs <service name>. Get a list of current services by running
Log files for the services are located in the
Services can be restarted by running
pm2 restart <service name>. Get a list of current services by running
nginx config by running
nginx after config changes by running
nginx -s reload.
Nginx logs are generally found in
/var/log/nginx/. Here are a few useful commands for viewing them:
tail -f /var/log/nginx/access.log tail -f /var/log/nginx/error.log
sudo: poetry: command not found: If you have installed poetry and are running the scripts with use you may need to add the path to poetry to your sudo path. Run
sudo visudo and add
/root/.local/bin: to the secure path.
pm2services after a reboot
pm2 is not set to load after a reboot. You can run
pm2 resurrect; pm2 save to get the jobs back, then run
pm2 startup to make them reload after a reboot.