This repo is primarily intended for developers running headless Raspberry Pi's (no desktop environment) who want to use the various Ergo services. With that said, individuals on the desktop version can still follow this guide by executing the same commands in their Pi terminal window.
Ideally, your Ergo services run in the background and automatically reboots in the event of an outage. The steps below is one example on how to setup this process for the node on your Raspberry Pi.
sudo nano /etc/systemd/system/ergonode.service
[Unit]
Description=Ergo Node
After=multi-user.target
[Service]
WorkingDirectory=/path/to/ergo-node
User=pi
ExecStart=/usr/bin/java -jar -Xmx2g ergo-<VERSION>.jar --mainnet -c ergo.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo chmod 644 /etc/systemd/system/ergonode.service
sudo systemctl daemon-reload
sudo systemctl enable ergonode.service
sudo systemctl start ergonode.service