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
SSH into your node
Update your machine (Answer yes / ok to the prompts)
sudo apt update && sudo apt dist-upgrade -yInstall required tools
sudo apt install build-essential git unzip curl wgetPrepare environment
Create the kuji user and switch to it
sudo useradd -m kuji
sudo su -s /bin/bash -l kujiInstall Golang
Download
go1.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 versionNow we build!
Download the project code and checkout to testnet branch
Build and install
kujirad(using thekujiuser created above)
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.
Initialize node's configuration files
Replace the <moniker name> with your desired validator name.
Fetch the genesis
genesis.jsonfile
Mainnet
Testnet
Download the
addrbook.jsonfile
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.
Create a service definition file in
/etc/systemd/system/kujirad.service. Example file that fits with ourkuijradinstall andkujiruntime user
Reload your systemctl and enable the service:
And finally start the service:
Check the status of the service:
It should return something like
Check
kujiradservice 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


