telegramLight Node Setup for Testnet — mocha-4

Official documentation

Setting up a light node

Update packages and Install dependencies:

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc tar clang pkg-config libssl-dev ncdu -y

Install :

cd ~
! [ -x "$(command -v go)" ] && {
VER="1.23.1"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source ~/.bash_profile
}
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version

Download and build binaries:

cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.20.3-mocha
make build
sudo make install
make cel-key

Config and init app:

celestia light init --core.ip <RPC_NODE_IP> --p2p.network mocha

Create wallet:

KEY_NAME="my_celes_key"
cd ~/celestia-node
./cel-key add $KEY_NAME --keyring-backend test --node.type light --p2p.network mocha

(Optional) Restore an existing cel_key:

KEY_NAME="my_celes_key"
cd ~/celestia-node
./cel-key add $KEY_NAME --keyring-backend test --node.type light --p2p.network mocha --recover

You can find the address by running the following command in the celestia-node directory:

cd $HOME/celestia-node
./cel-key list --node.type light --keyring-backend test --p2p.network mocha

Create Service file and replace FULL node ip, RPC and gRPC ports:

sudo tee /etc/systemd/system/celestia-light.service > /dev/null <<EOF
[Unit]
Description=celestia light
After=network-online.target

[Service]
User=$USER
ExecStart=$(which celestia) light start \
--p2p.network mocha \
--metrics.tls=true --metrics --metrics.endpoint otel.celestia-mocha.com
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and start service:

sudo systemctl daemon-reload
sudo systemctl enable celestia-light
sudo systemctl restart celestia-light && sudo journalctl -u celestia-light -fo cat

Cheat sheet

Check light wallet balance:

celestia state balance --node.store ~/.celestia-light-mocha-4/

Get wallet address:

cd $HOME/celestia-node
./cel-key list --node.type light --keyring-backend test  --p2p.network mocha

Restore an existing cel_key:

KEY_NAME="my_celes_key"
cd ~/celestia-node
./cel-key add $KEY_NAME --keyring-backend test --node.type light  --recover --p2p.network mocha

Check light node status:

celestia header sync-state --node.store ~/.celestia-light-mocha-4/

Get Node ID:

celestia p2p info --node.store ~/.celestia-light-mocha-4/

(Optional) Add permissions for transferring keys to another server:

chmod -R 700 ~/.celestia-light-mocha-4

Reset node:

celestia light unsafe-reset-store --p2p.network mocha

Upgrade

Stop light node:

sudo systemctl stop celestia-light

Download binary:

cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.20.3-mocha 
make build 
sudo make install 
make cel-key

Update:

celestia light config-update --p2p.network mocha

Start light node:

sudo systemctl restart celestia-light && sudo journalctl -u celestia-light -fo cat

Delete light node

sudo systemctl stop celestia-light
sudo systemctl disable celestia-light
sudo rm /etc/systemd/system/celestia-light*
rm -rf $HOME/celestia-node $HOME/.celestia-app $HOME/.celestia-light-mocha
Copyright © 2025 ITRocket. All Rights Reserved.