Deploy onto Akash : Setting up an Avalanche Node

Let's Node!

⠀In this article we are providing installation Guide of the Avalanch Validator Node within the Linux and offering 2 different ways. The 1st way is "Automatically (one line install)" - run this script and it performs all the necessary actions to start the Validator Node; 2nd method is a manual one - all commands must be executed manually.


Table of contents


Requirements

To table of contents

⠀Recommended:

  • CPU: Equivalent of 8 AWS vCPU
  • RAM: 16 GB
  • Storage: 200 GB
  • OS: Ubuntu 18.04/20.04

Launching

To table of contents

Automatically (one line install)

⠀Execute the script

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Avalanche/main/installer.sh)

Manually

⠀Update packages

sudo apt update && sudo apt upgrade -y 

⠀Install required packages

sudo apt install jq pkg-config build-essential libssl-dev -y

⠀Download the node binary

cd
export avalanchego_version="v0.0.0"
wget "https://github.com/ava-labs/avalanchego/releases/download/$avalanchego_version/avalanchego-linux-amd64-$avalanchego_version.tar.gz"

v0.0.0 - the node release you want (find it on releases page)

⠀Unzip the archive

tar -xvf "avalanchego-linux-amd64-$avalanchego_version.tar.gz"

⠀Make avalanchego executable

chmod +x $HOME$(find / -name "avalanchego*" -type d -printf '/%f')/avalanchego

⠀Create a node service file

sudo tee <<EOF >/dev/null /etc/systemd/system/avalanchd.service
[Unit]
Description=Avalanch Node
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME$(find / -name "avalanchego*" -type d -printf '/%f')/avalanchego
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

⠀Start the node

sudo systemctl enable avalanchd
sudo systemctl daemon-reload
sudo systemctl restart avalanchd

⠀Add a command to view a node log in the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/insert_variable.sh) "avalanch_log" "sudo journalctl -f -n 100 -u avalanchd" true

⠀View the node log

avalanch_log

Useful commands

To table of contents

⠀To view the last 100 node log entries

avalanch_log
sudo journalctl -f -n 100 -u avalanchd

⠀To restart the node

sudo systemctl restart avalanchd

Useful URLs

To table of contents

Official project site | Official Telegram group | Discord | Twitter


Thanks

To table of contents

Let’s Node Team — article writing and auto installation script creating

To express your thanks