Skip to main content

Setup your node

Install pre requis

sudo apt-get update && sudo apt upgrade -y 
sudo apt-get install make build-essential gcc git jq chrony -y

Install go

sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
rm go1.19.1.linux-amd64.tar.gz

Setting up go

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin

Install Node

Install the Juno-node binary by running the following commands

#from $HOME dir 
git clone https://github.com/CosmosContracts/juno
cd juno
git fetch
git checkout v12.0.0
make install

To confirm that the node is well installed

junod version

#v12.0.0

Setting up the Node

Initialization node

Please choose your MONIKER name, it will represent your node

junod init MONIKER_NAME --chain-id juno-1

This will generate severals files in ~/.juno/config/

  • node_key.json
  • genesis.json
  • priv_validator_key.json

Download and replace the genesis file

rm ~/.juno/config/genesis.json 
wget https://download.dimi.sh/juno-phoenix2-genesis.tar.gz
tar -xvf juno-phoenix2-genesis.tar.gz
mv juno-phoenix2-genesis.json ~/.juno/config

Set minimum gas prices

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025ujuno,0.001ibc\/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9\"/" ~/.juno/config/app.toml

Node connexion

In order to connect the node you can either use seeds, Lives peers or address book.

Set Seeds

export SEEDS="$(curl -sL "https://raw.githubusercontent.com/CosmosContracts/mainnet/main/juno-1/seeds.txt")"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" ~/.juno/config/config.toml

Setup service file

[Unit]
Description="juno node"


[Service]
User=USER
ExecStart=$(which junod) start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target

If you'd like to synchronise a node from a snapshot check the snapshot part

Start service file

systemctl daemon-reload
systemctl start juno.service | journalctl -u juno.service -f