1

In this post: [Other serverfault post][1] [1]: https://serverfault.com/questions/1018676/how-to-configure-systemd-service-unit-to-start-node-app-with-npm-start-instead

I found that it's possible to add a node based service to the system without having to create an apt package. It would be nice if systemctl and journalctl -u worked with the new service.

I found this guide helpful: [Blog post][2] [2]: https://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1/

In looking at how other services are implemented, it appears there are a few steps:

  1. Install/create your node service file/s in a folder on the system

  2. Create a file /lib/systemd/system/.service. Add the provper Environment lines, etc.

  3. sudo systemctl daemon-reload

  4. systemctl enable token-server (also creates the symlink to /etc/systemd/system/.service)

gwhiz
  • 37
  • 5

0 Answers0