One thing to watch out for when doing something like this is that the Raspberry Pi will by default put your file system on the SD card it boots from. SD cards aren't meant to support a lot of write/erase cycles, so it's easy to end up with a corrupt SD card after a few months to a year depending on what you're doing on your Pi.
A workaround that can save you some headaches here is to only boot from the SD card (which means you're effectively only ever reading from the card), and then mount a filesystem on an external SSD drive. There are a couple of good guides here [1] [2].
Or for those using journald, use Storage=volatile in /etc/systemd/journald.conf and then `systemctl force-reload systemd-journald`. Remove /var/log/journal to get rid of the old persisted logs.
Busybox's syslog logs to RAM by default. And it can be built with runit requiring no systemd if the distribution was built for this. Also Alpine Linux runs out of RAM entirely by default. Too bad RAM is constrained on these devices and I haven't been able to make it load g_serial in Alpine for the USB gadget console on the OTG port. I used a Pi Zero W.
Very true for a given value of true 8) You need to evaluate all the components. The RPi itself is a decent piece of kit, well tested and safe to use. Get a decent power supply to it - either a RPi branded one or at least a decent mobile charger from a brand that you trust.
I generally use a decent USB stick nowadays. RPi 4 from about a month or so ago onwards will do this out of the box. You can also put a second USB stick in and clone the thing every now and then.
You can PXE boot them as well (citation needed) and that brings nfs and iSCSI to bear. That's my long term plan for fleets of them.
For the semi casual user, I recommend the dual USB stick combo. Quite easy to set up and you can always whip out the backup and test it on another device.
I buy quite a few of them as a tinkerer and recent (~two months) ones don't need firmware/BIOS fiddling to boot off USB. Make sure you get reasonably recent stock.
I really think PI I doesn't make sence for this usecase, I strongly reccomend getting any random Intel-atom based mini pc off ebay, they cost similar, have proper storage and a heatsink. I have never come across one where ubuntu doesnt work.
Pi really shines when you are interacting with hardware sensors, or need ARM.
They're great for tinkering with distributed systems. I.e. if you want to play with Kubernetes, you can build a master and 2 workers out of RPis for like $90. They won't have enough power to run anything substantial, but it's enough to play around with upgrading the control plane or mess with the network plane. Same thing if you want to play with failure scenarios on distributed databases, or whatever. It's doable with VMs, but every time I try to do anything fancy with VM or container networking, I end up spending hours reading documentation because my VMs refuse to communicate at all.
I also like it because they force me to use Ansible and actually make my installs repeatable. On my actual server, practically everything is some snowflake crap I did at 3am that I couldn't repeat if I had to.
I am an IT consultant and own the business. Home and work blur somewhat! I have a Dell tower (ESXi), a pfSense appliance, a micro mainboard based box, two ESP32s and a 24 port PoE+ switch in my attic. With a UPS and smoke detector. There's rather more stuff hidden away in cupboards and under the stairs. There's a 50m run of ethernet and SWA 240V (all ducted and marked etc) down to our summer house in the garden, which sports an eight port PoE+ switch, 2.4 and 5GHz wifi, and four double IP66 power outlets.
"Fleet" is a bit of an excessive term but I have four RPis at home, mainly for TV frontends for MythTV. There are rather more in the office.
The above is just a sample and not the whole story 8)
They only consume a few watts, have a footprint of a few square inches, and cost a few twenties of dollars. It's a sweet spot for doing lots of things. There are a few ways they aren't ideal, but still a great compromise.
For whatever it's worth, I use Samsung Endurance SD cards [1] in all of my Raspberry Pi 4s. While I wouldn't say any of them are subjected to heavy load, I've never had an SD failure in the ~1 year of usage they've each seen.
In that case, the following from the linked page might be worth making note of:
> To enable USB host boot mode, the Raspberry Pi needs to be booted from an SD card with a special option to set the USB host boot mode bit in the one-time programmable (OTP) memory. Once this bit has been set, the SD card is no longer required. Note that any change you make to the OTP is permanent and cannot be undone.
Not that it matters much to me but still something worth being aware of if you later try to repurpose your RPi for something else I think.
> The Raspberry Pi 3B+ and Compute Module 3+ support USB mass storage boot out of the box. The steps specific to previous versions of Raspberry Pi do not have to be executed.
Then the last one,
> Raspberry Pi 4
>The Raspberry Pi 4 currently requires non-default firmware to enable USB mass storage boot: see the USB mass storage boot section of the Pi 4 Bootloader Configuration page for more information.
But overall, it's possible in some way with all these versions,
>Available on Raspberry Pi 2B v1.2, 3A+, 3B, 3B+, and 4B only.
I've been using a RasPi for a Pihole for years and this is a constant peeve. No matter how many precautions it takes, it eventually dives. RasPi is neat for a lot of things but I'm not convinced it's an ideal selfhosting platform. By the time you invest in the necessary addons, you might as well have gotten a used actual server.
Newer Pi's do support booting to USB drives (flash or SATA adapter) and I think the firmware update enabling that on the 3/3b/4/4b allows SATA hats and others to work but I haven't read into or tested any of them.
Booting to USB protects the install better, allows easier access or setup on a PC, and I have more of them around to set up random OS or systems to test. I have several pis around and each that can boots to USB including the pihole systems at my parents place and grandma's apartment.
Plus, the SD copier tool in Raspbian works with USB drives (and VHDs) so I set up the pihole for my grandma, cloned the usb drive, then sent both drives to her with the pi and called to walk her through plugging things in then used my existing remote tool on her laptop to finish set up. Now she has a backup USB drive that may need updates but is ready to go if the existing USB fails with pihole ready and everything. Plus once I update the backup drive I can clone it to the corrupt USB and she can store that as backup.
I know many people have hard lines for supporting friends/family. I've taken it in stride with super useful setups for relatives (pihole and a remoting tool if I set up their laptop/desktop) and beer or similar cost for friends. One recently spilled warm garlic sauce in their laptop so I pulled it apart while they scrubbed and wiped and some local beer is cheaper than a new laptop any day.
A workaround that can save you some headaches here is to only boot from the SD card (which means you're effectively only ever reading from the card), and then mount a filesystem on an external SSD drive. There are a couple of good guides here [1] [2].
[1]: https://www.stewright.me/2019/10/run-raspbian-from-a-usb-or-...
[2]: https://www.pragmaticlinux.com/2020/08/move-the-raspberry-pi...