Installation Guide for a Celestia Light Node. Oolong upgrade (mocha-3)

Cumulo
Cumulo.pro
Published in
6 min readJul 13, 2023

This tutorial will guide you through the step-by-step configuration of a Celestia light node. The following tutorial has been done on an Ubuntu Linux 20.04 (LTS) x64 version.

For more information you can access the official Celestia documentation on light nodes here:

https://docs.celestia.org/nodes/light-node/

Light nodes guarantee data availability. This is the most common way to interact with the Celestia network.

Table of contents

· Hardware requirements
· Setup the dependencies
· Golang installation
· Installation of the Celestia node
Initialise the light node
Start the light node
· Configure your node as a background process with SystemD
· Potential problems with light node
📌SystemD service does not run correctly
📌 After starting the light node a second time it returns a fatal error

Hardware requirements

The following minimum hardware characteristics are recommended for running a light node:

· Memory: 2 GB RAM

· CPU: Single core

· Disk: 25 GB SSD storage

· Bandwidth: 56 Kbps downstream/56 Kbps upstream

Setup the dependencies

Dependencies are essential packages that we need to run many tasks such as downloading files, compiling and monitoring the node:

Make sure you update your operating system:

sudo apt update && sudo apt upgrade -y

The following command will install the necessary dependencies to perform all the installation and configuration tasks for the node:

sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y

Golang installation

Celestia-app and celestia-node are written in Golang so we must install Golang to compile and run them.

The recommended version for mocha-3 is 1.20.2.

ver="1.20.2"
cd $HOME
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"

Add the /usr/local/go/bin directory to the $PATH:

echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Check if Go was installed correctly:

go version

The result should show the installed version:

go version go1.20.2 linux/amd64

Installation of the Celestia node

We will install the Mocha Testnet version (v0.11.0-rc7), although there is another version for developers called Arabica Devnet.

Install the celestia-node binary by executing the following commands:

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

Verify that the binary is working and check the version with the command:

celestia version

Initialise the light node

celestia light init

Start the light node

Start the light node with a connection to the gRPC endpoint of a validator node (which is normally on port 9090):

The — core.grpc.port defaults to 9090, so if you don’t specify it on the command line, it will default to that port.

celestia light start --core.ip <ip-address> --gateway.deprecated-endpoints --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network mocha-3

If you need a list of RPC ports to connect to, you can check the following list:

https://docs.celestia.org/nodes/mocha-testnet#rpc-endpoints

The command might look something like this:

celestia light start --core.ip celestia.cumulo.org.es --gateway.deprecated-endpoints --gateway --gateway.addr 127.0.0.1 --gateway.port 26659 --p2p.network mocha-3

The first time the light node is started it will detect that there is no wallet and will create one, save the wallet data in a safe place (NAME, ADDRESS, MNEMONIC).

You will see this data under the NEW KEY GENERATED line…

The next few times you start the light node it will display the following information:

The node is synchronising and functioning correctly:

You can view the address and details of your wallet with the command:

cd celestia-node
./cel-key list --node.type light --keyring-backend test

If it returns an error we must first install cel-key:

make cel-key

Configure your node as a background process with SystemD

SystemD is a daemon service useful for running applications as background processes.

Enter the following command to create the SystemD file, called celestia-lightd.service:

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

[Service]
User=$USER
ExecStart=$(which celestia) light start --core.ip rpc-mocha.pops.one
Restart=on-failure
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

If the file was created successfully, you will be able to view its contents with the following command:

cat /etc/systemd/system/celestia-lightd.service

Enable and start the celestia-lightd daemon:

sudo systemctl enable celestia-lightd
sudo systemctl start celestia-lightd

Check if the daemon started correctly:

systemctl status celestia-lightd

If everything is correct it should return a result similar to this:

To view the real-time daemon logs, use the following command:

sudo journalctl -u celestia-lightd.service -f

Potential problems with light node

📌SystemD service does not run correctly

Use the following command to see where the application is located:

which celestia 

In case the following route is returned:

/usr/local/bin/celestia

The file must be modified:

/etc/systemd/system/celestia-lightd.service

[Unit]
Description=celestia-lightd Light Node
After=network-online.target

[Service]
User=nodoconta
ExecStart=/usr/local/bin/celestia light start --core.ip https://rpc-mocha.pops.one:9090
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

📌 After starting the light node a second time it returns a fatal error

Delete the downloaded data and restart the light node:

sudo systemctl stop celestia-lightd

cd .celestia-light-mocha-3
cd data
sudo rm -rf *

celestia light init

Official links Celestia community

Web Celestia: https://celestia.org/

Twitter: https://twitter.com/CelestiaOrg

GitHub: https://github.com/celestiaorg/

Telegram: https://t.me/CelestiaCommunity

Reddit: https://www.reddit.com/r/CelestiaNetwork/

Blog: https://blog.celestia.org/

YouTube: https://www.youtube.com/channel/UCLlvAEzXBFZ-P3zS6BF2Bjg

Forum: https://forum.celestia.org/

We are Cumulo

Follow us : Twitter | Medium | LinkedIn | cumulo.pro

Follow us in our news channel

--

--