Aligned Layer
My Guide to Installing an Aligned Layer Node
I recently decided to set up an Aligned Layer node, and here's what I managed to do. Sharing my experience:
Preparation
First, I made sure my server met the minimum requirements:
Ubuntu 22.04
4 CPU cores
8 GB RAM
500 GB SSD
Step 1: System Update
I started by updating the system:
sudo apt update && sudo apt upgrade -y
Step 2: Installing Dependencies
I installed the necessary tools:
sudo apt install make curl git wget jq build-essential -y
Step 3: Installing Go
Go is needed for compilation. I used version 1.21.5:
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
Step 4: Cloning and Building the Node
I struggled a bit here, but eventually got it working:
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
After building, I made the binary executable and moved it:
chmod +x alignedlayerd
sudo mv alignedlayerd /usr/local/bin/
Step 5: Initializing the Node
I chose a name for my node - "MyAlignedNode":
alignedlayerd init MyAlignedNode --chain-id alignedlayer
Step 6: Configuring Settings
I downloaded the genesis and addrbook files:
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
Step 7: Setting Up Peers
I added a few peers that I found on the forum:
PEERS="peer1address:26656,peer2address:26656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.alignedlayer/config/config.toml
Step 8: Creating a Service
I created a system service for auto-starting the node:
sudo tee /etc/systemd/system/alignedlayerd.service > /dev/null <<EOF
[Unit]
Description=My Aligned Layer Node
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/local/bin/alignedlayerd start
Restart=on-failure
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Step 9: Starting the Node
Finally, I started the node:
sudo systemctl enable alignedlayerd
sudo systemctl start alignedlayerd
Step 10: Monitoring
To keep an eye on the node's operation, I use this command:
journalctl -u alignedlayerd -f
Last updated