Binary
In this guide, we will use the binary provided in Astar release.
If you have experience with Rust compilation, you can also build the binary from here.
Let's get started
Let's start with updating our server. Connect to your server and update:
sudo apt-get update
sudo apt-get upgrade
sudo apt install -y adduser libfontconfig1
Create dedicated user and directory
Download the latest release from Github:
wget $(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases/latest | grep "tag_name" | awk '{print "https://github.com/AstarNetwork/Astar/releases/download/" substr($2, 2, length($2)-3) "/astar-collator-v" substr($2, 3, length($2)-4) "-ubuntu-x86_64.tar.gz"}')
tar -xvf astar-collator*.tar.gz
Create a dedicated user for the node and move the node binary:
sudo useradd --no-create-home --shell /usr/sbin/nologin astar
sudo mv ./astar-collator /usr/local/bin
sudo chmod +x /usr/local/bin/astar-collator
Create a dedicated directory for the chain storage data:
sudo mkdir /var/lib/astar
sudo chown astar:astar /var/lib/astar
Set systemd service
To run a stable collator node, a systemd service has to be set and activated. This will ensure that the node is restarting even after a server reboot.
Create a service file
sudo nano /etc/systemd/system/astar.service