I set up a "home server" on Linux just a few years after I bought my computer. Now, it's been over fifteen years since then, and for most of that time, I’ve had some kind of second computer at home. Once, when it was time to upgrade, I thought: why do I need a separate router when I already have a spare computer? Back then, in the 2000s, this was a standard setup for many.
Indeed, today you can easily create a separate virtual machine, pass a USB or PCI Wi-Fi card through it. And as an operating system, you can instantly use MikroTik RouterOS, getting enterprise-level software for a small fee.
Introduction
Let me outline my goals and objectives at the time when I was just starting the project:
- The build should consist mainly of the most common standard components. This means no motherboards with sizes different from mATX / mini-ITX and low cases that can't fit full-size cards.
- There should be plenty of space for drives, but the caddies should accommodate 2.5” disks.
- Modularity should lead to cost-saving over time — after all, an old standard 5 Wi-Fi card can simply be replaced with a 7.
- Some kind of remote management support, so I could understand why the system doesn't boot, without physically connecting a monitor and keyboard to something high up and far away.
- Complete freedom in choosing the operating system and their support for all critical components in any OS.
- High performance. I'm tired of waiting for Deluge to "process" .torrent files with thousands of entries, or when encryption slows down to below disk or network connection speeds.
- Visual appeal and neatness of the build.
- Maximum compactness. The ideal size is that of a modern gaming console.
Let me warn you that if you believe that I will explain how to fulfill all these points in the article below, you are very naive, and you’d be better off buying a Synology or leasing cloud space.
In fact, I don't see anything unrealistic about this solution; perhaps I simply haven't studied all the offerings well enough, or maybe it's because the custom NAS market has long been in decline, and components for this purpose are becoming scarcer and more expensive.
A bit about the software.
Recently, I've become so lazy that I didn't even want to configure KVM myself, so I decided to see what unRAID is all about, which LinusTechTips has heavily promoted as a convenient GUI for KVM setup and overall good software for NAS. Since I was also too lazy to fiddle with mdadm, unRAID killed two birds with one stone.
Building
Case
Next came, surprisingly, the most complicated part of building a DIY NAS with standard components: choosing a case! As I mentioned, the days of cases with doors hiding disk trays are long gone. I really wanted to use 2.5" fifteen-millimeter Seagate drives (at the time of writing, the maximum capacity was 5TB). They are silent and take up little space. For now, 5TB was sufficient for me.
It's obvious that I wanted a miniITX motherboard, as it seemed that one expansion slot would be enough.
It turned out that there are compact cases the size of a netbook, but they only have one space for 2.5" drives and 'other' cases where there are already a couple of 3.5" drives of the same size. There is simply no middle ground. Not even for money. There was something on Ali, but it was discontinued (ALWAYS check Ali when looking for unusual things; sometimes, the Chinese have already invented and mass-produced everything). I read about the SilverStone CS01B-HS on some obscure forum, but the price did not fit into the 'budget' category at all. Tired of searching, I ordered it on Amazon via Shipito, completely failing the third point of the technical task.
But now I could not worry about the budget at all!
I advise you to immediately create a 3D model of the case of your dreams and have it CNC machined from real aluminum. It will be slightly more expensive than SilverStone, but a thousand times more enjoyable. Just make sure to share it on GitHub afterward!
Processor
Of course, I wanted to choose an AMD processor; it's 2019, and the choice is only for those who don't delve too deeply. However, trying to fulfill point four 'Remote Management Support', I find only Ryzen DASH from AMD and realize that in this case, I need to choose Intel.
Then, as usual: Yandex.Market, filters, light googling on minor issues, and free delivery tomorrow within the MKAD.
Motherboard
From the motherboards, there is effectively a choice of one — Gigabyte GA-Q170TN.
I have no idea why the expansion slot is only x4, but if you ever decide to install a 10-gigabit network card there in the future, there will be enough capacity (though you won't be able to connect storage that provides such performance).
One of the major advantages: two miniPCI-E slots. MikroTik produces all its Wi-Fi cards (and we need them, as they are the only ones supported in RouterOS) in miniPCI-E format, and will likely continue to produce them for many years, as this is their primary standard for expansion cards. For instance, you can buy their module. and easily obtain support for devices with LoRa.
Two Ethernet ports, but at 1 Gbit. In 2017, I proposed a law to ban the sale of motherboards with Ethernet speeds below 4 Gbit, but I didn't manage to gather the required number of signatures to pass the municipal filter.
Drives
For disks, we take two STDR5000200. For some reason, they are cheaper than the actual ST5000LM000. After purchase, we check, disassemble, extract the ST5000LM000, and connect it via SATA. In case of warranty issues, you reassemble it and return it, receiving a new disk in exchange (I'm not kidding, I've done this).
I didn't use an NVMe SSD, but maybe in the future, if needed.
Intel, in its best tradition, laid out the traps: insufficient support on the motherboard, vPro support is also needed in the processor, and you will tire of searching for the compatibility chart. Miraculously, I found out that a minimum of i5-7500 is required. But since there was no limit on the budget, I accepted it.
In the remaining components, I don't see anything interesting, they can be replaced with any equivalents, so here is a general table with prices at the time of purchase:
Name
Quantity
Price
Cost
Crucial DDR4 SO-DIMM 2400MHz PC4-19200 CL17 — 4Gb CT4G4SFS624A
2
1 259
2 518
Seagate STDR5000200
2
8 330
16 660
SilverStone CS01B-HS
1
$159 + $17 (shipping from Amazon) + $80 (shipping to Russia) = $256
16 830
PCI-E controller Espada FG-EST14A-1-BU01
1
2 850
2 850
SFX power supply 300W Be quiet SFX POWER 2 BN226
1
4160
4160
Kingston SSD 240GB SUV500MS/240G {mSATA}
1
2 770
2 770
Intel Core i5-7500
1
10 000
10 000
GIGABYTE GA-Q170TN
1
9 720
9 720
MikroTik R11e-5HacT
1
3 588
3 588
Antennas
3
358
1 074
RouterOS Level 4 License
1
$45
2 925
unRAID Basic License
1
$59
3 835
Total 66,930 rubles. Point three about the economic part of the issue has been shattered to pieces, but the thought that this hardware will still perform its intended task in ten years warms the soul.
Setting up the software was quite easy, fortunately, it's designed for that: 95% can be clicked through in one evening. I can describe this in a separate article if there's interest, since not everything was perfect, but there weren't any unsolvable, obscure problems. For example, it turned out to be not so simple to pass wired Ethernet adapters through RouterOS, as its list of supported hardware is quite limited.
Conclusions after crossing the border in a hundred days of uptime
- vPro is not needed for this purpose. This significantly narrows the choice of motherboards and processors, and for home use, you can get by with a wireless HDMI extender and a wireless keyboard. In the worst-case scenario (if the server is in the basement under a reinforced concrete slab) — use a twisted pair extender.
- 10 gigabits were needed yesterday. The average hard drive reads faster than 120 megabytes per second.
- The case consumed a quarter of the budget. This is unacceptable.
- A fast processor in a NAS/router is more necessary than it initially seemed.
- unRAID is indeed good software, it has everything you need and nothing unnecessary. You pay once, and if you need more disks, they only ask for the difference in license costs.
My former hap ac delivered about 20 megabits with VPN tunnel encryption enabled. Now just one i5-7500 core is enough to provide gigabit speeds.

P.S.
I'm very glad if you read to the end and found it interesting! Please ask questions if something is unclear. I may have forgotten something.
I'll immediately answer the obvious question:
— Why all this, you could just buy Synology?
— Yes, and I recommend you do that. It's simpler, faster, cheaper, and more reliable. This article is for enthusiasts who understand why they need additional capabilities.
— Why not FreeNAS, it has everything unRAID has, but for free?
— Unfortunately, open source is completely different now. FreeNAS is written by the same paid developers. If you get their work for free, then you are the final product. Or the investor will soon stop paying them.
— You can do everything on plain Linux and save even more!
— Yes. I used to do that too. But why? I have always found network configuration in Linux to be a hassle. Let that be for Computer Janitors. RouterOS completely solves this class of problems. The same goes for MD RAID: despite mdadm preventing me from making silly mistakes, I still lost data. And unRAID simply doesn't allow pressing the wrong button. Again, you shouldn't waste your time on manual storage configuration.
— But you still installed regular Ubuntu in a virtual machine!
— That's exactly what this was all about. Now you have your own personal AWS with maximum connectivity speed to your SAN, home network, and the internet simultaneously, which no one else can offer you. It's up to you to decide what services to run in this virtual machine.
— Any problem, and suddenly there's no Wi-Fi, no internet, and no storage at home.
— There's a spare router lying around for 1,000 rubles, and the disks aren't going anywhere. Over the years, nothing except the disks and coolers has ever broken. Even an ordinary nettop has worked 24/7 for almost ten years and is doing just fine now. It survived two disks.
Only registered users can participate in the survey. , please.
Should I write the second part about software configuration?
60%Yes99
18.1%I'm not interested, but go ahead30
21.8%No need36
165 users voted. 19 users abstained.
Source: habr.com
