Skip to content

Instantly share code, notes, and snippets.

@azcoigreach
Last active September 18, 2021 21:21
Show Gist options
  • Save azcoigreach/a0f2d732f2be7fc8394602fbab5dbe4c to your computer and use it in GitHub Desktop.
Save azcoigreach/a0f2d732f2be7fc8394602fbab5dbe4c to your computer and use it in GitHub Desktop.
Installing Keybase on Raspberry/Banana Pi Zero

Installing Keybase

For Raspberry Pi Zero W & Banana Pi Zero M2

Operating System

  • KALI Linux - Re4son kernel (RPi)
  • Armbian - Bullseye (BPi)
$ uname -rv
4.14.80-Re4son+ #1 Thu Feb 6 15:03:43 CET 2020 # KALI
5.10.60-sunxi #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 # Armbian

RPi Swap File (required for RPi)

Install Swap

sudo apt update && sudo apt install dphys-swapfile -y

Start Swap

sudo systemctl start dphys-swapfile

Make Swap start on boot

sudo systemctl enable dphys-swapfile

Increase /tmp size (required BPi)

Adjust tmp in /etc/fstab

size=65%

Installing GOLANG

Download GOLANG

mkdir ~/src && cd ~/src
wget https://dl.google.com/go/go1.15.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.15.9.linux-armv6l.tar.gz

Set GO path in ~/.profile

cd ~
echo 'export GOPATH="$HOME/go"' >> $HOME/.profile
echo 'export PATH="$PATH:/usr/local/go/bin:$GOPATH/bin"' >> $HOME/.profile
. ~/.profile
go version

Build Keybase

Install Keybase Daemon

go get -u -v github.com/keybase/client/go/keybase
go install -v -tags production github.com/keybase/client/go/keybase

Install KBFS

go install -v -tags production github.com/keybase/client/go/kbfs/kbfsfuse
go install -v -tags production github.com/keybase/client/go/kbfs/kbfsgit/git-remote-keybase
mkdir $HOME/.config/systemd
mkdir $HOME/.config/systemd/user
cp $HOME/go/src/github.com/keybase/client/packaging/linux/systemd/keybase.service $HOME/.config/systemd/user/keybase.service
cp $HOME/go/src/github.com/keybase/client/packaging/linux/systemd/kbfs.service $HOME/.config/systemd/user/kbfs.service

# absolute path required - edit </home/user>
sed -i 's+ExecStart=/usr/bin/keybase+ExecStart=</home/user>/go/bin/keybase+' $HOME/.config/systemd/user/keybase.service  # absolute path edit <path/to/home>
sed -i 's+ExecStart=/usr/bin/kbfsfuse+ExecStart=</home/user>/go/bin/kbfsfuse+' $HOME/.config/systemd/user/kbfs.service

Enable Keybase Services

# Enable services to start on boot
systemctl --user enable keybase.service
systemctl --user enable kbfs.service

# Start Keybase Services
systemctl --user start keybase.service
systemctl --user start kbfs.service

Configure KBFS

mkdir $HOME/Keybase
keybase config set mountdir $HOME/Keybase

Login

keybase login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment