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
π’
While this step is optional, it is strongly recommended for those running on the mainnet to take a closer look, as it plays a crucial role in ensuring basic security. If you don't want to, you can skip ahead to configure moniker.
Setup ssh for elys user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser elys --disabled-password -q
sudo usermod -aG sudo elys
sudo -u elys 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.22.3
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.22.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 elys
git clone https://github.com/elys-network/elys.git
cd elys
git checkout v1.0.0
make build
Latest commit : 4fac9436bc4392e5b4e3584572504bc1681e8ef9
Prepare binaries for cosmovisor
mkdir -p $HOME/.elys/cosmovisor/genesis/bin
mv build/elysd $HOME/.elys/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.elys/cosmovisor/genesis $HOME/.elys/cosmovisor/current -f
sudo ln -s $HOME/.elys/cosmovisor/current/bin/elysd /usr/local/bin/elysd -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/elys.service > /dev/null << EOF
[Unit]
Description=elys 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/.elys"
Environment="DAEMON_NAME=elysd"
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
Enable Service
Enable elys systemd service
sudo systemctl daemon-reload
sudo systemctl enable elys
Initialize Node
Setting node configuration
elysd config set client chain-id elys-1
elysd config set client keyring-backend file
elysd config set client node tcp://localhost:13557
Initialize node
elysd init $MONIKER --chain-id elys-1
Download Genesis & Addrbook
Download genesis & addrbook file
curl -Ls https://snap.nodex.one/elys-testnet/genesis.json > $HOME/.elys/config/genesis.json
curl -Ls https://snap.nodex.one/elys-testnet/addrbook.json > $HOME/.elys/config/addrbook.json
sha256sum genesis.json
: 87b7e5d9bc7229289c095f52761580d9d3fd8dd2c04c5e6966d9eb2697a4d2c1
Configure Seeds
Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"5f5cfac5c38506fbb4275c19e87c4107ec48808d@seeds.nodex.one:13510\"|" $HOME/.elys/config/config.toml
Configure Gas Prices
Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0003uelys,0.001ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349,0.001ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9\"|" $HOME/.elys/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/.elys/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:13558\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:13557\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:13560\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:13556\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":13566\"%" $HOME/.elys/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:13517\"%; s%^address = \":8080\"%address = \":13580\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:13590\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:13591\"%; s%:8545%:13545%; s%:8546%:13546%; s%:6065%:13565%" $HOME/.elys/config/app.toml
Download Snapshots
Download latest chain snapshot
curl -L https://snap.nodex.one/elys/elys-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.elys
[[ -f $HOME/.elys/data/upgrade-info.json ]] && cp $HOME/.elys/data/upgrade-info.json $HOME/.elys/cosmovisor/genesis/upgrade-info.json
Start Service
Letss f*cking goooo!
sudo systemctl start elys