Manual
Build the Node from scratch step by step
1. Install Dependencies
sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
Install GO
If you already Installed GO version 1.19.5 you can skip this step
check your GO version:
ver="1.19.5"
cd $HOME
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"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go version
Download and Install Binary
cd $HOME
rm -rf gaia/
git clone https://github.com/cosmos/gaia.git
cd gaia/
git fetch
git checkout v13.0.0
make build
Install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0
Create Symbolic Links for Cosmovisor
mkdir -p $HOME/.gaia/cosmovisor/genesis/bin
mv build/gaiad $HOME/.gaia/cosmovisor/genesis/bin/
rm -rf build
sudo ln -s $HOME/.gaia/cosmovisor/genesis $HOME/.gaia/cosmovisor/current
sudo ln -s $HOME/.gaia/cosmovisor/current/bin/gaiad /usr/local/bin/gaiad
Set Config App
First, create variable for:
NODENAME=<fill with your node name>
PORT=<fill with your available port>
(you can use port 4-65353, except: 18, 22, 23, 53, 80 and 323)
gaiad config chain-id cosmoshub-4
gaiad config keyring-backend file
gaiad config node tcp://localhost:${PORT}657
gaiad init $NODENAME --chain-id $CHAIN
Download Addrbook & Genesis
https://ss.cosmos.nodestake.top/addrbook.json > $HOME/.gaia/config/addrbook.json
https://ss.cosmos.nodestake.top/addrbook.json > $HOME/.gaia/config/genesis.json
Configure Seeds and Peers
SEEDS="7954d10a367f1a9556530a40680ab1df6b14d4a4@rpc.cosmos.nodestake.top:666"
PEERS=$(curl -s https://ss.cosmos.nodestake.top/peers.txt)
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.gaia/config/config.toml
Configure Pruninge
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.gaia/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.gaia/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.gaia/config/app.toml
Create Service
sudo tee /etc/systemd/system/gaiad.service > /dev/null << EOF
[Unit]
Description=gaia node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.gaiad"
Environment="DAEMON_NAME=gaiad"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
Start Node
sudo systemctl daemon-reload
sudo systemctl enable gaiad
sudo systemctl start gaiad
(Optional) Check Node Status
if you want check your Node logs, run the command below:
sudo journalctl -fu gaiad -o cat
if you want check your Node synchronize status, run the command below:
curl -s localhost:${PORT}657/status
Last updated