4. Building Your Collator
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
note
the last command (related to libfontconfig1
) is optional and required if you want install Grafana in the later sections of Secure Setup Guide).
Build the node
To build a collator node, you have 3 different options
- From source: experience with using Linux
- From binary: easiest way to start and update node with new releases
- Run a Docker container: Docker background requires
Build from source
Building a node from source code is the most complicated path, but will also provide the best optimized node version for your server.
Make sure your server is ready to build a collator. The instructions that follow do not go into details which you can find in official Substrate Docs
## Prerequisites (Software required for compilation)
##
sudo apt install build-essential
sudo apt install --assume-yes git clang curl cmake llvm protobuf-compiler
sudo apt update
## Install Rust
##
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
Clone the Astar repository:
git clone https://github.com/AstarNetwork/Astar.git
cd Astar