The slowest pendulum in tech is the distribution/centralization one. It takes years, even decades to swing. That's why we once had centralized timesharing computers with dumb terminals, and then we had personal computers, which we turned into internet terminals, which we are stuck with.
This seems to be sticking, but hey, so did the other two. It may swing the other way, or it may not. Who knows, I am not a futurologist, but I am swinging it a little bit, for myself, in one small area: I am not happy with my data living primarily in large server farms owned by others.
So, rather than having my data live in a cattle server in a server farm, it now mostly lives in a pet server, at home.
Allow me to introduce you to ... pinky.
Pinky will not wow you with specs, it's perhaps the slowest practical server possible:
- Raspberry Pi 3b+, 1GB of RAM
- 16GB SD card
- 2x500GB HDD (mirrored)
But it is more than enough for some specific classes of work I needed. In this document I will try to explain why I wanted to do them, describe them, and explain the tradeoffs involved, and the decision process that lead me to the decision to adopt this solution.
One of the most important things here is Gitea.
It's hard to overstate what a game changer it is for a specific kind of user: Gitea makes hosting a user-friendly git service easy and cheap.
So what? You may ask.
Well, a git server is useful as a backend for many actually useful services, even if you don't care about software development (which I do).
For example, suppose you want to manage your own passwords, instead of relying on a third party service. Well one way to do it is to use pass which is an open source implementation which is supported in most web browsers, desktop applications, terminals and whatnot.
But if you have more than one device ... then how do you sync your passwords between them? Yes, using a git server.
Yes, I use more than one computer. I have one at home, one in the office, another one for work, plus I am building some homemade stuff using raspberry pis, and I want some things to work in the same way in all of them.
Chezmoi is an implementation of the dotfiles concept.
Basically: you tell it to manage some of the config files in your home directory, which are then versioned and shared between computers using ... you guessed it, a git server.
It took some effort to get things in a useful state but now I think it's actually adding value to my systems.
Yeah, I know, so 2003. But hey, it works for me. A centralized location for:
- Things I write, like this one
- Books I read and comment one, via goodreads
- Videos I make, via youtube
Again, one of the goals is that my data is mine so all those book lists, and comments and star-ratings and whatever ... why would they live only in goodreads? What if Amazon closes it?
Well, because I can write software, I just get it all and put it in my own site, thank you very much.
And guess where the canonical source of all that is? Yeah, a git repository, automatically built and deployed.
Disclosure: my site is mostly hosted on a VPS I already pay for, but there is a mirror at home.ralsina.me which is, indeed, in my pinky server.
Gateway to my Office / Home VPN
All these services need to be accessed from somewhere. Using some generous free-tier services from fly and tailscale plus some configuration effort I can, from any of my computers (and my phone too) access any other, regardless of where they are, as long as they have some sort of internet connection.
Why THIS Hardware?
Because I had it lying around.
- The raspberry from old projects, gathering dust.
- Two 500GB HDDs from old notebooks and given as gifts.
I had to buy 2 USB-SATA cables (about 5 dollars) and a nicer knitted micro-usb angled cable so it looked pretty (1 dollar).
Yes, it's pretty slow, but ... is it?
The raspberry pi 3b+ is a 4-core machine, so it can run gitea, a web server and a couple other things without any issues.
Sure, it's USB 2.0 only, so access to storage is ... not fast.
OTOH, most of the time I am accessing either very small things (a git pull is pretty efficient!) or over a slow link (30Mbps at most) so storage speed is hardly ever the bottleneck.
One specific thing that makes no sense would be RAID mirroring between the two disks, it would just make everything slower because of the need to write each change twice.
So I turn off one of the disks (saves on wear) and turn it on at night to backup the whole server into it.
Aditionally, I can once a week take the secondary disk and back it up offsite.
Running at full throttle, my USB power consumption measuring thing I got for a dollar (so take it with a grain of salt) says it may use 1.1A at 5v, so in average it's probably using something like 4W.
I checked my power bill and that comes down to about 20 argentinian pesos a month, or 10 US cents.
I grabbed a raspberry "sleeve" case and a 2.5" HDD "sleeve" case out of thingiverse, and slapped them onto a few boxes, then printed it in the cheapest 3D printer money can buy. It works great.
Because it's a Pi 3 and not a Pi 4 it can be passively cooled with no problem and I printed the HDD sleeves at 50% infill so they would muffle the noise a bit. I can only hear the occasional click from the hard drives, but it's pretty much silent.
It's also around 10cm in each dimension. That's pretty small.
This server (without the case, that's new) has been working for around a month. It has automatic software updates for everything and if something would happen to break I can live without it for a few days without any issues.
I consider it a complete success.