# Celestia Light Node on Mobile  - Mocha

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

---

**Setup Celestia Light Client (Mocha Testnet) on Mobile, ARM based device with Linux installed, this example using Pinephone with Mobian.**

_(last update: 17/5/23)_

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

This Guide is for running a Light node on an ARM device. such as a Mobile phone with Debian installed. This is experimental, the steps should be similar for other OS some setup might not be compatible and there may be extra difficulties. This is tested with Mobian.

A setup script, for easier install is available here:

[

celestia-node-scripts/multi-network at main · GLCNI/celestia-node-scripts
-------------------------------------------------------------------------

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/tree/main/multi-network)

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

Mobile with Linux
-----------------

If you can figure how to flash a phone with Linux, I’ll be using **Mobian**: a version of Debian compatible with ARM chips.

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

The process should be similar for any compatible OS and device. I am using [PinePhone](https://pine64.com/) an Open Source phone supporting existing Linux-on-phone projects. This has only **3GB RAM** and an internal flash memory of **32GB eMMC,** CPU: 64-bit Quad-core 1.2 GHz ARM Cortex A-53.

**Download OS and Image writer**

* * *

**NOTE:** **_this install method is now outdated (17/5/23)_**

as of April 3, 2022 release, Jumpdrive is no longer supported to flash the latest images of Mobian to pinephone, Towboot is now required, more information [here:](https://wiki.mobian-project.org/doku.php?id=install-linux)

last supported image: `mobian-pinephone-phosh-20220327.img.gz`

* * *

Here we can head to [Mobian](https://mobian-project.org/), head over to `images>pinephone>weekly` and download `mobian-pinephone-phosh-20211107.img.gz`

To experiment with other linux based mobile OS, they can be found [here](https://wiki.pine64.org/wiki/PinePhone_Software_Releases).

Now we need a image writer to flash the OS to the SD card, we can use [BalenaEtcher](https://www.balena.io/etcher/). just head to download and select for whatever OS you want to handle the SD card preparation. To run on Linux, we need to

Add Etcher Debian repository: will need curl `sudo apt install curl`

    curl -1sLf \
       'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh' \
       | sudo -E bash
    

update system

    sudo apt-get update
    

Install balenaEtcher on Ubuntu Linux

    sudo apt-get install balena-etcher-electron
    

This can be uninstalled later with

    sudo apt-get remove balena-etcher-electron
    sudo rm /etc/apt/sources.list.d/balena-etcher.list
    sudo apt-get update
    

**Format SD card**

[https://linuxconfig.org/formatting-sd-or-usb-disk-under-linux](https://linuxconfig.org/formatting-sd-or-usb-disk-under-linux)

**Write the Image to SD Card**

With balenaEtcher opened, we select ‘flash from file’ this will open your folders, navigate to the folder containing our Mobian image and select

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

Select Target, SD card, should be inserted into your device and recognized if formatted correctly will appear like so

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

Then click on ‘Flash’ and wait for the process to finish, then we can insert the SD into our phone and boot.

**_Alternative: flashing the internal Memory_**

If we want to just use the internal memory, we need Jumpdrive, can be downloaded [here](https://github.com/dreemurrs-embedded/Jumpdrive/releases/), using BalenaEtcher we can Flash the Jumpdrive image to a microSD card.

Insert the SD with Jumpdrive installed to your phones SD card slot, and when switched on it will enter a boot mode that makes your phone recognized as an external device that can be selected to write too via BalenaEtcher following the same steps above.

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

**Initial boot**

The Default Password for Mobian is: 1234

This will be the initial set-up which is self-explanatory, select your preferred language and time zone, etc. We can also configure network settings and connect to WiFi.

“Kings Cross” is the Terminal for Mobian.

**Install SSH**

Not only is it much easier for inputting commands, in the case of pinephone with mobian you can get locked out of the GUI when under root should the device fall asleep. Find ip with `ip a` and connect via [putty](https://www.putty.org/) or similar ssh program.

    sudo apt-get install openssh-server
    sudo systemctl enable ssh
    

if you have trouble see this [thread](https://forum.pine64.org/showthread.php?tid=10368).

Setup Celestia Light Node - Script (easy)
-----------------------------------------

The Easiest way to install Celestia Light node is via the script below and downloading the script for ARM devices,

[

celestia-node-scripts/multi-network at main · GLCNI/celestia-node-scripts
-------------------------------------------------------------------------

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/tree/main/multi-network)

from the $HOME directory, download and make executable

    wget https://raw.githubusercontent.com/GLCNI/celestia-node-scripts/main/multi-network/light-node-ARM.sh && chmod a+x light-node-ARM.sh
    

to run script

    ./light-node-ARM.sh
    

Setup Celestia Light Node - Manual (advanced)
---------------------------------------------

**Update Device**

For Mobian update via the built in software updater, do not run apt upgrade, as it will update packages that are not compatible with ARM it will make your phone go crazy.

**Change to root user**

    sudo -i
    

**Install packages**

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

_This command will take a while approximately 20-30 minutes_

**Install Go**

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

**add go 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 go installed

    go version
    

**Install Celestia node**

    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
    

**Initiate node as a light client**

    celestia light init
    

**Create system service to run light node**

Requires gRPC endpoint to connect to a validator node, replace the $RPC\_ENDPOINT with : available endpoint from [here](https://docs.celestia.org/nodes/mocha-testnet/#rpc-endpoints): tee <<EOF >/dev/null /etc/systemd/system/celestia-lightd.service \[Unit\] Description=celestia-lightd Light Node After=network-online.target \[Service\] User=root ExecStart=/usr/local/bin/celestia light start --core.ip $RPC\_ENDPOINT 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 Logs can be viewed with journalctl -u celestia-lightd.service -f The service can be stopped with systemctl stop celestia-lightd Set up wallet A wallet is created for you on start up, to pay for data transactions this must be funded, you can find wallet with (in /celestia-node) ./cel-key list --node.type light --keyring-backend test

---

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