Cosmovisor setup
Install cosmovisor
Run go install to download cosmovisor:
Copy
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected]
Create dir structure for cosmovisor:
Copy
export DAEMON_NAME=c4ed
export DAEMON_HOME=$HOME/.c4e-chain/
echo $DAEMON_NAME
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades
Copy c4e binary to cosmovisor genesis bin:
Copy
cp ~/go/bin/c4ed $DAEMON_HOME/cosmovisor/genesis/bin
$DAEMON_HOME/cosmovisor/genesis/bin/c4ed version
Setup systemd:
Copy
sudo tee /etc/systemd/system/cosmovisor.service> /dev/null <<EOF
[Unit]
Description=cosmovisor
After=network-online.target
[Service]
User=$USER
ExecStart=/home/$USER/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=c4ed"
Environment="DAEMON_HOME=/home/$USER/.c4e-chain"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=falseā
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="LD_LIBRARY_PATH=/home/$USER/.c4e-chain/lib:$LD_LIBRARY_PATH"
[Install]
WantedBy=multi-user.target
EOF
Run a node:
Copy
sudo systemctl enable cosmovisor
sudo systemctl start cosmovisor
Check status
Copy
sudo systemctl status cosmovisor
Logs from cosmovisor
Copy
sudo journalctl -f -u cosmovisor
Next
Learn how to run validator