Cosmovisor is a sophisticated process manager designed to facilitate an effortless alternative to the conventional initiad start command. It is tailored for use both manually and as a system service, providing seamless automatic updates for blockchains that utilize the Cosmos SDK.
export DAEMON_HOME=~/.initiaexport DAEMON_NAME=initiadcosmovisorinit`<path-to-executable>`# copy two shared libraries `libmovevm.x86_64.so` and `libcompiler.x86_64.so`cp`<shared-library-path>` $DAEMON_HOME/cosmovisor/current/# only if there is planned upgradeexport UPGRADE_NAME=<upgrade-name>mkdir-p $DAEMON_HOME/cosmovisor/upgrades/$UPGRADE_NAME/bincp`<path-to-upgrade-executable>` \`<path-to-upgrade-shared-library>` \ $DAEMON_HOME/cosmovisor/upgrades/$UPGRADE_NAME/bin
Step 3: Set up System Service File
[Unit]Description=initiad[Service]Type=simpleUser=ubuntuExecStart=/home/ubuntu/go/bin/cosmovisor run start --home /home/ubuntu/.initiaWorkingDirectory=/home/ubuntu/.initiaRestart=on-abortStandardOutput=syslogStandardError=syslogSyslogIdentifier=initiadLimitNOFILE=infinityEnvironment="DAEMON_NAME=initiad"Environment="DAEMON_HOME=/home/ubuntu/.initia"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"# recommend to set false and manually build from the source codeEnvironment="DAEMON_RESTART_AFTER_UPGRADE=true"Environment="LD_LIBRARY_PATH=/home/ubuntu/.initia/cosmovisor/current"[Install]WantedBy=multi-user.target