Setting up a home server

I won’t write a complete tutorial, just my own choices, and why I choosed that particular thing, and try not to forget something…
All my sentences meant to start/end with “-I think”, as I don’t have the “philosopher’s Stone” in my pocket.
So you want a home server, and self-host whatever you can: the very first thing to consider, what you really want it to use for at the moment? (Later you’ll implement new functions anyway… :slight_smile: ) Many think of a home serer as kind of NAS, which you can buy ready-made, something like a QNap. This is well designed for data storage and acces in your LAN, it runs kind of energy-efficient.
But the flexibility is zero, you will have the functions “burnt” into the firmware, if you need a new function which it doesn’t provide out of the box, the chance to integrate it into the device is zero.
If you whish to go the uncomfortable but flexible way, you will end up installing a Linux as a headless server (no keyboard, no screen attached to the computer), which you administer remotely.
The second t consider, how much do you want to spend on it?

My home serverver has couple of functions to fulfill my whishes.
One of these functions is similar to what you seem to like to achieve, namely get access to your data remotely.
Because of historical reasons I use Debian (Bullseye at moment) on my servers.
You could choose any distro you like, but I favor Debian.
Choose a low-power demanding hardware, otherwise your energy will cost more than a business account at a cloud provider :slight_smile:
My very first chioce (back around 2010 or so) was an intel-Atom based board, then changed it to a J37something Celeron(?) based board, which performed hugely better than the acient Atom, still drawing similar (somewhat less) power, endly a Fujitsu machine with an i5-45??T CPU (intel CPU with letter ending with “T” run on lower clock freq. and consume less energy).
Then I hopped architecture, and went for the Odroid HC4, which is Arm based, draws way much less power, still performs quite well - from my point of view the HC4 is just the absolute perfect device for implementing a home server.

So choose what you can afford, what you can feed with power easily.
I can warmly recommend the Odroid, probably there are other models too.

So choose a hardware, then choose a distro you will be comfortable with on cli.
As for data storage, and allowing it to be accessible remotely the most popular self hosted solution is probably Nextcloud. It has syncing clients for common platforms, and there are numoerous extensions for it. It is written in php, and requires a webserver instance to run on - at least this was the case when I last time checked it.
My choice was Seafile (community edition).
Because when I looked for the solution, Seafile server performed huuuugeely better than Nextcloud and it had the syncing clients for the platforms I used.
I think it still outperforms Nextcloud on the same hardware, but I did not test recently. Nowadays I have near 4TB data in Seafile, it survived multiple movings between OS upgrades and changes, such as upgrading Ubuntu server 10.04 to 12.04, or moving from Ubuntu server to Debian, upgrading Debian and and last year I did an architecture-hop from the intel platform to an arm based.

Regarding security I have set up fail2ban on all my servers, as I run mailserver too, I did the hardenings for that, but other than these I did not take very special security settings. So I have my home server running:

  • on Debian 11
  • on Odroid HC4
    (having 2 disks, one big 3,5" spinner that holds the “big-data” :slight_smile: and a smaller 2,5" sized low-power spinner which is basically always on. The bigger spins down if not in active use, so reducing energy consumption. During idling it takes between 5…6W on heavy usage 15…17W)

It runs now Seafile server 9.02 for the RPi (MariaDB as data backend).
(Rpi binary runs on Odroid as well)
My server runs ftp server (vsftpd), nginx as webserver (I found this way much more effective, less resource hungry, and faster than Apache), there’s a postfix
instance, dovecot+ spamassassin (+roundcube on nginx&php).
For the LAN it works as NFS and Samba server.
It also works as a DNS and DHCP server for my LAN, the DNS has filtering, like Pi-hole (this is done by dnsmasq). For WebDAV I enabled the DAV server of Seafile, that lets me use Foldersync on Android devices. CalDAV / CardDAV is not supported by Seafile, so for that I choosed Radicale.

I have an account at dynu for the DDNS, so my homeserver is always reachable using a FQDN, the IP is updated by ddclient running on my home server…

My family memebers are connected to the Seafile server instance, that means 6 active users, from 13 devices (desktops, laptops, tablets / phones).
I use my own self-hosted email, and 2 of my friends have (unlimited - without quota :slight_smile: ) email accounts on my server, basically it serves as emailer for 14 addresses on 7 domains.
I mention these facts just to see that ALL these run perfectly happy on Debian powered little gadget.

I need to emphasize, that I take backup of everything stored on the server every night, and this is automated, so I won’t forget it. I’d hate to loose data because of a HDD failing.

In case you choose something from my list, I’m ready to help you configuring it on your server.

2 Likes