Celesita node on mobile devices

Celestia provides an efficient solution to the data availability problem by only requiring resource-limited light nodes to sample a small number of random chunks from each block to verify data availability.

Interestingly, the more light nodes that participate in sampling, the more data that the network can safely handle. This enables the block size to increase without equally increasing the cost to verify the chain.

Light nodes are part of celestia-node stack that handle data availability (as opposed to consensus - celestia-app). Because of the low resource requirements its possible to run this on lower spec devices that do not require constant connection to the internet (or high speed).

This doc I am covering steps taken in order to get celestia-node installed on a variety of devices different from standard VPS build, this was during the `blockspacerace testnet.

Celestia Node on Arch Linux

Arch Linux is a lightweight and flexible Linux distribution that tries to Keep It Simple. It has a rolling release model, meaning you can keep your system updated with the latest software without needing to reinstall.

There are mobile phone images available for Android and IOS phones here:

Device- Steam Deck

Deck comes installed with SteamOS which is based on Arch Linux, its a quite powerful handheld/portable gaming console, Arch Linux is growing in popularity among gaming with Linux.

This was tested with a full storage node, though it makes much more sense for a light client, as something that is not intended to be run 24/7, however I wanted to make use of the specs (500GB NVMe) and test out if it could run it.

Light client is part of celestia-node to run instead simply switch full > light where referenced in commands

Installing on Arch Linux

this distribution does not come with ‘apt repository’ for installing packages, instead pacman as the default package manager, Its highly recommended to use one package manager as mixing can lead to conflicts and broken dependencies.

For Steam Deck only : Unlocking the Steam Deck:

SYSTEM SETTINGS and select Enable Developer mode, then press A to toggle it on. This will expose a new Settings menu called "Developer" which contains settings specific to game developers and people who are interested in modding the Steam Deck.

On Desktop mode the konsole should be visible, this is the terminal for SteamOS

Add a Password: sudo commands will ask for a password, even if none is set enter
passwd and set new password

Default user is deck

Disable Read Only Mode:

sudo steamos-readonly disable
echo "keyserver hkps://keyserver.ubuntu.com" | sudo tee -a /etc/pacman.d/gnupg/gpg.conf
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --refresh-keys

Notes: refresh keys will take a while to complete, as it is trying to refresh all the keys in the keyring.

Might get a warning like: gpg: WARNING: running with faked system time: 2023-01-01 00:00:00 it's likely that the warning is related to the Steam Deck's setup, and it shouldn’t have any significant impact on system's functionality.

Add ssh - optional

sudo pacman -S openssh
sudo systemctl enable sshd
sudo systemctl start sshd
# to change port
sudo nano /etc/ssh/sshd_config	#change port 22
sudo systemctl restart sshd

Install and Enable ufw - optional

sudo pacman -S ufw
sudo systemctl enable ufw
sudo systemctl start ufw
sudo ufw allow <port>

Installing celestia-node

Install Dependencies

sudo pacman -Syu curl tar wget clang pkgconf openssl jq base-devel git make ncdu

NOTES: Differences from Ubuntu/Debian- libssl-dev is replaced with openssl, and pkg-config is replaced with pkgconf. Also, build-essential is replaced by base-devel.

Installing go

SteamDeck: .bashrc exists and seems to be used as default variable store, and comes with Go v0.19 installed and in the /usr/bin/ directory, as this is likely a dependency for other related packages to not break things its best to leave this.

Celestia node requires v1.20, and we can install this binary in a separate location to be used for Celestia only.

ver=1.20.2  
wget <AMD URL HERE>
sudo tar -C /usr/local -xzf “go$ver.linux-amd64.tar.gz”

Add go to PATH

here can see that normally v1.19 is used, but with go added to the PATH we can source .bash_profile for celestia applications and use this version only.

Install celestia-node

Same as the Normal Install, however may have issues with make on this OS

cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.9.4	#check version for which network
make build
sudo make install
make cel-key

Problems with make - Additional Packages

there are additional packages, needed that may not come as standard on SteamOS (Arch Linux) or need to be reinstalled to `make build`

sudo pacman -Sy isl  
sudo pacman -Sy libmpc
sudo pacman -Sy gcc-libs glibc
sudo pacman -Sy linux-api-headers
sudo pacman -Sy make

The warnings shown are because `pacman` could not find the expected files on your system before reinstalling the package. So long as we get to ‘make build’ with the expected output (shown above) everything is in order and packages should be installed correctly.

Initialize celestia node type

celestia full init --p2p.network blockspacerace

for light client use light this test was on blockspacerace network, this should be changed to desired network

Run the Node

setup a system service to run the node, from this example:

Node Started and syncing

Viewing logs directly on device, from brief testing all normal functions on the deck appear to work normally.

Celestia node on Mobian

Mobian is an open-source project aimed at bringing Debian GNU/Linux to mobile devices, such as smartphones and tablets. The project's goal is to provide a Debian-based fully-featured desktop environment that is optimized for touch input while using the mainline Linux kernel.

Mobian, primarily supporting PinePhone and Librem 5, is a developing Linux-based mobile OS. Though not as polished or feature-rich as mainstream OS like Android or iOS, it's actively updated and improving (see releases).

The process should be similar for any compatible OS and device. I am using PinePhone 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.

Device: Pinephone

Main Specs:

  • 4 x ARM Cortex A53 cores @ 1.152 GHz

  • ARM Mali 400 MP2 GPU

  • 2GB / 3GB LPDDR3 RAM

  • 5.95″ LCD 1440×720, 18:9 aspect ratio (hardened glass)

  • Bootable Micro SD

  • Storage: 16GB / 32GB eMMC

Installing Mobian on Pinephone

for more detail on setup/installation see here as an example on mocha testnet

Installing celestia-node

for installing a celesita light client (which is celestia-node initiated as light client) follow the ‘Celestia Light Node for ARM Devices setup’ section below.

As Mobian is Debian based, pretty much all install commands should work the same as the normal install, however the CPU is ARM based ‘4 x ARM Cortex A53 cores @ 1.152 GHz’ therefore a version of Go compatible with ARM is required to build Celestia.

Celestia node on SBCs- Raspberry Pi

Though not exactly mobile, single board computers (SBCs) are an ideal device for locally running light clients, due to low power consumption and small profile.

Ubuntu OS image for Raspberry Pi

for more detail on setup/installation see here full steps to install a light client on Rpi:

Installing celestia-node

As you can see from the Specs, there is an ARM based CPU

for installing a celesita light client (which is celestia-node initiated as light client) follow the ‘Celestia Light Node for ARM Devices setup’ section below.

Light node setup for ARM devices

For any ARM based device using Debian (mobian) / or Ubuntu OS: the following install script can be used from here:

Install with script

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

Manual Steps

Install dependencies

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

NOTE: advised to update via the built in software updater, as running ‘apt update’ may break things related to the device with compatibility issues (on pinephone the UI was basically unusable after this)

Install Go (for ARM)

ver="1.20.3"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-arm64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-arm64.tar.gz"
rm "go$ver.linux-arm64.tar.gz"

# add to PATH
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source $HOME/.bash_profile

Install Celestia node

git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node
git checkout tags <version>
make build 
sudo make install				
make cel-key

Initiate as light node

celestia light init --p2p.network <network>

Setup service

sudo 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 <gRPC endpoint>
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target"
EOF
Subscribe to GLCstaked
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.