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 union user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser union --disabled-password -q
sudo usermod -aG sudo union
sudo -u union 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.4
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.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)

Download Binaries

Download uniond latest binary v0.22.0
cd $HOME
wget -O uniond https://snap.nodex.one/union-testnet/uniond-v0.22.0
chmod +x uniond

Latest commit : 03bf5a755e2cac7316e5de11ee5bc32e4b950a8e

Prepare binaries for cosmovisor
mkdir -p $HOME/.union/cosmovisor/genesis/bin
mv uniond $HOME/.union/cosmovisor/genesis/bin/
Create symlinks
sudo ln -s $HOME/.union/cosmovisor/genesis $HOME/.union/cosmovisor/current -f
sudo ln -s $HOME/.union/cosmovisor/current/bin/uniond /usr/local/bin/uniond -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/union.service > /dev/null << EOF
[Unit]
Description=union node service
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home $HOME/.union
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.union"
Environment="DAEMON_NAME=uniond"
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/.union/cosmovisor/current/bin"
 
[Install]
WantedBy=multi-user.target
EOF

Enable Service

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

Shell Aliases

Set alias on shell for uniond binaries
echo 'alias uniond="uniond --home ~/.union/"' >> ~/.bashrc
source ~/.bashrc
Initialize node
uniond init $MONIKER --chain-id union-testnet-8
Setting node configuration
sed -i \
  -e 's|^chain-id *=.*|chain-id = "union-testnet-8"|' \
  -e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
  -e 's|^node *=.*|node = "tcp://localhost:23157"|' \
  $HOME/.union/config/client.toml

Download Genesis & Addrbook

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

sha256sum genesis.json : e4baab5c99daeff7445d43fff5adf5412d1269e59d2929e56f05b113d4ae0c3c

Configure Seeds

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

Configure Gas Prices

Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0muno\"|" $HOME/.union/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/.union/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:23158\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:23157\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:23160\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:23156\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":23166\"%" $HOME/.union/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:23117\"%; s%^address = \":8080\"%address = \":23180\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:23190\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:23191\"%; s%:8545%:23145%; s%:8546%:23146%; s%:6065%:23165%" $HOME/.union/config/app.toml

Download Snapshots

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

Start Service

Letss f*cking goooo!
sudo systemctl start union