This guide provides step-by-step instructions on how to set up and run a full node for the Avail network from source code. Whether you’re a beginner or an experienced node operator, this guide aims to make the process straightforward.
ATTENTIONS:
if Your server OS is debian 11/12, ubuntu 2204/2304, fedora 37/38, you can use pre-compiled binaries to run the avail node. This is the easiest way.
if Your can not use pre-compiled binaries to run the avail node. I advise you to use docker way.
- hardware requirements
This is the hardware configuration required to set up an Avail node:
Component Minimum Recommended
RAM: 4GB 8GB
CPU (amd64/x86 architecture): 2core 4core
Storage (SSD): 20–40GB 200–300GB
This guild uses ubuntu 2204 to deploy the avail full node from compiling the source code.
ssh to your node server and follow me.
Install dependencies
sudo apt update -y
sudo apt install build-essential git curl clang libclang-dev make libssl-dev protobuf-compiler -y
Install Rust
curl --proto ‘=https’ — tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
Create a work directory and dowload avail source code
mkdir avail_node
cd avail_node
git clone https://github.com/availproject/avail.git
Compile source
cd avail
git checkout v1.8.0.0
cargo build --release -p data-avail
A cup of coffee and waiting for compiling finish, you will find log
Finished release [optimized] target(s) in 52m 58s
Now we can try to run node
cp target/release/data-avail ..
cd ..
mkdir data
./data-avail --base-path $(pwd)/data --chain goldberg --name YOUR_NODE_NAME_HERE
If you find log bellow in your terminal, node run successfully, now press CTRL-C to terminate node running, then run node using screen or systemd:
Syncing, target=#621376 (8 peers), best: #797 (0xf462…59a4), finalized #512 (0xea92…03c9), ⬇ 273.0kiB/s ⬆ 16.2kiB/s
run node with screen
screen -mS avail
./data-avail --base-path $(pwd)/data --chain goldberg --name YOUR_NODE_NAME_HERE
Now your node is running, pls check it in https://telemetry.avail.tools/. You can click ctrl-a d to detached from screen, or run “screen -x avail” to attach into screen again.
If you don’t want to use screen, you can use systemd to run the avail node.
create avail.service file, change YOUR_NODE_NAME_HERE to your actual node name and paste bellow totally to your terminal.
cat > avail.service <<EOF
[Unit]
Description=Avail
After=network.target network-online.target
Requires=network-online.target[Service]
Type=simple
ExecStart=$(pwd)/data-avail --base-path $(pwd)/data --chain goldberg --name YOUR_NODE_NAME_HERE
Restart=always
RestartSec=120[Install]
WantedBy=multi-user.target
EOF
move avail.service to system /lib/systemd/system and run it.
sudo mv avail.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable avail
sudo systemctl start avail
now your node is running, you can check the node status, and find the log bellow.
Syncing, target=#621376 (8 peers), best: #797 (0xf462…59a4), finalized #512 (0xea92…03c9), ⬇ 273.0kiB/s ⬆ 16.2kiB/s
sudo systemctl status avail
sudo journalctl -f -u avail