Skip to main content
Cosmovisor helps manage initiad binary upgrades automatically during chain upgrades.
Prerequisite: complete the Running L1 Nodes with Initiad guide first, then follow the steps below.

Install Cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Configure Cosmovisor

Set the daemon environment variables and initialize Cosmovisor. The <path-to-executable> must be the path to your initiad binary.
export DAEMON_HOME=~/.initia
export DAEMON_NAME=initiad

cosmovisor init <path-to-executable>
You can find the initiad path with:
which initiad

Update System Service (Optional)

If you run initiad as a service, update your initiad.service file:
[Unit]
Description=initiad

[Service]
Type=simple
User=ubuntu
ExecStart=/home/ubuntu/go/bin/cosmovisor run start --home /home/ubuntu/.initia
WorkingDirectory=/home/ubuntu/.initia
Restart=on-abort
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=initiad
LimitNOFILE=4096
Environment="DAEMON_NAME=initiad"
Environment="DAEMON_HOME=/home/ubuntu/.initia"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_RESTART_DELAY=5s"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
Reload and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart initiad
For more details, see the Cosmovisor documentation.