Manage Nethermind with systemd

Create a new user

sudo useradd -m -s /bin/bash nethermind

increase the maximum number of open files

sudo bash -c 'echo "nethermind soft nofile 1000000" > /etc/security/limits.d/nethermind.conf'
sudo bash -c 'echo "nethermind hard nofile 1000000" >> /etc/security/limits.d/nethermind.conf'

switch to the new user

sudo su - nethermind

Get Nethermind

download the latest Nethermind package

wget [LINUX_PACKAGE_URL]

extract the files

unzip [LINUX_PACKAGE_FILENAME] -d nethermind

remove the no more need package (optional)

rm [LINUX_PACKAGE_FILENAME]

Manage Nethermind with systemd

exit the session as user nethermind if still active

exit

download the nethermind.service config

wget https://raw.githubusercontent.com/NethermindEth/nethermind/master/scripts/nethermind.service

move the config into the systemd folder

sudo mv nethermind.service /etc/systemd/system/

reload the systemd configs

sudo systemctl daemon-reload

you can now start, stop, restart Nethermind with systemd

sudo service nethermind start

display the current Nethermind output (optional)

journalctl -u nethermind -f

enable autorun (optional)

sudo systemctl enable nethermind