Skip to content

Instantly share code, notes, and snippets.

Last active September 25, 2017 14:13
What would you like to do?
Alakajam systemd unit
# Usage:
# - Put this content into /etc/systemd/system/alakajam.service
# - systemctl enable alakajam
# - systemctl start alakajam (or systemctl restart apache)
Description=Alakajam server
WorkingDirectory=/var/www/alakajam # path to git repo
ExecStart=/usr/bin/node server.js # assuming node is /usr/bin/node, adjust accordingly
User=nobody # or some other user, best not root
Group=nobody # or some other group, best not root
WantedBy=apache.service # I'm assuming that's what it's called; do "systemctl | grep apache" to make sure)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment