December 23, 2021

The 50 watt datacenter

A couple of years ago things began to get a bit sketchy in our neighborhood, so much in fact it became apparent that I needed some type of CCTV security surveillance system to keep tabs on all of the strange happenings around our property. We had all sorts of random activities, from mystery dogs running onto our property assaulting our chickens, abandoned stolen cars showing up, and to mystery visitors breaking into our rigs parked in our driveway at night. So I had to do something, and I didn’t want to shell our lots of money for a subscription security service, or even a proprietary hardware device. So I decided to roll my own solution.

Using an old surplus junk PC I had laying around in a pile of derelict used computer equipment, I built a Linux server and purchased a few mid-range POE (power over Ethernet) IP cameras, and some POE switches from MikroTik. After installing a free open source CCTV NVR project called Shinobi and after some tweaking of camera settings, I had a fully functional CCTV system capturing all of the strange events on our property. I created a few VLANs, and installed a beefy router with firewall features and in no time I had my CCTV system accessible from the web. We were quite amused by some of the video footage captured, and several mysteries were solved in short order. I think I had a total of about $300 invested in this system in all, so I didn’t break the bank forging my quite reliable CCTV system. The best part of all, the entire system uses less than 50 watts. So for about the energy load of a 50Watt lightbulb, I think it penciled out to about an $8.00 per month energy cost. Not bad at all.

As time went on, I began to wonder what else I could do with this 50watt datacenter of sorts, and eventually configured a 15 node LXD cluster, if you don’t know what that is, it allows one server to run many small “container” servers on the same physical server. So I added a Plex server, a DNS sinkhole server, an ad-blocker, a Lidarr server, Radarr, Sonarr, and a Jackett indexer, a VPN server and eventually had our entire DVD collection hosted on it. Then I added an nginx web server (which currently serves this website among others) and that’s when things really took off. I spun up an email server, a hosted webmail server, with CardDAV/CalDAV, IMAP, registered a couple of domain names, and have been adding more and more features to it, to the point we are now our own cloud hosting provider. And all of this ran on that tiny 50watt system. Pretty amazing, and lots of bang for the buck. Everything is open source software, so there has been no licensing costs at all. I do have some free services online to help relay outbound mail, and a DNS registrar, but those costs have been minimal.

At the time of writing this, the entire system consumes about 60-70Watts on average with one cluster node online. This is wonderful from a cost perspective, and very handy for when the power goes out in the often occurring California PSPS events where the power goes out for extended periods of time. The small UPS keeps the system up for over 45 minutes before needing to be put on the backup generator. Working in the tech sector as long as I have, I kind of forgot how fun it can be to roll my own home brew systems.

Kind of disappointed I didn’t spin something like this up sooner.