HOWTO: Build and Run restic's Rest Server on Raspberry PI OS
In the ongoing effort to re-Google my life, I’ve been doing quite a lot of work on my self-hosting setup. So far, I have FileRun (Dropbox replacement), Plex Media Server, and PhotoPrism (Google Photos alternative) up and running. All of this is running on a Debian on an old laptop, orchestrated by docker-compose.
When self-hosting, backups are a huge consideration, and it’s important to get it right. You have no one else to blame when a hard drive fails and you loose your data. When it comes to backups on Linux, I’m really liking restic. It’s easy to install and run, the documentation is great, and it backs up to a wide variety of targets. One of these targets is restic’s own REST server.
My plan is to run the REST server on a Raspberry Pi, with a 5 TB USB drive attached to store backups locally. For off-site backups, I’m testing out Wasabi, a cheap S3 compatible storage provider.
On to the fun!
Install restic REST Server on Raspberry Pi OS
rest-server installation looks pretty easy using Docker. I was able to install Docker with no issue by following the instructions for Debian (Raspberry Pi OS is based on Debian). However, when I attempted to run the rest-server image I ran into some issues.
Looks like we won’t be able to run the provided amd64 image on the Pi, so let’s try to build the image for Arm. After a bit of searching I found some info about building multi-arch images using docker buildx
.
This almost worked, until this error presented itself:
Not exactly sure why this happens, but git is missing from the build environment. I was able to resolve this with a small addition to the Dockerfile:
After that, the docker buildx build
command worked and running the new ARM container was a breeze:
Now we’re off to the races! More to come.