-
Notifications
You must be signed in to change notification settings - Fork 2
Example nethloader systemd service
Guillem Arias edited this page Jun 21, 2018
·
5 revisions
This is an example .service
file in the systemd folder. For example /etc/systemd/system/nethloader.service
.
Once saved, you can use it as any other system service with restart/stop/start and when enabled it will start at boot too.
[Unit]
Description=Nethloader backend service
After=network.target
[Service]
Environment=NODE_PORT=4000
WorkingDirectory=/nethloader/backend/dist/folder
Type=simple
User=www-data
ExecStart=/nodejs/binary/folder /nethloader/backend/dist/folder/index.js
Restart=on-failure
[Install]
WantedBy=multi-user.target