Since many years, I backup my personnal and professional data on distant storage at work but the lack of a reliable hosting solution makes me keep important data on my main desktop computer. Then backuping duplicates that data, but it takes up spaces on my 240G SSD.

I want to setup my self hosted NAS and it would be useful to be able to host some webservers like Gogs git server, to keep a duplicate of work repositories and why not a personnal wiki.
The solution would be modular using containers with a reverse proxy in front.

Concerning storage, needs are not so heavy, 3To to 6To would be enough.
Reading about storage management usually leads to consider ZFS as the best solution.
It is rock solid, as long as host OS support the module nativly.
RAID-Z1 needs a minimum of three disks and i will include a parity disk, resulting pool capacity is N-1.

OS

BSD systems have the best ZFS support, it is included in the kernel.
FreeNAS is great on the paper:

  • it provides a Web UI
  • based on FreeBSD
  • it nativly supports virtualisation,docker containers are run on a RancherOS VM
    Sadly, it suffers of a pretty bad reputation concerning its stability, and OS upgrades, confirmed by my tests on a VM.

FreeBSD would be the next gold choice, but Docker is currently broken, and I don’t trust the Linux Compatibility Layer. There are jails with iocage or bastille which support templates, but everything needs to be done manually while docker provides a huge images catalog on hub.docker.com.

In Linux world, Archlinux could be a great choice, it is my main OS and I worked on archlinux install over ZFS. Rolling upgrades are also less stressful than release upgrades but ZFS isn’t supported defaultly and it is the primary purpose of the NAS.

The only Linux distro which supports ZFS nativly is Ubuntu since 20.04 LTS ! It has a server version, and I trust Canonical after many years maintaning 800 Ubuntu desktop clients.
It seems to be the best compromise, a solid storage management with ZFS, and native possibility of using Docker or Podman containers.

Scheme

server

Hardware

A nice guide gave me lots of directions about hardware choice: Building a DIY Home Server with FreeNAS.

Case
Fractal Design Node 804 Black Window
A bit expensive, but it has a good design, not so massive and you can setup 8 disks, and a micro ATX motherboard.

Node 304 is a good option too, but it is in mini ITX and motherboards are more expensive. Fans are also smaller so it would be a louder and less evolutive config.

Motherboard
MSI H310M PRO-M2 PLUS
4xSATA3, 1xM.2, 2xDDR4 2666Mh, Intel 8gen
It is the cheaper but less evolutive solution.

MSI B365M Pro-VDH
6xSATA3, 1xM.2, 4xDDR4 2666Mh, Intel 8gen and 9gen
Middle solution with 2 extra SATA ports and 2 extra RAM slots.

Asus PRIME B360M-A
6xSATA3, 2xM.2, 4xDDR4 2666Mh, Intel 8gen
A solution which let you use mirroring of the M.2 SSD.

CPU
Intel Pentium G5400
2 cores, 4 threads, 3.70 GHz, 4 Mo, HD Graphics, Coffee Lake, 54 Watts
Cheaper solution, less evolutive if more containers are needed in the future.

Intel Core i3 8100
4 cores, 4 threads, 3.60 GHz, 6 Mo, HD Graphics, Coffee Lake, 65 Watts
2 extra cores which allow Hardware virtualization if needed.

Intel Core i3 9100F
4 coeurs, 4 threads, 3.60 GHz, 6 Mo, Coffee Lake Refresh, 65 Watts
Cheaper and better, but only for MSI B365M Pro-VDH motherboard.

RAM
2x8G DDR4 2666Mh
1x16G DDR4 2666Mh

Storage
For OS
120G WD Green SSD M.2
For storage, two choices possible:
4x1To WD Blue 5400 RPM
4x2To WD Blue 5400 RPM

Power supply
Be Quiet! Pure Power 11 CM - 400W - Gold

It misses SATA cables, total for the cheaper solution is ~530€ and the expensive one is ~740€.