Installing Debian Backports on Raspberry Pi

This page is intended to describe how to run Debian’s backports on a Raspberry Pi running Raspberry Pi OS (Raspbian).

This page is not relevant if you are directly running Debian on a Raspberry Pi. It is only for those running the default Raspberry Pi OS.

Backports is Debian’s way of building newer packages for its stable releases. I intend this page specifically to help people run the Debian packages for NNCP and Yggdrasil, both of which are maintained by me, John Goerzen.

Most Raspberry Pis will be running Raspberry Pi OS or its close cousin, Raspbian.

Compatibility

Before proceeding, verify that your system is compatible with these instructions.

Hardware

Raspbian uses a modified version of Debian’s armhf port. We will be using an unmodified armhf port. The Debian Wiki Raspberry Pi page describes which models are compatible with the unmodified armhf port. As of March 2022, here is what you need to know:

  • Not compatible: Pi 1 series (A, B, A+, B+, Zero, Zero W)
  • Compatible: All newer ones, including Pi 2, 3, 3A+, 3B+, Zero 2 W, 4, 400

You can verify your model by typing cat /proc/cpuinfo. You will see the model name at the end of the output.

Software

You will need to be running the Raspberry Pi OS based on Debian bullseye or bookworm. Here’s how to verify this:

First, run this:

grep -r bullseye /etc/apt/sources.list*
grep -r bookworm /etc/apt/sources.list*

If you see no output from either of those commands, you are on a version that is too old, and will need to first reinstall with the most recent Raspberry Pi OS.

On the other hand, if you see a line or more of output, you’re good to proceed.

Obtaining the Debian Archive Keyring

Now, you will need to install the Debian archive keyring so that apt on your pi can authenticate the packages from Debian. Run these two commands:

curl -O http://http.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb

sudo dpkg -i debian-archive-keyring_2023.4_all.deb

If that link ever stops working, the Debian package page can help you get a newer one.

Configuring for backports

Now, run this:

echo "deb http://deb.debian.org/debian bookworm-backports main" | \
   sudo tee /etc/apt/sources.list.d/bookworm-backports.list

apt-get update

(If you are on bullseye as discovered above, use bullseye instead of bookworm on both of those lines.)

Installing package

At this point, you should have seen the update progress with no errors. Now you can move on to install your packages. You will need to add -t bookworm-backports (or -t bullseye-backports as appropriate) to apt/apt-get for every package you install from backports. For instance:

apt-get -t bookworm-backports install nncp

apt-get -t bookworm-backports install yggdrasil

That’s it!


I’ve been getting annoyed with Raspberry Pi OS (Raspbian) for years now. It’s a fork of Debian, but manages to omit some of the most useful things. So I’ve decided to migrate all of my Pis to run pure Debian. These are my reasons:

Filespooler lets you request the remote execution of programs, including stdin and environment. It can use tools such as S3, Dropbox, Syncthing, NNCP, ssh, UUCP, USB drives, CDs, etc. as transport; basically, a filesystem is the network for Filespooler. Filespooler is particularly suited to distributed and Asynchronous Communication.

Yggdrasil is a Mesh Network that is fully Encrypted and provides an IPv6 IP on the network to anyone.

One of several single-board computers. The Raspberry Pi is an ARM computer that typically sells for less than $50. Generally is runs a derivative of Debian.

NNCP lets you securely send files, or request remote execution, between systems. It uses asynchronous communication, so the source and destination need never be online simultaneously. NNCP can route requests via intermediate devices – other NNCP nodes, USB sticks, tapes, radios, phones, cloud services, whatever – leading to a network that is highly resilient and flexible. NNCP makes it much easier to communicate with devices that lack Internet connectivity, or have poor Internet.