Installation
Install Dependencies:
sudo apt update && sudo apt upgarade -y
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip make bc -y
Install GO: (amd64 - x86)
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.23.4.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.bash_profile
go version
Set variables:
echo "export UNION_PORT="41"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Install binary:
cd $HOME
wget https://github.com/unionlabs/union/releases/download/uniond%2Fv1.2.2-rc2.alpha1/uniond-release-x86_64-linux
mv uniond-release-x86_64-linux uniond
chmod +x uniond
mv uniond $HOME/go/bin/
uniond version
Config & init chain:
uniond init Node39-Guide --chain-id union-1
sed -i "s/chain-id = .*/chain-id = \"union-1\"/" $HOME/.union/config/client.toml
sed -i "s/keyring-backend = .*/keyring-backend = \"os\"/" $HOME/.union/config/client.toml
sed -i "s/node = .*/node = \"tcp:\/\/localhost:${UNION_PORT}657\"/" $HOME/.union/config/client.toml
Custom ports:
sed -i.bak -e "s%:1317%:${UNION_PORT}317%g;
s%:8080%:${UNION_PORT}080%g;
s%:9090%:${UNION_PORT}090%g;
s%:9091%:${UNION_PORT}091%g;
s%:8545%:${UNION_PORT}545%g;
s%:8546%:${UNION_PORT}546%g;
s%:6065%:${UNION_PORT}065%g" $HOME/.union/config/app.toml
sed -i.bak -e "s%:26658%:${UNION_PORT}658%g;
s%:26657%:${UNION_PORT}657%g;
s%:6060%:${UNION_PORT}060%g;
s%:26656%:${UNION_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${UNION_PORT}656\"%;
s%:26660%:${UNION_PORT}660%g" $HOME/.union/config/config.toml
Set min gas:
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0au"|g' $HOME/.union/config/app.toml
Set indexer:
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.union/config/config.toml
Set DB goleveldb:
sed -i "s|db_backend =.*|db_backend=\"goleveldb\"|g" "$HOME/.union/config/config.toml"
sed -i "s|app-db-backend =.*|app-db-backend=\"goleveldb\"|g" "$HOME/.union/config/app.toml"
Pruning:
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.union/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.union/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.union/config/app.toml
Download Genesis & addressbook:
curl -Ls https://file3.node39.top/Mainnet/Union/genesis.json > $HOME/.union/config/genesis.json
curl -Ls https://file3.node39.top/Mainnet/Union/addrbook.json > $HOME/.union/config/addrbook.json
Peers:
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.union/config/config.toml
Create Service:
sudo tee /etc/systemd/system/uniond.service > /dev/null <<EOF
[Unit]
Description=uniond Service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which uniond) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable uniond
Download snapshot: Here.
Check sync:
(False -> Done)
uniond status 2>&1 | jq .SyncInfo