Planning out my first home server

Project Goals:
The server should be able to be used as a ZFS NAS, Media Server, File Server, Steam Cache and VM host for future home lab stuff.
NAS operation should replace current system of backups to external HDDs, all data should be encrypted when not being accessed by user.
- Current system is three external HDDs, all bitlocker encrypted, two 1TB drives and one 2TB drive which serves as a master copy of the other two.
- Due to lack of current storage the most essential files will be backed up to the server first, then media files for the media server,then others.
The server should be accessible over the internet in a secure fashion as well as access VMs with RDP.
Find other useful stuff to do with an always on(line) system.
Spend as little money on software as possible.

Hardware:
CPU: Ryzen 5 1600
Motherboard: ASUS PRIME B350-PLUS
RAM: 16GB 2933MHz (Upgrade to 32GB+ being considered)
GPU: GTX 750 Ti 2GB
Storage: 128GB M.2 SSD
480GB SATA SSD
More to be added over time as budget permits.
PSU: Corsair 650W CV650 80+ Bronze
Case: Random case I bought on FB, supports many drives.
Networking: USB 3.0 AC Wireless Adapter
Gigabit Ethernet if I move the server to the living room.

Learning Goals:
Learn some home networking.
Learn some technologies I’m not familiar with: ZFS, Docker, Kubrenetes?, KVM, TrueNAS.
Apparently learn how to format posts on the forum, this looked better in Notepad++

Questions:
Is this even realistic, can the internet connected portions be done securely?
What should be run as the bare metal OS? Linux (Ubuntu Server)? TrueNAS? Something else? If I run TrueNAS on bare metal do I even need Ubuntu Server?

That hardware is plenty fast for a TrueNAS build

I dont think the 1600 supports ECC so getting ECC ram doesnt make sense

Some will come in here and tell you its okay not to use ECC and some will come in and tell you SHOULD use ECC…

Im gonna get popcorn and sit back and watch it unfold

Honestly not sure switching to ECC could even be in the budget right now. The hardware listed is what I have from having upgraded to an i5 12400 2 weeks before B350 was announced to be getting Ryzen 5000 support.

That system is fine, as mentioned earlier. Using ZFS, ECC or not doesn’t make a difference really, so just stick with your current sticks (s’cuse the pun :stuck_out_tongue: )

I’d recommend getting a pair of 8TB drives initially. Run them as RAID1 to actually have (some) redundancy. My suggestion would be to install the OS on the M.2 drive and use the SATA drive for caching. Then offload data from your external HDD’s onto the NAS. Verify everything is copied correctly, then reformat the external HDD’s and copy data back for off-site or at least offline storage.

Make sure any NAS drives are NAS compatible and purchase from different brands & vendors. This way, if a batch of drives happens to have a defect, your data has a chance of survival as the other drives in the array are not affected due to not being the same defective batch.

HTH!

Thanks for the tips, unfortunately due to my (lack of) budget, I’ll probably at most be able to get a pair of 4TB drives. Question about the copying from the external drives, why reformat them and copy the data back instead of just leaving them as is after copying off them?

Given the relatively low amount of RAM I’d say go for a bare metal OS. If you’re starting to learn I’d suggest FreeBSD mainly because of its excellent documentation and solid ZFS support but also consistency. Sure, you’ll use bhyve instead of KVM and no Kubrenetes or Docker which frankly isn’t ideal on your hardware / use-case anyway so no less really. You have jails if you want to play around with it later one. Use wired eithernet from the start, it’ll save you a lot of headaches further down the road. You can do without ECC but it’s usually a good investment in the long run depending on how precious your data is however it doesn’t replace a backup.

I recommended 8TB drives to give you room for expansion (you’ll need it, trust me on that :stuck_out_tongue: ) but 4TB is fine to start with. I’m now upgrading to 16TB drives. Slowly, but still :wink:

Reformatting the external drives ensures bad blocks are properly found and marked. This improves data integrity, which is important for a cold-storage backup.

I concur with @diizzy on using wired connections. Wifi/Bluetooth isn’t meant as a primary connection between fixed location devices. Sure it’s “convenient” until it actually isn’t while troubleshooting bad connections, high latency, dropped packets and stuff. Besides, it’ll be a fair while for 10Gb wireless connections are reality :stuck_out_tongue:

Alright, thank you both @diizzy @Dutch_Master, I guess I’ll need to buy some stuff before proceeding as well as make room for my server to be in the apartment living room, might need to get a new router too, the Shaw provided one only has 4 ethernet ports and we’re running out

i have been running truenas with only 16 gigs for a while and its fine, im only upgrading so i can run more containers on it but if its strictly for storage its plenty fine…
if you are going ot buy hard drives dont for get to find the reddit forum
buildapcsales
i dont know if i am allowed to paste a link or not but they have crazy hard drive deals every so often… if you arent in a rush itll pay off

I have the Canadian version of that subreddit bookmarked, I’m not really sure what I want to do with this besides storage exactly. I’d like to try some stuff with containers but what that would be right now I have no idea.

Regarding OS:
I’d recommend something like Debian or Ubuntu Server for the OS, over FreeBSD or dedicated NAS software.
Linux probably is the most beginner-friendly, if you want to learn. FreeBSD has fewer online resources to learn from, dedicated NAS software is often very complicated internally, and opinionated, difficult to learn from.

Regarding internet connection:
You absolutely want to get a wired internet connection going. If you can’t go for ethernet, try something like DLAN or MoCa. Wifi will always be spotty, and depend on your environment(e.g. bad neighbors result in bad signal, moving inside room can increase ping times, …).

Regarding virtualization:
If you’re using Linux, I’d recommend looking into libvirtd. Kubernetes seems overkill. You can create KVM VMs using it, as well as LXC containers. It works well over the network and is easy to configure.

Regarding security and external access:
You definitely can host things that are internet-reachable reasonably securely. You should setup some basic log monitoring and install updates regularly(or deal with the occasional breakage from automatic updates).
If you’re going to host any private web applications I’d suggest running them only behind a reverse proxy, and authenticating on the proxy(HTTP basic auth will do). This will often prevent exploits against such web applications, and should probably be done even for web applications that bring their own authentication.
It’s probably best to have the public-facing part of any website static-only if possible.
Depending on your networking situation you might need a VPN of sorts to get access to a proper IPv4 or IPv6 address, but you can often get away with just NAT+port forwarding.
Do you know if you have native IPv4 and can do port forwarding? Or do you have native IPv6? Do you have carrier-grade NAT?

You actually have better (and well maintained sources) for FreeBSD in many cases and the handbook is very beginner friendly and well regarded overall in the community.

I’m sure it is, but from my experience there is no replacing the many more questions already asked on the internet(there is more to using an OS than setting it up). The chance of succeeding in googling a problem is probably way higher for Linux than for FreeBSD, simply because a lot more people, especially beginners, have asked the same questions. Linux is simply way more popular overall.
(FreeBSD has it’s place, and is probably documented very well, but that doesn’t mean that it’s beginner friendly)

Thanks for the post @max1220 I’ll get back to you on the NAT and port forwarding stuff as I have no idea right now. I am already pretty used to using Linux, I’ve used it on and off for stuff for over a decade. If I went the route of installing Ubuntu server or some other Linux distros on bare metal would running TrueNAS as a VM be the best way to go for the NAS part of the project or should I run some other software on Linux?

@max1220
I don’t know what your experience but you do realize that many tools are the same (if you want to) and I don’t really think you’ve tried finding answers for lets say Debian where you have lots of obsolete information scattered everywhere. In that regard I find both Arch and Alpine to be much more useful.

@sonicjms
While you can run NAS distros in a VM it’s not really encouraged by vendors and you’re a bit on your own in that regard. That being said, it’s not hard to setup an array, Samba and NFS in most cases. Getting to know how it works is much more useful than just pushing a button and you have no idea what it does or how to troubleshoot when its not working…

1 Like

I believe I have native ipv6, I do have access to port forwarding on my router, I don’t appear to have carrier-grade NAT

Native IPv6 is both nice and bad in some ways.
For one, it saves you the trouble of any kind of NAT and the port forwarding that comes with that.
On the other hand, devices that only have IPv4 access can’t reach your IP’s. That can sometimes happen on mobile or residential connections.
If you’re fine with your server only being reachable to IPv6-enabled connections you don’t need to do a lot:
You just need to allow external traffic to your computer via your firewall, on your computer and router if applicable, and make sure your services are listening for external IPv6 traffic. Possibly you don’t need to do anything.

If you want your server to be reachable via IPv4, or IPv4 and IPv6 you can use a VPN that provides you a (proper external) IPv4 and IPv6 address. This is somewhat hard to come by, but you can easily host that yourself on a cheap VPS for a few $/month. Those typically come with a “real”(non-NAT) IPv4 and IPv6 network.

But I would encourage you to try IPv6-only first. IPv4 really is a legacy protocol, and there aren’t enough IPv4 addresses around. IPv4 requires “hacks” like NAT and port forwarding, and IPv6 really makes it easy to start hosting things publicly, and simplifies a lot of networking. Also it costs you nothing, while an additional VPN/VPS will always cost something. You just sometimes can’t get around providing IPv4 as well.

Is there going to be a big performance difference between a 5400rpm and 7200rpm drive if I’m using the ssd for caching?

I’m thinking of going with these

Depends on what you’re doing.
If you’re running some workload with random reads/writes(virtual machines, database, etc.) it makes a difference.
If all you’re after is bulk storage for mostly-static files that are read from/written to sequentially, you can probably choose the slower but cheaper drives.

The SSD cache will reduce your problem only for cached data, so if you can fit your random-IOPS data on the SSD, you should do that instead.
The effectiveness of such a cache is hard to predict, it would depend on the ratio of SSD cache GB per HDD storage GB, the ratio of random accessed to sequentially accessed data, and the absolute “speeds” of the drives, in both random and sequential access, so it’s very application and hardware specific.

Yeah the 4TB drives are just for redundant bulk storage, any VM will probably go on an SSD

1 Like