Prerequisites

1. Update System and Install Dependencies

Update your system packages and install necessary dependencies:

sudo apt update && sudo apt upgrade -y
sudo apt install make curl git wget jq build-essential -y

2. Install Go

Download and install Go, which is required to build the node:

ver="1.21.5"
wget "<https://golang.org/dl/go$ver.linux-amd64.tar.gz>"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version

3. Clone and Build Aligned Layer Node

Clone the Aligned Layer repository and build the node:

cd $HOME
git clone --depth 1 --branch v0.0.2 <https://github.com/yetanotherco/aligned_layer_tendermint>
cd aligned_layer_tendermint/cmd/alignedlayerd
go build
chmod +x alignedlayerd
sudo mv alignedlayerd /usr/local/bin/

4. Initialize the Node

Initialize your node with a custom moniker (replace NodeName):

alignedlayerd init NodeName --chain-id alignedlayer

5. Download Genesis and Addrbook Files

Download the genesis and addrbook files needed to sync with the network:

wget <https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/genesis.json> -O $HOME/.alignedlayer/config/genesis.json
wget <https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/addrbook.json> -O $HOME/.alignedlayer/config/addrbook.json

6. Configure Persistent Peers