Modernizing my homelab for Europes 2022 energy crisis

Intro.

It should come as no surprise that Europe is currently undergoing it’s worst energy crisis since the 1970s. While power has always been somewhat expensive here, at least when compared to our US friends, running a small homelab was possible without starving. The current electricity prices are fluctuating between €0.5 and €1.3 per kWh, meaning that power hungry computer equipment has suddely become really expensive to run.

As a small example, simply powering an 8 port UniFi US-8-60W requires around 16W excluding POE power draw.

The switch itself draws around 8W, and each port that is plugged in adds an additional 1W.

16W for 24 hours per day for a month adds up to 11.7 kWh/month (16 * 24 * 30,5 / 1000 = 11,7)

With an average electricity price of €0.8/kWh, that means every 8 ports switch costs around €9.36/month.

It’s not just electricity that has become super expensive. Everything else “energy” has also increased in cost. Natural gas is 300% more expensive per m3, diesel/gasoline around 200%, and food anywhere from 10%-25% depending on type/brand.

Mortgage interest rates have also gone up. Denmark has had a special situation for the past 5-10 years, where mortgate interest has actually been negative, meaning you would be paid interest instead of paying it, a thing that many families have used. With recent events, interest rates have risen to 5%, with no sign of stopping.

With the average danish consumer looking at around €1000/month, an additional cost of €100 to run a homelab is not desirable, so something had to be done.

Stage 1 : Assessing the situation

When prices started hiking i immediately started looking over my home network/lab. A couple of years ago i moved most of it to the cloud, but as Google ended the unlimited workspace option i was forced to bring some of it back home again, powering up my old Synology DS918+, and a lab is not complete without a server so i also had a Dell PowerEdge T30 running.

A quick inventory revealed the gravity of the situation:

Equipment Power Draw kWh/month Cost Comment
UniFi UDM Pro 20W 14.6 €11.7 Including WD Red 3TB for UniFi Protect
UniFi USW-16-POE 39W 28.5 €22.8 Including 30W POE power consumption for Access Points and Cameras
Unifi US-8-60W 48W 35.2 €28.2 3 X 16W
UniFi Aggregation Switch 28W 20.5 €16.4 8W for the switch itself, and 5x4W for SFP+ to Ethernet trancievers
Dell PowerEdge T30 64W 46.9 €37,5 64GB RAM, 4x6TB, running Proxmox
Synology DS918+ 45W 32.9 €26,3 4 x 8TB WD Red Pro drives
Synology DS915+ 48W 35,2 €28,2 For backups, 2 x 6TB Wd Red Pro drives and 2 x 6TB Seagate IronWolf Pro
Total 292W 213.7 €171.1

292W power draw, 213.7 kWh per month, and a whopping €171.1 per month to power it. Something clearly had to be done.

Stage 2 : A battle plan.

The above table contains everything in my home lab, as well as my day to day networking being used by the family. Considering that COVID-19 was still lurking around the corner, and working from home has become the new norm, i couldn’t very well just turn off everything. Instead i started out by removing everything “unneeded”.

First of all, having 5 switches in a house of 4 people is probably overkill, but i prefer(ed) wired connections to wireless, but at €1+ per wire (€9 per 8 port switch) i can live with Wi-Fi. So i booted every wired client off the network with the exception of servers/NAS boxes, which helped me get rid of a couple of 8 port switches. Sadly networking in my house was an “afterthought”. The house is 50 years old, so networking has been retrofitted, and in some places it was done in “the easiest way”, which was the reason for the many switches.

While having a backup target running 24/7 is nice for continious backups, it is also rather expensive. Initially i tried enabling drive hibernation, but it waked up a lot of times per hour, and i worried that eventually the drives would fail, so the DS915+ got configured with a power plan that powers it up once per day, and after it has been idle for 30 minutes it powers itself off again. That allowed me to save 95% of the power consumption of that, bringing it down to around 1 kWh/month (depending on activity). As every client was backing up to it at their own schedule, i had to manually change everyone to backup at the same time, but once that was done it worked quite well.

After my initial clean up, it left me with the following idle power consumption

Equipment (Continious) Power Draw kWh/month Cost Comment
UniFi UDM Pro 20W 14.6 €11.7 Including WD Red 3TB for UniFi Protect
UniFi USW-16-POE 39W 28.5 €22.8 Including 30W POE power consumption for Access Points and Cameras
Unifi US-8-60W 16W 11.7 €9.7
Dell PowerEdge T30 64W 46.9 €37,5 64GB RAM, 4x6TB, running Proxmox
Synology DS918+ 45W 32.9 €26,3 4 x 8TB WD Red Pro drives
Synology DS915+ 1.4 €1 For backups, Powered for about 1 hour per day
Total 184W 136 €109

Without losing too much functionality, i had effectively reduced my home network/lab power consumption by 36%, and lowered my monthly electricity bill by €62.

Stage 3 : Digging deeper.

While saving €62 every month felt nice, i still wasn’t entirely happy. I was still paying almost twice of my normal “running costs”, and €109 is still a lot of money, so i kept pushing to save more.

Up until this point, my PowerEdge T30 had been used as a home server, and at the same time hosting a couple of internet facing services. Summing up the services i used and looking up alternatives, i instead chose to go for cloud hosted solutions where applicable.

  • My Adguard Home became NextDNS, which offers the same (or superior) service for €1.9/month.
  • My Nextcloud became a 2TB iCloud at €10/month, shared with the rest of the family through family sharing. Another excellent option would be Microsoft Family 365, which includes 6x1TB of OneDrive, and can be had for as little as €80/year through Microsoft HUP program.
  • My Gitea server became Github or Bitbucket. Both offer free private repositories, and i initially used Bitbucket, but have partially migrated to Github after they also started offering it.
  • My VaultWarden became Bitwarden at €10/year. I can’t even self host it on a Raspberry Pi at that price.
  • My Plex server moved from the Dell to the DS918+

€13/month in subscriptions could essentially replace my €37.5/month home server, and probably guarantee better availability and security at the same time.

The only “casuality” was Plex moving to the NAS, something i had fiercely avoided as i believe a NAS should be just that, and not double as a home server. I have previously experimented with running services on a Synology NAS (through Docker), and while it works, it really affects the NAS performance negatively when serving files. But at the prospect of saving €37.5/month i can settle with less.

Privacy and the Cloud

Another issue, and the whole reason i was self hosting Nextcloud in the first place, is privacy. The revelations of Edward Snowden a decade ago made be pull everything out of the cloud, and instead double down on encrypting stuff at home. Going back to the cloud would pretty much give up any hope of privacy i still held.

Initially i considered creating encrypted disk images with either LUKS or encrypted MacOS Sparse Bundles, I also (briefly) considering just encrypting things with GnuPG or Rclone with the crypt backend, which served me well when running my NAS in the cloud. Neither of those solutions were optimal though as that would pretty much limit my cloud usability to laptops as no clients exist on mobile platforms to decrypt either of them.

After much searching i stumled upon Boxcryptor, which appeared to do exactly what i wanted. It offers transparent encryption from desktops and mobile devices alike, and uses regular cloud storage to store it’s encrypted files. I did now like their subscription scheme however, and the fact that i need a cloud account with them to encrypt/decrypt my files. Having gotten my teeth wet i searched on, and since i now knew more specifically what i wanted, it didn’t take long before i instead found Cryptomator which essentially does the same thing as Boxcryptor, but is open source and free for desktop/laptops, and costs a one time fee for mobile devices.

Cryptomator allows me to encrypt everything in the cloud, and offers me a regular file provider on my devices, with very little setup/configuration involved. While it does support encrypting everything, i tend to limit it to the important/sensitive stuff, and leave less sensitive stuff in the regular documents folder. If people can extract usable knowledge from my random notes and documents, more power to them.

Another part of this step was also rewiring the network in the house. I finally got an excuse to learn how to crimp ethernet cables, and armed with a spool of CAT6 cable i set about undoing the tangled mess of cables that went all over the house. Instead i terminated every plug in my “server room”, which allowed me to get rid of the last US-8-60W, but did require a few extra low powered switches. I ended up with a couple of USW-Flex-Mini switches, which use around 1.8W of POE power.

The math was getting better and better

Equipment (Continious) Power Draw kWh/month Cost Comment
UniFi UDM Pro 20W 14.6 €11.7 Including WD Red 3TB for UniFi Protect
UniFi USW-16-POE 41W 30 €24 Including 31.6W POE power consumption for Access Points, Cameras and switches
Synology DS918+ 45W 32.9 €26,3 4 x 8TB WD Red Pro drives
Synology DS915+ 1.4 €1 For backups, Powered for about 1 hour per day
Subscriptions €13 NextDNS, iCloud, Bitwarden
Total 184W 78,9 €76

Another €33/month saved.

Stage 4, Down the rabbit hole.

Moving to the cloud presented new problems. While i had previously had a well defined backup scheme where data was stored on the NAS (from nextcloud on the Dell), data was now suddenly living in the cloud, and maybe on the client machines. I experimented with a few solutions like icloud photos downloader running on the DS918+, but that is only for photos, and requires a manual sign on through the terminal every 30-90 days. Fine for me, but probably not for my family.

Considering that my NAS was now essentially only a Plex server and a backup target, i instead opted for a more radical solution. My Mac Mini M1 became the new server. It has plenty of power, and idles at around 4.5W. It’s only downside is a lack of storage, but i solved that by adding a few USB / Thunderbolt drives. A 2TB SSD synchronizes cloud content locally in “real time”, and a large WD My Book holds my Plex Media as well as incoming backups. I left everything in its original USB/TB enclosures to utilize heavy power savings from frequently spinning down the drive. Leaving a 3.5" harddrive spinning for a month will cost around €5, so if it lasts 2 years i will break even. As for power consumption, according to my readings, the 3.5" drive pulls <0.1W while hibernating, and the SSD, which is much more active, pulls around 1.5W.

The Mac Mini makes a local backup hourly, and backs up nightly to a different cloud provider. I had to set it up like this because our laptops does not have enough storage to store all our cloud data. Otherwise i would have simply setup each client to backup locally and to a cloud every xx hour. As it is now, the clients backs up to the Mac Mini multiple times per day, catching any document that has not been transferred to the cloud.

As a bonus, the Mac Mini also acts as a local content cache for iCloud content, meaning that once it has been downloaded (on our LAN), the data is being cached on the mini and will appear at LAN speeds. This has greatly reduced the latency of working with documents.

Using this new setup allowed me to remove my Synology boxes from the equation. The 915+ got a much deserved retirement, and the 918+ got promoted to spinning up a couple of times per week to receive a synchronization of the plex media as well as a backup of user data. When it spins up, it takes a snapshot of all shares before getting the synchronized data, meaning there is a somewhat versioned backup on it in case things go wrong.

The final result

At this point my idle power consumption looks like this

Equipment (Continious) Power Draw kWh/month Cost Comment
UniFi UDM Pro 20W 14.6 €11.7 Including WD Red 3TB for UniFi Protect
UniFi USW-16-POE 41W 30 €24 Including 31.6W POE power consumption for Access Points, Cameras and switches
Mac Mini M1 5.65W 4.1 €3.3 Including WD My Book and SSD
Synology DS918+ 1.4 €1 4 x 8TB WD Red Pro drives
Subscriptions €13 NextDNS, iCloud, Bitwarden
Total 66,6W 50.1 €53

Another saving of €28.8/month, and a total saving of €121/month.

I have increased my monthly subscriptions by €13, but have instead gained a lot of resilience by utilizing the cloud. As an added bonus, i no longer work as a pro-bono system administrator in my family.

Closing thoughts

I did not include the costs of my cloud backup in the calculations as it has not changed. The cost was there before and it remains the same after. All in all i have around 10TB of cloud storage, and my monthly bill including services is around €25/month. Considering how major cloud centers Protect your data, i’d wager my data is far better off in the cloud compared to my NAS running with dual drive redundancy.

While i realize the Mac Mini route is not for everybody, it works well for us. I already had the mini, but doing the math if i had to buy it, it still makes sense.

  • Mac Mini purchase price €650
  • Power required to power Mac Mini at idle (5.51W including SSD and USB drive) for a month = 4 kWh.
  • Powering the Dell PowerEdge T30 for a month = 46.9 kWh.
  • Difference is 42.9 kWh each month, at an average price of €0.8/kWh, means a monthly saving of €34.3.
  • Time before the Mac Mini is “paid for” with Dell PowerEdge power consumption : 18.9 months.

So in a little more than a year and 6 months, i would start saving €34.3 every month if i had purchased the Mac Mini for this purpose, assuming of course the current electricity prices stay as high as they are now. So far there is no indication that it will drop, and considering our backup power is based on natural gas, which is in very short supply currently and has no viable alternative in the next 5-10 years, i assume higher electricity prices are here to stay. We will probably not keep seeing €1/kWh, as that would put people out on the street, but i don’t think €0.6/kWh is as hard to imagine as it was a couple of years ago.

Another option to the Mac Mini would of course be an Intel NUC or even a Raspberry Pi 4 (if you can find one), and i have no doubt either of them would perform the task equally well. If your cloud of choice is something else, a Linux server with OpenMediaVault or TrueNAS may work much better for you. iCloud is not particularly accessible on Linux. Both options are also somewhat cheaper than a Mac Mini, but with a slightly added power consumption (without tweaks).

NAS  rclone  cloud  Linux 

See also