systemd unit example
Example only
This is a generic example. Paths, user and command-line arguments depend on how you installed zecnerod. Check each line before you use it.
TODO
Replace the binary path, config path and arguments below with the confirmed values once the install steps are finalised.
Create a service user
sudo useradd --system --create-home --home-dir /var/lib/zecnero --shell /usr/sbin/nologin zecnero
Unit file
/etc/systemd/system/zecnerod.service
[Unit]
Description=Zecnero node (zecnerod)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=zecnero
Group=zecnero
# Example paths. Adjust to your install.
ExecStart=/usr/local/bin/zecnerod -c /etc/zecnero/zecnerod.toml start
Restart=on-failure
RestartSec=10
LimitNOFILE=65536
# Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
[Install]
WantedBy=multi-user.target
Enable and start
sudo systemctl daemon-reload
sudo systemctl enable --now zecnerod
Logs
journalctl -u zecnerod -f
Updates
After replacing the binary:
sudo systemctl restart zecnerod