Node9X Service
  • 🍄MAINNET
    • đŸŸĸKopi Protocol
      • 💾Service & Snapshot
      • âš™ī¸Installation
      • â›“ī¸Upgrade (V11)
      • đŸĒĸCosmovisor
      • đŸ›°ī¸Command
  • 🚀Testnet
    • đŸ§ŦExplorer
    • đŸŸĸNative
      • âš™ī¸Installation
    • đŸŸĸXRPL EVM
      • 💾Service & Snapshot
      • âš™ī¸Installation
      • đŸ•šī¸Command
    • đŸŸĸPipe Network
      • Installation
      • Upgrade
    • đŸŸĸPell
      • 💾Service & Snapshot
      • âš™ī¸Installation
      • â›“ī¸Upgrade (v1.1.1)
      • đŸ•šī¸Command
    • đŸŸĸStructs
      • 💾Service & Snapshot
      • âš™ī¸Installation
      • đŸ•šī¸Command
    • đŸŸĸPrysm
      • đŸ›°ī¸Service & Snapshot
      • âš™ī¸Installation
      • 💾Command
    • đŸŸĸZenrock
      • 💾Service & Snapshot
      • âš™ī¸Installation
      • â›“ī¸Upgrade ( v6.3.3)
      • đŸ•šī¸Cosmovisor
      • đŸ›°ī¸Command
      • âš™ī¸Sidecar (âœ”ī¸Oracle)
        • 🔗Upgrade
    • đŸŸĸStory Protocol
      • 💾Service & Snapshot
      • âš™ī¸Installation (Odyssey)
      • â›“ī¸Upgrade (v0.13.1)
        • đŸĒĸUpgrade (v0.13.0)
      • â›“ī¸Cosmovisor
      • đŸ›°ī¸Command
    • đŸŸĸ0G Chain
      • Service & Snapshot
      • Installation
        • Cosmovisor
      • Commands
      • â˜‘ī¸0G Storage Node
        • Upgrade (v0.7.3)
      • â˜‘ī¸0G Storage KV
      • â˜‘ī¸0G DA Node
        • Update
      • â˜‘ī¸0G DA Client
    • đŸŸĸAirchains
      • 💾Service & Snapshot
      • âš™ī¸Installation
        • đŸĒĸCosmovisor
        • đŸ”ēEVM ZK Rollup
      • đŸ•šī¸Commands
      • â›“ī¸Upgrade
    • đŸŸĸAllora
      • đŸ”ēWorkers
        • Create tool and worker wallet
        • Install Worker 1
        • Install Worker 2
        • Troubleshooting
        • Script for checking worker
      • Another method
      • Service
      • Installation By Dock (Recommend)
      • Installation
      • Snapshot & State sync
      • Useful commands
    • đŸŸĸHedge Block
      • Service
      • Installation
      • Commands
    • đŸŸĸDill Chain
      • Usage Commands
    • đŸŸĸFiamma Chain
      • đŸĨĻServices & Snapshot
      • âš™ī¸Installation
      • đŸ›°ī¸Usage Command
    • đŸŸĸElixir Testnet
      • âš™ī¸Installation
    • đŸŸĸChainbase
      • â›“ī¸Installation
    • 🔘AXONE Protocol
      • 💾Service & Snapshot
      • âš™ī¸Installation
    • 🔘Symphony
      • 🔌Installation
      • đŸĨĻFresh Peer
    • 🔘Empeiria
      • Installation
      • Usage Command
Powered by GitBook
On this page
  • Install Cosmovisor
  • Download install script:
  • Check script content:
  • Run script:
  • Download binary v0.2.0
  • Verify the Setup
  • Update service file:

Was this helpful?

  1. Testnet
  2. Airchains
  3. Installation

Cosmovisor

Install Cosmovisor

  • Check go version #requirement go version above v.1.22 if you have Go v.1.22 already. Please skip install Go step.

cd $HOME && \
ver="1.22.3" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile && \
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

Download install script:

cd $HOME
wget https://raw.githubusercontent.com/0xChicharito/Cosmovisor/refs/heads/main/init-cosmovisor.sh

Check script content:

nano init-cosmovisor.sh
#!/bin/bash

if [ -z "$1" ]; then
    echo "Usage: $0 <Junction Home>"
    exit 1
fi

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

export DAEMON_NAME=junctiond
echo "export DAEMON_NAME=junctiond" >> $HOME/.bash_profile
export DAEMON_HOME=$1
echo "export DAEMON_HOME=$1" >> $HOME/.bash_profile
cosmovisor init $(whereis -b junctiond | awk '{print $2}')
mkdir $DAEMON_HOME/cosmovisor/backup
echo "export DAEMON_DATA_BACKUP_DIR=$DAEMON_HOME/cosmovisor/backup" >> $HOME/.bash_profile
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> $HOME/.bash_profile

Run script:

source $HOME/.bash_profile
chmod +x init-cosmovisor.sh
./init-cosmovisor.sh $HOME/.junction
source $HOME/.bash_profile

Download binary v0.2.0

cd $HOME
wget -O junctiond https://github.com/airchains-network/junction/releases/download/v0.2.0/junctiond-linux-amd64
chmod +x junctiond
mkdir -p $HOME/.junctiond/cosmovisor/upgrades/jip-2/bin
mv junctiond $HOME/.junctiond/cosmovisor/upgrades/jip-2/bin/

Verify the Setup

# Check the new binary version
$HOME/.junctiond/cosmovisor/upgrades/jip-2/bin/junctiond version

Update service file:

sudo tee /etc/systemd/system/junctiond.service > /dev/null <<EOF
[Unit]
Description=Cosmovisor Junctiond Node
After=network.target

[Service]
User=root
Type=simple
ExecStart=/root/go/bin/cosmovisor run start
Restart=on-failure
LimitNOFILE=65535
Environment="DAEMON_NAME=junctiond"
Environment="DAEMON_HOME=/root/.junction"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_DATA_BACKUP_DIR=/root/.junctiond/cosmovisor/backup"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl restart junctiond && sudo journalctl -u junctiond -f

Hint

To schedule an upgrade to a new client version at a specific block height, cosmovisor should already be running. Once confirmed, open a separate terminal and run:

cosmovisor add-upgrade v0.2.0 /root/.junction/cosmovisor/upgrades/jip-2/bin/junctiond --force --upgrade-height 2383911
PreviousInstallationNextEVM ZK Rollup

Last updated 1 month ago

Was this helpful?

🚀
đŸŸĸ
âš™ī¸
đŸĒĸ