Celestia Validator — Quick Setup Guide

Luke Bjorn Scerri
Simply Staking
Published in
5 min readJun 14, 2022

In this guide, we will go through the step-by-step process of setting up and running a validator on the Mamaki Testnet.

System requirements

Recommended infrastructure obtained from the Celestia docs, is the following:

  • Memory: 8 GB RAM
  • CPU: Quad-Core
  • Disk: 250 GB SSD Storage
  • Bandwidth: 1 Gbps for Download/100 Mbps for Upload

Install dependencies

1. Check for updates, upgrade and install dependencies.

sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install build-essential jq curl -y

Install Go

# First remove any existing old Go installation
sudo rm -rf /usr/local/go
sudo rm -rf ~/go
# Install correct Go version
sudo wget https://golang.org/dl/go1.18.linux-amd64.tar.gz
sudo tar -xvf go1.18.linux-amd64.tar.gz
sudo rm go1.18.linux-amd64.tar.gz
sudo mv go /usr/local

Create user

2. Create and switch to a user ‘validator’ for running the node:

# --disabled-login is a more secure way of creating the user because it can only be accessed through rootsudo adduser validator --disabled-login
su validator

3. Create the GO working path folder for Celestia and set the appropriate GO environmental variables to the user’s profile:

mkdir ~/go
echo 'GOROOT=/usr/local/go' >> ~/.bashrc
echo 'GOPATH=~/go' >> ~/.bashrc
echo 'PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc
#We use source to make the changes of the file applicable
source .bashrc
#Check that GOROOT and GOPATH are correctly set
echo $GOROOT
echo $GOPATH

Get the Celestia binary

4. Retrieve the source code

cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git

5. Switch to the correct branch

cd celestia-app/APP_VERSION=$(curl -s \
https://api.github.com/repos/celestiaorg/celestia-app/releases/latest \
| jq -r ".tag_name")
git checkout tags/$APP_VERSION -b $APP_VERSION

6. Compile and install

make install

Check if celestia-appd installed successfully

celestia-appd --help

7. Configure celestia-appd to run a validator

Manually change mode to “validator” in .celestia-app/config/config.toml or do it in one line with sed:

sed -i.bak -e "s/^mode *=.*/mode = \"validator\"/" $HOME/.celestia-app/config/config.toml

Configure celestia-appd as a service

8. We will now run our executable as a service in order for it to be easily managed. In your system directory as a root user at /etc/systemd/system create a new service file named validator.service

nano validator.service

Paste in the following and make any changes if needed

[Unit]
Description=celestia-appd Cosmos daemon
After=network-online.target
[Service]
User=validator
ExecStart=/home/validator/go/bin/celestia-appd start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target

The following are systemctl commands, used to manage your service:

#Enable automatic restart of your daemon
systemctl enable validator.service
#To reload your systemd files, run this after you have edited your service file
systemctl daemon-reload
#Restart your service
systemctl restart validator.service
#Start your service
systemctl start validator.service
#Stop your service
systemctl stop validator.service
#View logs
journalctl -u validator.service -f

Create keys

Change user back to the user ‘validator’, su validator

Create key

#Create key
celestia-appd keys add <replace with key name>
#View created keys
celestia-appd keys list

In order to set up a validator, you need to have some utia. You can obtain some from the faucet channel on the Celestia discord, by writing $request <address> for example:

$request celestia13we4uxrqkyjfrgltc29y3yv7uuyc9jqymyfrzp

Create validator

To create your validator, make sure you are fully synced to the latest block height of the network.

You can check by using the following command:

curl -s localhost:26657/status | jq .result | jq .sync_info

In the output of the above command make sure catching_up is false

“catching_up”: false

Create transaction

MONIKER="your_moniker" #This is the public name of your validator
VALIDATOR_WALLET="change this to the same wallet name used previously"

celestia-appd tx staking create-validator \
--amount=1000000utia \
--pubkey=$(celestia-appd tendermint show-validator) \
--moniker="$MONIKER" \
--chain-id=mamaki \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000000 \
--from="$VALIDATOR_WALLET" \

Use the transaction hash to check if the transaction was successful on the explorer https://celestia.explorers.guru/

That’s it now you can find your validator operator address using the following command, which you can advertise to receive delegations:

celestia-appd keys show <wallet name> --bech val -a

Monitoring your node/nodes is key to maintaining uptime and mitigating any shortfalls, which may result in your validator being slashed. You can check out our open source monitoring and alerting solution for Cosmos nodes, PANIC by Simply Staking. It is compatible with any chain built using the Cosmos SDK, such as Celestia.

Useful Commands

Create a wallet

celestia-appd keys add <wallet_name>

Recovering a wallet

celestia-appd key add <wallet_name> --recover

List all the wallets and their addresses and public keys:

celestia-appd keys list

Checking wallet balance

celestia-appd q bank balances <wallet_address>

Show valoper address

celestia-appd keys show <wallet name> --bech val -a

Check binary version

celestia-appd version --long

Retrieve the node ID

celestia-appd tendermint show-node-id

Create a validator

celestia-appd tx staking create-validator \
--amount=1000000utia \
--pubkey=$(celestia-appd tendermint show-validator) \
--moniker="moniker" \
--chain-id=mamaki \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000000 \
--from="wallet name" \

Check node status

curl localhost:26657/status

Check synchronization status

curl -s localhost:26657/status | jq .result.sync_info.catching_up

Check the maximum number of validators in the active set

celestia-appd q staking params | grep max_validators

Display a list of Bonded validators

celestia-appd q staking validators -o json --limit=1000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '.tokens + " - " + .description.moniker' | sort -gr | nl

Display a list of Unbonded validators

celestia-appd q staking validators -o json --limit=1000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '.tokens + " - " + .description.moniker' | sort -gr | nl

Concluding remarks

Celestia relies on a set of validators to secure the network, therefore as a validator, your role is to run a full-node and participate in consensus by signing and committing new blocks.

The purpose of the testnet, other than test the durability and functionality of the chain, is for anyone to experience and get acquainted with the process of running a node on the network. Therefore, it is encouraged to ask questions and experiment with different configurations, as it exists for this purpose.

Ultimately, running a validator on Celestia is a great opportunity to interact with the chain before it goes live on mainnet.

Learn more about Celestia here: https://celestia.org/

Stay tuned to Simply Staking for more Celestia related guides and documentation:

--

--