Systemd

Install a node via NPM

Install Service

Create a new file in /etc/systemd/system/zen-node.service with the following:
1
[Unit]
2
Description=Zen Node
3
After=network.target
4
5
[Service]
6
Type=simple
7
WorkingDirectory=/usr/lib/node_modules/@zen/zen-node/Release/
8
ExecStart=/usr/bin/mono /usr/lib/node_modules/@zen/zen-node/Release/zen-node.exe
9
Restart=on-failure
10
11
[Install]
12
WantedBy=multi-user.target
13
Copied!

Enable and Run Service:

  1. 1.
    Enable by writing on the terminal: systemctl enable zen-node.service
  2. 2.
    Run the service by writing: systemctl start zen-node.service

View Service Logs

  1. 1.
    Run on the terminal: journalctl -f -u zen-node.service
Last modified 1yr ago