Skip to content

Instantly share code, notes, and snippets.

@rschiefer
Last active February 8, 2020 01:42
Show Gist options
  • Save rschiefer/7bb1875a142744208214f231ae75284e to your computer and use it in GitHub Desktop.
Save rschiefer/7bb1875a142744208214f231ae75284e to your computer and use it in GitHub Desktop.
SystemD service file for running node app
Description=My Node app which runs on restart.
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/node /etc/node-app/index.js
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment