This guide is created under the assumption you are using Ubuntu 22.04 LTS If you use other OS, please modify the commands accordingly
export INSTALLATION_DIR=${HOME}/appl
export DAEMON_NAME=junctiond
export DAEMON_HOME=${HOME}/.junction
export SERVICE_NAME=junctiond-testnet
export MONIKER="YOUR_NODE_NAME_HERE"
export WALLET="YOUR_WALLET_NAME_HERE"
echo 'export DAEMON_NAME=${DAEMON_NAME}' >> ~/.profile
echo 'export DAEMON_HOME=${DAEMON_HOME}' >> ~/.profile
echo 'export DAEMON_ALLOW_DOWNLOAD_BINARIES=true' >> ~/.profile
echo 'export DAEMON_RESTART_AFTER_UPGRADE=true' >> ~/.profile
echo 'export DAEMON_LOG_BUFFER_SIZE=512' >> ~/.profile
source ~/.profile
mkdir -p ${INSTALLATION_DIR}/bin
mkdir -p ${DAEMON_HOME}/cosmovisor/genesis/bin
mkdir -p ${DAEMON_HOME}/cosmovisor/upgrades
Install and Setup Airchains Daemon
cd ${INSTALLATION_DIR}
#Download Junction Daemon and basic setup
wget https://github.com/airchains-network/junction/releases/download/v0.1.0/junctiond
chmod +x ${DAEMON_NAME}
mv ${DAEMON_NAME} ${INSTALLATION_DIR}/bin
#Download and install cosmovisor
wget https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-amd64.tar.gz
tar -xvzf cosmovisor-v1.5.0-linux-amd64.tar.gz
#Copy Binaries
cp cosmovisor ${INSTALLATION_DIR}/bin/cosmovisor
cp ${INSTALLATION_DIR}/bin/${DAEMON_NAME} ${DAEMON_HOME}/cosmovisor/genesis/bin
sudo ln -s ${INSTALLATION_DIR}/bin/cosmovisor /usr/local/bin/cosmovisor -f
sudo ln -s ${DAEMON_HOME}/cosmovisor/genesis ${DAEMON_HOME}/cosmovisor/current -f
sudo ln -s ${DAEMON_HOME}/cosmovisor/current/bin/${DAEMON_NAME} /usr/local/bin/${DAEMON_NAME} -f
junctiond --home ${DAEMON_HOME} version
#If you want to create new wallet
junctiond --home ${DAEMON_HOME} keys add ${WALLET}
#If you already have wallet and want to use same phrase
junctiond --home ${DAEMON_HOME} keys add ${WALLET} --recover
junctiond --home ${DAEMON_HOME} keys list
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 = "10"|' \
${DAEMON_HOME}/config/app.toml
sudo tee /etc/systemd/system/junctiond-testnet.service > /dev/null <<EOF
[Unit]
Description=Airchain Testnet Daemon (cosmovisor)
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home ${DAEMON_HOME}
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=${DAEMON_NAME}"
Environment="DAEMON_HOME=${DAEMON_HOME}"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable junctiond-testnet.service
sudo systemctl start junctiond-testnet.service
sudo journalctl -xfu junctiond-testnet
rm -f cosmovisor-v1.5.0-linux-amd64.tar.gz
rm -f README.md CHANGELOG.md LICENSE readme.md cosmovisor