~witcher/wiredspace.de

de186565eda9e31759fdceb1ff7f8489fdeb7b53 — Thomas Böhler 5 months ago 81a347c
blog: thoughts on homeserver

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
1 files changed, 82 insertions(+), 0 deletions(-)

A content/blog/thoughts_on_running_my_own_homeserver.md
A content/blog/thoughts_on_running_my_own_homeserver.md => content/blog/thoughts_on_running_my_own_homeserver.md +82 -0
@@ 0,0 1,82 @@
+++
layout = "post"
title = "Thoughts on running my own homeserver"
date = "2024-06-09T09:47:30+02:00"
+++

Since finally moving out of "shared housing" and into "my own" apartment I've
been thinking about finally setting up a homeserver, something I've been
wanting to do for quite a few years now.  
In preparation for this I've kept my old workstation when I upgraded to my
current one late 2021. It's one I've had since around 2014 and was getting a
little slow, but I decided it will be more than enough for a homeserver at some
point in the future.

Fast forward to a little less than a year ago, I purchased some missing parts
for the server, mostly storage, and got it up and running with ZFS. I decided
to cheap out on the boot storage so it's currently running on spinning rust
instead of flash storage, but I don't really mind.

The server is equipped with an [Intel
i5-4690K](https://www.intel.com/content/www/us/en/products/sku/80811/intel-core-i54690k-processor-6m-cache-up-to-3-90-ghz/specifications.html)
(4C/4T), 16 GB of DDR3 RAM and a total of 20 TB of HDD storage (2x 2 TB + 2x 8
TB, each set of drives set up in a mirrored ZFS pool, bringing the usable
storage space down to 10 TB).  
It's running Proxmox (using the 2 TB drives as boot and VM storage drives)
with a TrueNAS VM to act as a, well, NAS (using the 8 TB drives as storage
drives, passed through to the VM so it can manage them directly).

While idle, the server draws pretty much exactly 61 Watts, and while under load
around 85 Watts. With the price of 29 ct/kWh at a constant 61W this would cost
about 13€ per month in electricity. Calculating in around a quarter of the time
under load, this goes up to about 17€ a month for electricity. This, of course,
doesn't include the cost of acquiring (some of) the hardware.

My motivation for wanting a homeserver in the first place was that I want to
host my data at home, not in a cloud, and run services for myself. The former
is done with the TrueNAS VM, the second with various VMs and Linux Containers
(LXC).

Now, what services am I hosting exactly? Arguably, the most important one is an
OpenBSD VM acting as a firewall and a DHCP and DNS server. It's responsible for
giving my other VMs static IP addresses and making them accessible through DNS.
The firewall is responsible for setting up a subnet for all Proxmox machines as
well as a DMZ for services that are or could be vulnerable for various reasons.

With basic infrastructure out of the way, other services I'm running are a
Wireguard server, Jellyfin for media streaming (primarily audio and video),
[rss-email](https://sr.ht/~witcher/rss-email/), a Minecraft server and a Mumble
server. Of course, all of this is running for myself and just a select number
of friends.

Almost all VMs and Containers are set up with Ansible Playbooks stored in a
private repository. There is a huge trend in moving to NixOS and Nix for
reproducible servers but, after trying it for about half a year before that, I
ultimately dislike it. It forces me to use NixOS whereas Ansible allows me to
use any distro of my choice that supports Python. There are other reasons I
dislike Nix, such as the language and the absolutely terrible or non-existent
documentation, but I won't dig into that here. If you're interested, there are
more than enough blog posts about this.

Recently, I've been meaning to set up paperless-ngx, which I did do, but in the
end I realised it's a bit pointless for me as I don't really need any of its
features. It's nice and all to be able to search through your documents, but I
never actually have had to really do this in my life before and if I had to, I
would find a specific document in about a minute as I sort my documents and
don't have that many to begin with. Thus I decided to not bother maintaining a
paperless-ngx instance, at least until it's actually worth it for me to do so.

While trying out paperless-ngx I couldn't help but wonder if all of this is
really worth it to me. I liked learning while setting all of this up and it's
nice to have my own server, but the server is essentially never under full load
and I couldn't help but notice the trend of hosting everything using containers
(i.e. Docker, Podman, etc.) which I personally just can't get behind and have
no fun maintaining.  
Ideally, I would like what I currently have but a little downscaled. Then
again, that would cost much more money than I would pay for just the
electricity bill so that doesn't make a whole lot of sense.

In the end I'm happy that I do have all of this set up and will keep it around.
There are still things to do, like migrating my Nextcloud instance or finally
finding an alternative as I'm incredibly unhappy with Nextcloud. It also gives
me a space to play around and try things which I value a lot.