Raspberry Pi Connect Gets a New Feature: Over-The-Air Update Deployment

Originally developed as an alternative to VNC for remote access, Raspberry Pi Connect is turning into a full remote management system.

Raspberry Pi's Phil Elwell has announced a new feature for Raspberry Pi Connect, originally launched as an easier alternative to virtual private networks, port-knocking, and VNC servers for remotely accessing Raspberry Pi single-board computers: over-the-air updates.

"For the last six months, we’ve been working away at a brand-new capability: remote updates. The goal is simple enough — to make updating the software on your devices as straightforward and convenient as possible," Elwell explains of the software's new functionality. "Connect users can already update their devices in the same way they update any Raspberry Pi, either by using the 'Software Updates' icon in the toolbar or by running one of the update commands (apt upgrade, etc.). Now, with remote, 'over-the-air' updates, users can trigger software updates without opening a Connect session. And, because the update is managed through the Connect servers, the device doesn’t even need to be switched on at the time — Connect will pick up the update when it is next online."

Available only in the latest Debian Trixie-based version of Raspberry Pi OS, the new over-the-air update feature in Raspberry Pi Connect — and Raspberry Pi Connect Lite — is described as an "experimental" feature, which must be enabled via the command "rpi-connect ota on" before it can be used. Once enabled, administrators can create an "artefact" package accessible via a URL, then register it with the Raspberry Pi Connector servers along with a hash for verification. Once set up, the artefact can be deployed at the click of a button — automatically installing the next time the target Raspberry Pi makes contact with the Raspberry Pi Connect server.

"[An artefact] can also include arbitrary tasks to be performed on your devices," Elwell notes. "An artefact can contain one or more scripts to execute, along with data files that these scripts can use. These scripts are run as root so that they can access all of the file systems. For custom software updates, you could create an artefact containing a .zip file and a script to extract its contents. Alternatively, it could just do something simple, like triggering music playback or turning on an LED."

More information is available in Elwell's blog post; a supporting forum post by Paul Mucur demonstrates how to create artefacts with an A/B structure for ease of rollback in the event of a failed deployment.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles