Install
sudo apt install curl software-properties-commoncurl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -sudo apt install -y nodejscurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bashexport NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvmnvm install 20.0.0nvm use 20.0.0npm i -g rivalz-node-clirivalz run
sudo tee /etc/systemd/system/rivalz.service > /dev/null <<EOF
[Unit]
Description=rivalz Service
After=network.target
[Service]
Type=simple
ExecStart=$(which rivalz) run
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF# Start the node
systemctl daemon-reload
systemctl enable rivalz
systemctl restart rivalz && journalctl -u rivalz -f -o catLast updated
Was this helpful?