Celestia Light Node Installation Guide
Mocha testnet
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 ensure data availability. This is the most common way to interact with the Celestia network.
Hardware requirements
The following minimum hardware features are recommended to run a light node:
· Memory: 2 GB RAM
· CPU: Single core
· Disk: 5 GB SSD storage
· Bandwidth: 56 Kbps Download/56 Kbps Upload
· Configure your node as a background process with SystemD
Updating 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
Celestia-app and celestia-node are written in Golang so we must install Golang to compile and run them.
The recommended version for Mocha is go1.19.1.
ver="1.19.1"
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.19.1 linux/amd64
Installing the Celestia node
We will install the Mocha Testnet version (v0.6.0), 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.6.0
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> --core.grpc.port <port>
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 https://rpc-mocha.pops.one:9090
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:
./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=$HOME/go/bin/celestia light start --core.ip https://rpc-mocha.pops.one:9090
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Si el archivo se creó correctamente, podrás ver su contenido con el siguiente comando:
cat /etc/systemd/system/celestia-lightd.service
Habilita y arranca el demonio celestia-lightd daemon:
sudo systemctl enable celestia-lightd
sudo systemctl start celestia-lightd
Comprueba si el demonio se inició correctamente:
systemctl status celestia-lightd
Si todo está correcto debería devolver un resultado similar a este:
Para ver los registros de demonio en tiempo real utiliza el siguiente comando:
sudo journalctl -u celestia-lightd.service -f
Ya tienes configurado tu servicio SystemD que te permitirá correr el light node en segundo plano.
Posibles problemas con light node
No ejecuta correctamente el servicio SystemD
Utiliza el siguiente comando para ver dónde se encuentra localizada la aplicación:
which celestia
En el caso de que nos devuelva la siguiente ruta:
/usr/local/bin/celestia
Debemos modificar el fichero
/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
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
ou have now configured your SystemD service that will allow you to run the light node in the background.
Possible problems with light node
Not running the SystemD service correctly
Use the following command to see where the application is located:
which celestia
In the event that the following route is returned:
/usr/local/bin/celestia
We must modify the file
/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
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/