New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide config to run pm2 via systemd user instance #2749
Comments
You can already register a systemd service by running and following |
This is different: pm2 attempts to register as a service in global systemd config, in However, for each user session there is a personal Installing and controlling these does not require I suggest providing both configs - local and global and let users use what suits their needs best. As for ports: running Also, our dev who uses |
There isn't any web API for PM2, we use a custom protocol over socket to communicate with the daemon. I'll open a clear issue for |
Thanks |
Isn't it better to run the service as root and specify the user and/or group inside the service file?
|
Running |
Hello,
pm2
can run just fine undersystemd --user
instance. It even auto-starts properly, provided you enable session lingering.Here's the config I'm using:
This way it inherits all limits imposed on user it's running under and works just fine.
As a side note: it would be much better if we could make API listen on UNIX domain socket, this would allow to place
pm2
user's sockets under, say/run/pm2/$uid.sock
and externally monitor those apps (via Nagios or something) without looking for spare TCP port.The text was updated successfully, but these errors were encountered: