description: Setting up your validator node has never been so easy. Get your validator running in minutes by following step by step instructions.
MONIKER="YOUR_MONIKER_GOES_HERE"
sudo apt -q update
sudo apt -qy install curl git jq zst build-essential
sudo apt -qy upgrade
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.19.8.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 and build binaries
# Clone project repository
cd $HOME
rm -rf elys
git clone https://github.com/elys-network/elys elys
cd elys
git checkout v1.0.0
# Build binaries
make install
# Prepare binaries for Cosmovisor
mkdir -p $HOME/.elys/cosmovisor/genesis/bin
mv ~/go/bin/elysd $HOME/.elys/cosmovisor/genesis/bin/
rm -rf build
Install Cosmovisor and create a service
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0
# Create service
sudo tee /etc/systemd/system/elysd.service > /dev/null << EOF
[Unit]
Description=osmosis node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$HOME/.elys
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.elys"
Environment="DAEMON_NAME=elysd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
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/.elys/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable elysd
# Set node configuration
elysd config chain-id elys-1
elysd config node tcp://localhost:22057
# Initialize the node
elysd init $MONIKER --chain-id elys-1
# Download genesis and addrbook
curl -Ls https://github.com/elys-network/networks/blob/main/mainnet/genesis.json > $HOME/.elys/config/genesis.json
curl -Ls https://snapshots.lavenderfive.com/addrbooks/elys/addrbook.json > $HOME/.elys/config/addrbook.json
# Add seeds
seeds="7e0e2a7a6c435274399d1df9cf65dc4b8b4ebf04@51.89.64.156:26656,41defad48e55a1f69753d50a0b9686d03502e3c6@51.89.235.111:26656,336b4190e2bbd194509f452ab53f301a361a4349@51.178.89.172:26656,2a899b63889ac5caa4c0219fa37992fa624b79de@51.161.118.222:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:22056,36d9c4dcdee38411d680f897481322bcb7e10aa8@elys-mainnet-seed.itrocket.net:41656"
sed -i -e "s|^seeds *=.*|seeds = \"$seeds\"|" $HOME/.elys/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.01uelys\"|" $HOME/.elys/config/app.toml
# Set pruning
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/.elys/config/app.toml
# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:22058\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:22057\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:22060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:22056\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":22066\"%" $HOME/.elys/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:22017\"%; s%^address = \":8080\"%address = \":22080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:22090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:22091\"%; s%:8545%:22045%; s%:8546%:22046%; s%:6065%:22065%" $HOME/.elys/config/app.toml
Start service and check the logs
sudo systemctl start elysd && sudo journalctl -u elysd -f --no-hostname -o cat