Control Web Panel
WebPanel => Information => Topic started by: adrianofnatal on August 04, 2025, 12:34:22 PM
-
Hi!
There is how to move NodeJS logs inside /opt/nvm/.pm2/logs to user home dir?
Some users upload their apps with a bunch of output log lines and this cause the log files to grow and fill the entire disk space.
I was thinking that moving this logs to user's home dir will solve 2 problems:
1. If logs becomes big, they will full the user space quota and affect only your user, not all server;
2. The user can read this logs to debug or get some important information.
There is a way to do it?
Thanks!
-
You're referring to pm2, not node. Node doesn't log anything, but the pm2 wrapper does. Check the link below, and consider installing logrotate
https://pm2.keymetrics.io/docs/usage/log-management/