# Celestia Light Node - Mocha

By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-12-20

---

**Setup Celestia Light Client (Mocha Testnet) on a Ubuntu Linux 20.04 (LTS) x64 device.**

**Light Client:** conducts data availability sampling on the Data Availability network.

A setup script, for easy install is available here:

[

GitHub - GLCNI/celestia-node-scripts: deployment scripts for celestia nodes
---------------------------------------------------------------------------

deployment scripts for celestia nodes. Contribute to GLCNI/celestia-node-scripts development by creating an account on GitHub.

https://github.com

![](https://storage.googleapis.com/papyrus_images/e0ed20cc75ba37d28fb09f94147d5fdae53bab10ab8dd5fa5a566a7b0bc15abc.png)

](https://github.com/GLCNI/celestia-node-scripts)

**Hardware Requirements** : CPU: Single Core/ 2GB RAM/ Disk: 5 GB SSD/ 56Kbps Download/upload

This is incredibly lightweight requirements that you can even run on a Mobile phone, if you want to try this see

[https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/4UHV59sD23M2yeuLk17ukvJUzmgNo1pcnqQEcKsIkvM](https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/4UHV59sD23M2yeuLk17ukvJUzmgNo1pcnqQEcKsIkvM)

Install Pre-requisite Software
------------------------------

Update the system

    sudo apt update && sudo apt upgrade -y
    

Install packages required for a Light node

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

**Log in as root user**

A lot of steps will require and only work under root user

    sudo -i
    

you can exit root with `exit`

Install Go
----------

Go is a programming language in which Celestia celestia-app and celestia-node are written in.

    cd /tmp && wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz 
    tar -C /usr/local/ -xzf go1.19.1.linux-amd64.tar.gz
    

Add to PATH

    cd /usr/local/ && echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bashrc && echo "export GOROOT=/usr/local/go" >> ~/.bashrc && echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> /home//.bashrc && echo "export GOROOT=/usr/local/go" >> /home//.bashrc && source ~/.bashrc && source /home/*/.bashrc
    

confirm installation with

    go version
    

![you should have an output like this](https://storage.googleapis.com/papyrus_images/afe259985870a9c3e973073d88e099eb42538e7f228b14dd3d46dcbfbb09e32c.png)

you should have an output like this

Install Celestia-node
---------------------

Celestia Node is the software stack for Data availability nodes, Install the binary by running 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
    

confirm installation with

![you should have an output like this](https://storage.googleapis.com/papyrus_images/8d991b4fed4576104a43b3e5554ce623459d7405921eba559e26bcf5d21533ea.png)

you should have an output like this

Initialize Light Node
---------------------

    celestia light init
    

![you should have an output like this](https://storage.googleapis.com/papyrus_images/b5bc01f7cd3c10315ecb9d255ee1f3fe9255d4c55105436bb9d1897759efc1df.png)

you should have an output like this

Connect to gRPC endpoint
------------------------

Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090): This can be any validator node including your own.

Example Endpoint: [https://rpc-mocha.pops.one:9090](https://rpc-mocha.pops.one:9090) Available Endpoints: [https://docs.celestia.org/nodes/light-node/mocha-testnet#rpc-endpoints](https://docs.celestia.org/nodes/light-node/mocha-testnet#rpc-endpoints)

Example to place in system service file

    --core.ip https://rpc-mocha.pops.one:9090
    

Set up SystemD service for node
-------------------------------

setup to run as a background process with SystemD. This enables the node to run continuously in the background unless stopped.

    tee <<EOF >/dev/null /etc/systemd/system/celestia-lightd.service
    [Unit]
    Description=celestia-lightd Light Node
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=/usr/local/bin/celestia light start --core.ip <RPCENDPOINT>
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=4096
    
    [Install]
    WantedBy=multi-user.target
    EOF
    

**Enable and Start Service**

    systemctl enable celestia-lightd
    systemctl daemon-reload
    systemctl start celestia-lightd
    

**View Logs**

    journalctl -u celestia-lightd.service -f
    

![](https://storage.googleapis.com/papyrus_images/8a365632425f0011c0fd7ccbf3b73b8df09c28035af0d6ec2f485723b25c7a86.png)

Check service status

    systemctl status celestia-lightd
    

Wallet
------

Once you start the Light Node, a wallet key will be generated for you. You will need to fund that address with testnet tokens to pay for PayForData transactions.

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

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

![](https://storage.googleapis.com/papyrus_images/a43bef7ff411a8643b2f64b88f702d49d66a97ff4bcfbf8336f4cf0f4fd5b3b3.png)

The Address that’s displayed is what you fund in order to start pay for data transactions.

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/celestia-light-node-mocha)*
