# Beam Wallet on a Raspberry Pi
Recently I played with [beam wallet](https://beam.mw/) on a Raspberry Pi 4.
They don't have binary builds for the Raspberry Pi, so you have to build it from source.
I mostly followed this [guide from 2019](https://medium.com/beam-mw/how-to-install-beam-on-your-raspberry-pi-448d1cdb5c10), but things have changed a little bit.
I was able to a build this on [Raspberry Pi OS](https://www.raspberrypi.com/software/operating-systems/) (2021-10-30-raspios-bullseye-armhf.zip) with a 1gb rpi4.
Here are some quick notes on the process.
Set up a bigger swap file 100mB -> 2048mB (following the guide)
```
sudo su
sed -i "s/100/2048/g" /etc/dphys-swapfile
dphys-swapfile setup
dphys-swapfile swapon
```
Taking a look at the [build instructions](https://github.com/BeamMW/beam-ui/wiki/How-to-build-Beam-desktop-UI) on github we need some dependencies
- We need cmake 3.13, apt has 3.18
- We need qt5.15.2, apt has 5.15.2
- We need boost 1.66, apt has 1.74
- We need openssl, apt has 1.1.1k
Let's get the easy ones out of the way
```
apt update
apt install cmake libboost-all-dev libssl-dev tmux
```
Ok, now installing qt5 is a little complicated. I used the [guide](https://medium.com/beam-mw/how-to-install-beam-on-your-raspberry-pi-448d1cdb5c10) and this [askubuntu page](https://askubuntu.com/questions/1335184/qt5-default-not-in-ubuntu-21-04).
Which lead me to this command:
```
apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev \
qttools5-dev-tools qttools5-dev qml-module-qtquick-controls qml-module-qtquick-controls2
```
This gets most of qt5, but for whatever reason Raspberry Pi OS does not have a `qtwebengine5-dev`.
Qt5 takes 24hrs to build from source and has a very complicated build...
https://github.com/tranter/raspberry-pi-qt-builds
So you really want to find a version if you can, luckily debian bullseye has something we can use.
A little ghetto, but you can do...
```
echo "deb [trusted=yes] http://ftp.de.debian.org/debian bullseye main" >> /etc/apt/sources.list
apt update
apt install qtwebengine5-dev
```
This will fetch all the nested dependencies
After doing this, you should probably remove the repo so you don't get other packages
```
sed -i '$ d' /etc/apt/sources.list
apt clean
apt update
```
Now we can download the source
```
cd /root
git clone https://github.com/BeamMW/beam-ui.git
cd beam-ui
git checkout mainnet
git submodule update --init --recursive
```
and build the ui
```
cmake -DARCH_NATIVE=1 . && make -j1
```
Come back in an hour and build the cli
```
cd beam
cmake -DARCH_NATIVE=1 . && make -j1
```
It'll take another hour or so.
When built you should have `beam/beam-node`, `explorer/explorer-node`, `wallet/api/wallet-api`, and `ui/BeamWallet`
The rest of his instructions work to create a menu icon for it.

If this helped I take donations! :)

ca3fc04fe85691ecca90299db2c925a73849f8ec160f352199e89b48020634a555