Skip to content

Install

Website | Twitter | Discord | Explorer

Download the binary file

wget https://github.com/PureStake/moonbeam/releases/download/v0.33.0/moonbeam

Create a service account to run

adduser moonriver_service --system --no-create-home

Create a directory to store the binary and data

mkdir /var/lib/moonriver-data

Move the binary file to the created folder

mv ./moonbeam /var/lib/moonriver-data

Set ownership and permissions for the local directory where the chain data is stored

sudo chown -R moonriver_service /var/lib/moonriver-data

Create configuration file

vim /etc/systemd/system/moonriver.service
[Unit]
Description="Moonriver systemd service"
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=on-failure
RestartSec=10
User=moonriver_service
SyslogIdentifier=moonriver
SyslogFacility=local7
KillSignal=SIGHUP
ExecStart=/var/lib/moonriver-data/moonbeam \
--collator \
--trie-cache-size 1073741824 \
--db-cache 50% RAM in MB \
--base-path /var/lib/moonriver-data \
--chain moonriver \
--name "INSERT_YOUR_NODE_NAME" \
-- \
--name="INSERT_YOUR_NODE_NAME (Embedded Relay)"
[Install]
WantedBy=multi-user.target
cd /var/lib/moonriver-data
chmod +x moonbeam
chown moonriver_service moonbeam
cd $HOME

Start the service

sudo systemctl enable moonriver.service
sudo systemctl start moonriver.service
sudo systemctl status moonriver.service

Check the logs

sudo journalctl -u moonriver.service -f -o cat

Delete node

sudo systemctl stop moonriver.service
sudo systemctl disable moonriver.service
sudo rm /etc/systemd/system/moonriver.service
rm -rf /var/lib/moonriver-data
sudo systemctl daemon-reload