Easily run a Scuttlebutt pub on a Raspberry Pi via Docker.
-
Install the latest version of Raspbian Lite onto a microSD card (16GB+ recommended)
- Etcher is a great utility for flashing the microSD image
-
Create an empty file named
ssh
in the boot partition to enable SSH access- This is the FAT32 partition which will be the only one that appears on a Mac or Windows machine
-
SSH into the Raspberry Pi
-
Ensure you have changed the default password for the
pi
user-
passwd
-
-
Install Docker on your Raspberry Pi
-
Update packages
sudo apt update
-
Install Docker dependencies
sudo apt install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common
-
Add the Docker GPG key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
-
Add the Docker apt repo
echo "deb [arch=armhf] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | \ sudo tee /etc/apt/sources.list.d/docker.list
-
Install Docker
sudo apt update && apt install -y docker-ce
-
Add your user to the Docker group (so that you can use the docker command)
sudo usermod -aG docker $USER
-
Log out and back in (now that you are in the docker group)
-
-
Deploy the sbot Docker container
docker run -d --restart=always -v ssbdata:/home/sbot/.ssb --net=host \ --name=sbot ericbarch/ssb-pi-pub server --host YOUR_PUB_HOSTNAME
- If this pub will only be used on a LAN, simply use localhost as YOUR_PUB_HOSTNAME
- This will store all sbot data in a docker volume named "ssbdata", outside of the Docker container (so you can easily upgrade without losing data).
- Note that we must use --net=host to support UDP multicast
-
Generate an invite (if hosting a public pub)
docker exec -it sbot /sbot.sh invite.create 1