Here is how I (noobinoob) built my own Nextcloud-Server
-
Hardware: I took the old PC from my aunt, no idea about the specs. Added 4 x 8 TB NAS HDD drives and removed the graphics card, the onboard graphic from the CPU was enough. No raid-controller, just connected the hard drives to the motherboard. In future I can add a PCI-Card with more SATA-ports.
-
Software: I installed Linux Debian, put my 4 HDD drives in a btrfs-raid1 pool, encrypted them with LUCS, installed dropbear to ssh into my server when it is not started and unlocked yet, installed ddclient to update my domain with my home-IP and followed most (not all) of this guide to install nextcloud. Unfortunately, it is in german, but there are plenty of english intructions out there.
-
internet-stuff: I bought a domain (10 Euro/year) and set up DynDNS. I opened the neccessary ports on my router/firewall.
I had to look up a lot of things and failed many many times, but now it works and I am very happy with it - no downtime in the last year. It took about 6-12 months to get there.
In conclusion: Your way (nextcloud on hetzner) is the much better way. You save time and money and your data is more secure.
But if you want to learn a lot of new stuff, building your own server is fun.
It is safer in the sense that, when you selfhost, you have to take care of your own backups. You have to make sure your data is still there, even if two hard drives fail, or your house catches fire and your server burns down. Hertzner is doing that for you.
But you are right of course, from a privacy standpoint it would be much better to have your data on your own server and only send encrypted backups to a remote server like Hertzner.