Page cover

Run a Node

This guide assumes you're running on Ubuntu 22.04 LTS - the commands will probably work just fine on 20.04 LTS or Debian.

Basic machine setup

  1. SSH into your node

  2. Update your machine (Answer yes / ok to the prompts)

sudo apt update && sudo apt dist-upgrade -y
  1. Install required tools

sudo apt install build-essential git unzip curl wget

Prepare environment

Create the kuji user and switch to it

sudo useradd -m kuji
sudo su -s /bin/bash -l kuji

Install Golang

  1. Download go 1.21.8

# remove old go version
sudo rm -rvf /usr/local/go/

# download recent go version
wget https://golang.org/dl/go1.21.8.linux-amd64.tar.gz

# install go
sudo tar -C /usr/local -xzf go1.21.8.linux-amd64.tar.gz

# remove unneeded installer
rm go1.21.8.linux-amd64.tar.gz

# source go
cat <<EOF >> ~/.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 ~/.profile
go version

Now we build!

  1. Download the project code and checkout to testnet branch

  1. Build and install kujirad (using the kuji user created above)

  1. Verify your binary is working

Running the node

If the build succeeds, you should now have the kujirad cli in your path (of the kuji user).

Try invoking with kujirad and you should see output like

Join the network

Now we can initialize the node and join the network.

  1. Initialize node's configuration files

Replace the <moniker name> with your desired validator name.

  1. Fetch the genesis genesis.json file

Mainnet

Testnet

  1. Download the addrbook.json file

Mainnet

Testnet

Fix your gas fee settings in $HOME/.kujira/config/app.toml

Where these individual prices are as follows:

And update the commit times in $HOME/.kujira/config/config.toml

Now start the node

And then watch a whole bunch of log messages while your node is catching up. After making sure that it works, it's time to install it as a system level service so it always starts with the machine.

Register the node as a service

Drop out of the kuji user if you're still in that terminal session. Write exit or type ctrl+d on your keyboard.

  1. Create a service definition file in /etc/systemd/system/kujirad.service. Example file that fits with our kuijrad install and kuji runtime user

  1. Reload your systemctl and enable the service:

  1. And finally start the service:

  1. Check the status of the service:

It should return something like

  1. Check kujirad service logs

And the sync status (make sure jq is installed)

Create the validator

Once your node has synced, it's time to create a validator. It can be done on a separate machine if preferred.

Create a key that will be the validators key.

Replace the <wallet name> with your desired validator wallet name.

Copy the seed phrase and put it somewhere safe.

You will need to make note of the address kujira... and use that in the faucet to get some coins. You can check your balance via

The next part is associating your node with your account, creating the validator

Now your node should be present

or JSON output

Please remember to also back up $HOME/.kujira/config/priv_validator_key.json. If you lose this, you are toast.

Tips

Disk utilization

To help manage the disk size you can prune the blocks being kept. for this I use prime numbers pick your own in app.toml

You should also check what you are indexing

Adding more peers

You should modify /etc/security/limits.conf and add

You can then modify the config.toml to increase connections. This may cost you more in ingress/egress charges.

Last updated