This documentation under development by nodex.one team! πŸ‘·β€β™‚οΈπŸ‘‹
Networks
Testnet
βš”οΈ Install

Manual Installation

Let's explore the manual installation process as we set up a node with Cosmovisor!

Install Dependencies

Update system package and install build tools
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade

Secure Setup

πŸ“’

This step is optional, and you can choose to skip ahead to configure moniker.

Setup ssh for xion user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser xion --disabled-password -q
sudo usermod -aG sudo xion
sudo -u xion bash -c 'mkdir -p ~/.ssh && echo "YOUR_PUBLIC_SSH_KEY" >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys'

Configure Moniker

Replace <your-moniker-name> with your own validator name
MONIKER="<your-moniker-name>"

Install Go

install go version 1.21.3
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.3.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Build Binaries

Cloning project repository & Compile binaries
cd $HOME
rm -rf xion
git clone https://github.com/burnt-labs/xion.git
cd xion
git checkout v11.0.1
make build

Latest commit : 0fa1ea9d9130b0955ef2fd9c25a0eab0099327aa

Prepare binaries for cosmovisor
mkdir -p $HOME/.xiond/cosmovisor/genesis/bin
mv build/xiond $HOME/.xiond/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.xiond/cosmovisor/genesis $HOME/.xiond/cosmovisor/current -f
sudo ln -s $HOME/.xiond/cosmovisor/current/bin/xiond /usr/local/bin/xiond -f

Cosmovisor Setup

Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Create Service

Create a systemd service
sudo tee /etc/systemd/system/xion.service > /dev/null << EOF
[Unit]
Description=xion 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/.xiond"
Environment="DAEMON_NAME=xiond"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.xiond/cosmovisor/current/bin"
 
[Install]
WantedBy=multi-user.target
EOF

Enable Service

Enable xion systemd service
sudo systemctl daemon-reload
sudo systemctl enable xion

Initialize Node

Setting node configuration
xiond config chain-id xion-testnet-1
xiond config keyring-backend test
xiond config node tcp://localhost:22357
Initialize node
xiond init $MONIKER --chain-id xion-testnet-1

Download Genesis & Addrbook

Download genesis & addrbook file
curl -Ls https://snap.nodex.one/xion-testnet/genesis.json > $HOME/.xiond/config/genesis.json
curl -Ls https://snap.nodex.one/xion-testnet/addrbook.json > $HOME/.xiond/config/addrbook.json

sha256sum genesis.json : a9614bceb1a362bb2c6159604dd3ea5648b0ba7b846dce471c1b51c482de4b79

Configure Seeds

Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"d1d43cc7c7aef715957289fd96a114ecaa7ba756@testnet-seeds.nodex.one:22310\"|" $HOME/.xiond/config/config.toml

Configure Gas Prices

Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0uxion\"|" $HOME/.xiond/config/app.toml

Pruning Setting

Configure pruning setting
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.xiond/config/app.toml

Custom Port

Please note that updating the port is optional!

Configure a custom port
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:22358\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:22357\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:22360\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:22356\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":22366\"%" $HOME/.xiond/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:22317\"%; s%^address = \":8080\"%address = \":22380\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:22390\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:22391\"%; s%:8545%:22345%; s%:8546%:22346%; s%:6065%:22365%" $HOME/.xiond/config/app.toml

Download Snapshots

Download latest chain snapshot
curl -L https://snap.nodex.one/xion-testnet/xion-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.xiond
[[ -f $HOME/.xiond/data/upgrade-info.json ]] && cp $HOME/.xiond/data/upgrade-info.json $HOME/.xiond/cosmovisor/genesis/upgrade-info.json

Start Service

Letss f*cking goooo!
sudo systemctl start xion