# Celestia on Mobile 

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

---

Celestia Light Client on Mobile (Linux/ARM)
===========================================

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

Nodes on Celestia
-----------------

A light client allows some security with lower resources, it makes an honest majority assumption that the validator set (which has its own economic incentives) is acting within the rules. this allows you to follow the chain but not have to verify everything yourself.

Celestia node operators can run several options on the network: • Bridge Node (This node bridges blocks between the Data-Availability network and the Consensus network) • Validator Node (Node operators who run a Bridge Node have the option to also participate in Consensus by becoming a validator) • Light Client (Light clients conduct data availability sampling on the Data Availability network)

Light Client on Mobile (Linux/ARM)
==================================

Using a Linux based phone, made by [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

Comes with an expansion slot for micro SD, which we will be using for our Linux distribution as the pre-installed Manjaro OS is difficult to get working with what we intend to run. This Is cost efficient $150 Really low specs phone and could run a light client no problem.

**Download OS and Image writer**

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

Other OS can be found [here](https://wiki.pine64.org/wiki/PinePhone_Software_Releases), I’ve tried with Ubuntu Touch & Manjaro and had too many problems that I can’t solve. PinePhone is set to boot from SD if it contains a compatible OS

**Mobian**: a version of Debian compatible with ARM chips, it’s the closest I could get to Ubuntu Linux

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

Now we need a image writer to flash the OS to the SD card, we can use [**BalenaEtcher**](https://www.balena.io/etcher/)

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

just head to download and select for whatever OS you want to handle the SD card preparation. To run on Linux, we need to

*   Unzip the download
    
*   Assign Execute Permissions to the AppImage File
    
*   Run
    

**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/949a3208d3f1d9804b10bf0320583c75aef829de5ba90c48a92d5ba2809d49d0.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/413a887142ca137db7aea1d81ac5bb5f328165c7d20c7f0c68a2fd7f3c05d6ff.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 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/be73f629db8575d22994b23dc1b2a31236fb871b9968fcc1a99bf27193d89331.png)

**Initial boot**

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.

The Default Password for Mobian is: 1234

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

Head over to Kings Cross, which is the Terminal for Mobian.

_Easiest way to follow this doc is to copy the commands here to a .txt file and save to a USB, if you connect this to your phone via the USB it should recognize the drive and be able to open the text file._

**Update**

`Sudo apt update`

_Do not run apt upgrade, as it will update packages that are not compatible with ARM it will make your phone go crazy, for updating it should be done via the software updater that comes with the OS_

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

**Install packages**

`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 minutes, so don’t panic and come back to it when you get a notification on the phone saying ‘command completed’

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

**Install Go**

Celestia Node is built with Go, and we need to download a version compatible with ARM, the version can be changed by replacing the 1.18.1 with whatever version, but I got it working with 1.18.1

    
    cd $HOME
    wget "https://golang.org/dl/go1.18.1.linux-arm64.tar.gz"
    sudo rm -rf /usr/local/go
    sudo tar -C /usr/local -xzf "go1.18.1.linux-arm64.tar.gz"
    rm "go1.18.1.linux-arm64.tar.gz"
    echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.bash_profile
    source $HOME/.bash_profile
    
    go version
    

if all successful you should see the version of Go returned like so

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

**Build Celestia**

    cd $HOME
    rm -rf celestia-node
    git clone https://github.com/celestiaorg/celestia-node.git
    cd celestia-node
    git checkout v0.2.0
    make install
    

This also takes a while, when finished run the following

    export PATH=$PATH:$HOME/go/bin
    
    celestia version
    

Like with checking the Go version we should see the version of Celestia returned

**Start the Light Client**

To start the light client run this

    celestia light init
    

Now we need to add bootstrap peers for our light client to sync to, check in with the Celestia community should these change.

    BootstrapPeers="[\"/dns4/andromeda.celestia-devops.dev/tcp/2121/p2p/12D3KooWKvPXtV1yaQ6e3BRNUHa5Phh8daBwBi3KkGaSSkUPys6D\", \"/dns4/libra.celestia-devops.dev/tcp/2121/p2p/12D3KooWK5aDotDcLsabBmWDazehQLMsDkRyARm1k7f1zGAXqbt4\", \"/dns4/norma.celestia-devops.dev/tcp/2121/p2p/12D3KooWHYczJDVNfYVkLcNHPTDKCeiVvRhg8Q9JU3bE3m9eEVyY\"]"
    
    sed -i -e "s|BootstrapPeers *=.*|BootstrapPeers = $BootstrapPeers|" $HOME/.celestia-light/config.toml
    

**Create system service for client**

This allows Celestia light client to run in the background, if you close the terminal or restart the phone, it will allow you to use the phone for other things

    
    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
      Restart=on-failure
      RestartSec=10
      LimitNOFILE=4096
    [Install]
      WantedBy=multi-user.target
    EOF
    

You will be prompted here and need to allow, the next commands enable and start the service which will output the logs to the terminal

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

Node is running in the background now, we can use CTRL + C to exit the logs and return to terminal and close it.

To check services running

    sudo systemctl status celestia-light
    

and to run the logs again to check

    sudo journalctl -u celestia-light -f -o cat 
    

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

---

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