RPi-Monitor icon indicating copy to clipboard operation
RPi-Monitor copied to clipboard

apt-key is outdated and no longer included in Debian 12 ff.

Open amarradi opened this issue 2 months ago • 1 comments

The instructions cause an error during installation sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F sudo: apt-key: command not found

Installing RPi-Monitor on Debian 13 (Trixie) the Secure Way

🧩 Background

Starting with Debian 12 (Bookworm) and continuing in Debian 13 (Trixie),
the classic apt-key command was removed because it trusted all imported keys system-wide — a major security risk.

The new approach uses dedicated keyrings stored in
/etc/apt/keyrings/ and referenced per repository with
[signed-by=/etc/apt/keyrings/<keyfile>.gpg].

This method isolates each repository’s trust and prevents malicious or outdated keys from affecting your entire system.


🛠️ Step-by-Step Installation (Debian 13 on Raspberry Pi)

1. Install required tools

bash

sudo apt update
sudo apt install -y gnupg dirmngr ca-certificates curl
sudo mkdir -p /etc/apt/keyrings
sudo chmod 755 /etc/apt/keyrings

We create a temporary GPG home to avoid permission problems, then export the key directly into /etc/apt/keyrings/rpimonitor.gpg.

tmpdir="$(mktemp -d)"
gpg --homedir "$tmpdir" --keyserver hkps://keyserver.ubuntu.com \
    --recv-keys 43A579636E330A99A8336C14E4E362DE2C0D3C0F || \
gpg --homedir "$tmpdir" --keyserver hkp://keyserver.ubuntu.com:80 \
    --recv-keys 43A579636E330A99A8336C14E4E362DE2C0D3C0F

Export the key into the keyrings directory

gpg --homedir "$tmpdir" --export 43A579636E330A99A8336C14E4E362DE2C0D3C0F | \
  sudo tee /etc/apt/keyrings/rpimonitor.gpg >/dev/null
rm -rf "$tmpdir"
sudo chmod 644 /etc/apt/keyrings/rpimonitor.gpg

Add the repository

echo "deb [signed-by=/etc/apt/keyrings/rpimonitor.gpg] http://giteduberger.fr rpimonitor/" | \
  sudo tee /etc/apt/sources.list.d/rpimonitor.list

Installation

sudo apt update
sudo apt install rpimonitor

amarradi avatar Oct 08 '25 09:10 amarradi