Considerations for a long-running Raspberry Pi

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • DietPi

    Lightweight justice for your single-board computer!

  • I used dietpi [1] for similar reasons: a slim version of Debian, and with the defaults set to push all the logging into ram to minimize writes. Dietpi has opinionated defaults, for sure, but it's easy to choose something else (e.g. Dropbear is the default ssh server, but bumping to OpenSSH is a matter of changing a setting in the handy config tool).

    I've been running an RPi3 on an SD card as my secondary PiHole instance on it for at least a year with no issues.

    [1] https://dietpi.com/

  • rpi-clone

    A shell script to clone a booted disk.

  • I've been running a bunch of Pi's for years now, and the biggest problem I've had is the Pi itself dying: 24/7 usage is hard on a small device. I've also found that stable power is essential, and to that end I've always used 5v 3a branded power cubes, plugged into a pure sine wave UPS. Choice of micro-SDHC cards is important and I ended up getting ATP industrial cards (https://www.atpinc.com/products/industrial-sd-cards) - expensive but really long-lived. Finally, using RPi-clone (https://github.com/billw2/rpi-clone) on a regular basis has been a life-saver. I clone to Sandisk Extreme micro-SDHCs and can recover from an outage in minutes.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • sbts-aru

    Low cost Raspberry Pi sound localizing portable Autonomous Recording Unit (ARU)

  • My sound localizing Raspberry Pi installs a resilient base system as part of its install.

    https://github.com/hcfman/sbts-aru

    https://hackaday.com/2023/12/30/localizing-fireworks-launche...

    With one command it for all Pi’s for both Raspbian and bookworm it:

    * Shrinks the file system (Gee, how does it do that with just one disk ? ;-) )

  • sdtool

    A small tool for managing the write protection flag of SD cards.

  • This covers the readonly filesystem, but doesn't cover the write protect flag that you can set on the microSD card itself[1]. The flag will configure the card's controller to drop any writes.

    Also, creating a readonly root out of an existing disto is a bit of a pain, my preference is to use a distro (like TinyCore) that's already a readonly root.

    https://github.com/BertoldVdb/sdtool

  • sbts-install

    Discontinued Installs StalkedByTheState over the sbts-base system to build a home and business security appliance on NVIDIA Jetson series computers.

  • Back in 2011 I made a commercial product that ran on the earliest plug computers from global scale technologies. I only sold 20 of 'em and every single one of them was being returned with SD card corruption problems. I had to quickly pivot to keeping the rootfs read-only. I've been a fan ever since.

    Incidentally, that early commercial product was a home security product with a very small amount of home automation. I released this into open source with a new name in 2021 and now runs on the Jetson series SBCs (https://github.com/hcfman/sbts-install). Except then including high end YOLO models as triggers.

    Because it was intended to be a standalone product it supported https with a GUI wrapper around all of the certificate operations. This still exists in my open source version, making it easy to use self signed certificates for intra-device rest calls.

    But I've kept and expanded upon the multi-partition memory overlayFS approach and the installation of this system first asks you to install the sbts-base system, which installs the multi-partition memory overlayFS so that other's can use this as their own base systems.

  • rupy

    HTTP App. Server and JSON DB - Shared Parallel (Atomic) & Distributed

  • I have been running a Raspberry 2 cluster for 10 years: http://host.rupy.se

    A few weeks back the first SD card to fail got so corrupted it failed to reboot!

    My key learning is use oversized cards, because then the bitcycle will wear slower!

    I'm going from 32GB to 256/512/1024!

  • Ansible

  • I use some Pis for various things in my house including Zeroes through CM4s and 4Bs.

    The Zeroes run Raspbian configured with the read-only filesystem option. I have found it necessary to uninstall `unattended-upgrades` because the overlayfs employed for read-only root caches disk writes in RAM and the update/upgrade process exhausts RAM. For the same reason I disable swap. It makes no sense to swap to RAM on a 512GB system.

    Upgrades are tedious since they require disabling overlayfs, rebooting, upgrading, rebooting, and enabling overlayfs. I wrote Ansible playbooks to perform these tasks. (https://github.com/HankB/Ansible/tree/main/Pi)

    I have a Pi 4B performing as a file server and running Debian (not Raspbian) It boots from an SD card so that the entire HDDs can be used for a ZFS pool. To reduce wear and tear on the SD card I have mounted `/var` to a ZFS filesystem. I should probably use `tmpfs` for `/tmp`.

    I use a Pi CM4 to run HomeAssistant and that boots and runs from an NVME SSD where durability is less an issue.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gokrazy

    turn your Go program(s) into an appliance running on the Raspberry Pi 3, Pi 4, Pi Zero 2 W, or amd64 PCs!

  • Switching to gokrazy[0] was the best thing I did for my Raspberry Pi uptimes. I think a lot of that is because it defaults to using read-only partitions so the common issue of SD cards falling over when you run apt upgrade no longer happens.

    But I also think that gokrazy's simplicity and design helps it be just a solid, reliable foundation to build on top of.

    [0]: https://gokrazy.org/

  • clocky

    A 4-digit digital clock using a raspberry pi pico and the Waveshare Pico-8SEG-LED.

  • Just want to shout out to tinygo, for this old Go programmer, it makes working with ESP and friends loads of fun.

    Admittedly, reverse engineering a single digit 7-segment LED display wasn’t the best use of my time, but by crikey it was fun.

    https://github.com/doctor-eval/clocky

  • rpi-open-firmware

    Open source VPU side bootloader for Raspberry Pi.

  • Comment by the developer who attempted to create open firmware, https://github.com/christinaa/rpi-open-firmware/issues/37

    > a lot of corners were cut to save time leading to what I believe is poor ARMv7+ Cortex IP integration (GIC, TrustZone, etc). So I stopped working on it. If those things were not the case (GIC working, "TZPCs" working, security working as intended, instead of NS forced to high on bridge, at least in my understanding) I would still work on it ...

    ARM isn't a second class citizen on this platform, it's a third class citizen since BCM2709 (again this is an opinion) ... the features I wanted to tinker with the most are absent by design (cutting corners) and I'm not willing to resort to SW emulation of them through clever uses of the VPU.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts