Installation
Current Version
Port Prefix
v28.0.2
126
Minimum hardware Requirements #
CPU : 4x CPUs
Ram : 8GB RAM
Storage: 100GB of storage (SSD or NVME)
Setting Variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export juno_CHAIN_ID="uni-7"" >> $HOME/.bash_profile
echo "export juno_PORT="126"" >> $HOME/.bash_profile
echo "export DAEMON_NAME="junod"" >> $HOME/.bash_profile
echo "export DAEMON_HOME=$HOME/.juno"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Install dependencies
sudo apt update && sudo apt upgrade -y && sudo apt-get install make build-essential gcc git jq chrony lz4 tmux unzip bc -y && sudo apt install -y curl git jq lz4 build-essential unzip
INSTALL GO
ver="1.20.5" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
# Adding Go's location to profile
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Download and build binary
# Clone project repository
cd $HOME
rm -rf juno
git clone https://github.com/CosmosContracts/juno
cd juno
git checkout v28.0.2
# Build binaries
make install
# Prepare binaries for Cosmovisor
mkdir -p $HOME/.juno/cosmovisor/genesis/bin
cp $HOME/go/bin/junod $HOME/.juno/cosmovisor/genesis/bin/
# Create application symlinks
sudo ln -s $HOME/.juno/cosmovisor/genesis $HOME/.juno/cosmovisor/current -f
sudo ln -s $HOME/.juno/cosmovisor/current/bin/junod /usr/local/bin/junod -f
Installing Cosmovisor
# Download and install Cosmovisor
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
# Create service
sudo tee /etc/systemd/system/juno.service > /dev/null << EOF
[Unit]
Description=juno node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.juno"
Environment="DAEMON_NAME=junod"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
# Reload Daemon
sudo systemctl daemon-reload
sudo systemctl enable juno.service
Initialize Node & Configuring Node Port
# Set node configuration
junod init $MONIKER --chain-id uni-7
junod config node tcp://localhost:12657
junod config keyring-backend file
# Set custom ports in client.toml
sed -i.bak -e "s%:26457%:${juno_PORT}57%g" $HOME/.juno/config/client.toml
# Set custom ports in app.toml
sed -i.bak -e "s%:1317%:${juno_PORT}17%g;
s%:8080%:${juno_PORT}80%g;
s%:9090%:${juno_PORT}90%g;
s%:9091%:${juno_PORT}91%g;
s%:8545%:${juno_PORT}45%g;
s%:8546%:${juno_PORT}46%g;
s%:6065%:${juno_PORT}65%g" $HOME/.juno/config/app.toml
# Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${juno_PORT}58%g;
s%:26657%:${juno_PORT}57%g;
s%:6060%:${juno_PORT}60%g;
s%:26656%:${juno_PORT}56%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${juno_PORT}56\"%;
s%:26660%:${juno_PORT}60%g" $HOME/.juno/config/config.toml
# Download genesis and addrbook
wget -O $HOME/.juno/config/genesis.json https://files.nodeshub.online/testnet/juno/genesis.json
wget -O $HOME/.juno/config/addrbook.json https://files.nodeshub.online/testnet/juno/addrbook.json
# Add Seeds and Peers
SEEDS="6f6a3a908634b79b6fe7c4988efec2553f188234@juno.test.seed.nodeshub.online:12656"
PEERS="$(curl -s https://files.nodeshub.online/mainnet/juno/peers.txt)"
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|; s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.juno/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.25ujuno\"|" $HOME/.juno/config/app.toml
# Set pruning and indexer to Null
sed -i -e "s/^pruning =./pruning = "custom"/" $HOME/.juno/config/app.toml sed -i -e "s/^pruning-keep-recent =./pruning-keep-recent = "100"/"
$HOME/.juno/config/app.toml sed -i -e "s/^pruning-interval =./pruning-interval = "50"/" $HOME/.juno/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.juno/config/config.toml
Download Snapshot
sudo systemctl stop juno
# Back up priv_validator_state.json if needed
cp ~/.juno/data/priv_validator_state.json ~/.juno/priv_validator_state.json.backup.backup
# Reset Data Folder
junod tendermint unsafe-reset-all --home $HOME/.juno --keep-addr-book
SNAP_URL=$(curl -s https://files.nodeshub.online/testnet/juno/snapshot/snap-info.txt | grep "Snapshot_URL" | cut -d ' ' -f 2)
curl ${SNAP_URL} | lz4 -dc - | tar -xf - -C $HOME/.juno
cp $HOME/.juno/priv_validator_state.json.backup $HOME/.juno/data/priv_validator_state.json
sudo systemctl restart juno && sudo journalctl -u juno -f -o cat
Start service and check the logs
sudo systemctl start juno.service && sudo journalctl -u juno -f -o cat
Last updated