• Public
  • Public/Protected
  • All

Running the Light Client on the Raspberry Pi

This tutorial assumes the following:

  1. These steps have to be run on the Raspberry Pi 4.
  2. Raspberry Pi has to be in the same network as your PC with SSH enabled.
  3. The Raspberry Pi has Raspberry Pi OS Lite installed.

The steps to copy files from your PC to the pi have been explicitly mentioned and have to be run on your PC.

sudo apt update
sudo apt full-upgrade
sudo apt install git

Perform a git install of NVM

git clone https://github.com/nvm-sh/nvm.git .nvm
cd ~/.nvm
git checkout v0.38.0
. ./nvm.sh
nvm install --lts
npm install --global yarn

Check the arm system. In our case output would be armv7l.
The pi's CPU is ARMv8 64 bit but the operating system is 32 bit. More information here.

uname -m

Download Geth for your arm system above.
We require geth only to generate new accounts on the pi.
Later you would have to fund the account with Eth and tokens from whichever testnet you would be testing the pi on.

wget https://linkto.latest/geth-linux-arm7-build.tar.gz
tar -xvzf geth-linux-arm7-build.tar.gz
sudo cp geth-linux-arm7-1.10.4-aa637fd3/geth /usr/local/bin/
which geth
geth version
geth account new

Refer to the raiden-cli guide to generate the bundle folder on your x86_64 or x64 PC.

Copy the bundle folder to the Raspberry Pi using the following example (needs to run on your PC):

scp -r /pathto/light-client/raiden-cli/bundle pi@

Getting the leveldown and node-webrtc .node native dependencies for armv7l architecture


On the leveldown github page, download the arm prebuilt binaries.

wget https://linkto.latest.leveldown.build/vX.X.X-arm.tar.gz

Extract the files

tar -xvzf vx.x.x-arm.tar.gz

Copy the node.napi.armv7.node file to the appropriate place inside the bundle folder.

cp node.napi.armv7.node ~/bundle/prebuilds/linux-x64/

In the index.js file inside the bundle folder find node.napi.glibc.node and replace it with node.napi.armv7.node


Install node-webrtc dependency

yarn add wrtc

Copy the wrtc.node file in the appropriate folder inside the bundle.

cp ~/.config/yarn/global/node_modules/wrtc/build/Release/wrtc.node ~/bundle/build/

Running the raiden-cli on the Raspberry Pi

node bundle/index.js --help

Generated using TypeDoc