Construye tu primer NAS
Guía paso a paso para planificar y montar un NAS casero fiable con TrueNAS u OpenMediaVault.
A network-attached storage (NAS) box gives every device in your home a central, reliable place to store files, photos and backups. You can buy a ready-made NAS, or build your own for more flexibility and often better value. This guide walks through planning, building and securing a DIY NAS.
Ready-made or DIY?
| Ready-made (Synology, QNAP) | DIY (TrueNAS, OpenMediaVault) | |
|---|---|---|
| Setup | Easiest, polished apps | More work, more choices |
| Hardware | Fixed, often modest CPU | You pick CPU, RAM and bays |
| Cost | Higher per bay | Lower for the same capability |
| Support | Vendor support and warranty | Community and your own time |
| Flexibility | Limited by vendor | Almost unlimited |
If you want an appliance, a ready-made unit is a fine choice; see our Synology vs DIY NAS comparison. If you enjoy tinkering, or want ZFS and more power, build your own.
Step 1: Plan your capacity
Estimate how much you need today and in a few years. Count your photos, documents, media library and backups, and add 30–50% growth. Our storage planner helps. Then choose a redundancy level with the RAID calculator, remembering that usable capacity is lower than raw capacity. Also keep roughly 20% of a ZFS pool free for good performance.
Step 2: Choose your hardware
A NAS does not need a fast CPU. It needs reliability, enough RAM and good connectivity.
- CPU and board: an efficient Intel or AMD platform. Choose a board with enough SATA ports or add an HBA in IT mode. ECC memory is a nice-to-have for ZFS if your platform supports it.
- RAM: 8 GB is a workable minimum for TrueNAS; 16 GB or more is comfortable and lets ZFS cache more.
- Network: gigabit is enough for most; use 2.5GbE or 10GbE if you edit video or move large files regularly. See the switch guide.
- Boot drive: a small SSD for the operating system, kept separate from data.
- Case and cooling: drives need airflow, and a quiet case matters if it lives in your home.
More on choosing parts in our hardware buying guide.
Step 3: Choose your drives
Use CMR (not SMR) drives rated for NAS use. Buy from more than one batch or retailer to reduce the risk of simultaneous failures. Match the drive sizes in a pool. See the best NAS hard drives. Before trusting new drives, run a full SMART long test and a burn-in (for example badblocks or a full write/read pass) to catch early failures.
Step 4: Pick the software
- TrueNAS — enterprise-grade ZFS with checksums, snapshots, replication and a polished interface. Prefers more RAM and is happiest as a dedicated storage appliance.
- OpenMediaVault (OMV) — lightweight and flexible, based on Debian, works with ext4, XFS, Btrfs and ZFS plugins; even runs on a Raspberry Pi.
- Unraid — a flexible array that supports mixed drive sizes, with a paid license. See Unraid vs TrueNAS.
Not sure? Read TrueNAS vs OpenMediaVault and ZFS for home servers.
Step 5: Install and create your pool
Install your chosen OS to the boot SSD, then create a storage pool from your data drives. A common ZFS layout for four drives is RAID-Z2 (survives two failures):
4 × 8 TB in RAID-Z2 = ~16 TB usable, tolerates 2 drive failures
2 × 8 TB mirror = ~8 TB usable, tolerates 1 drive failureRemember that you cannot easily change a pool's layout later, so choose carefully. Read RAID explained for the trade-offs.
Step 6: Create datasets and shares
Create separate datasets (folders with their own settings) for documents, photos, media and backups, so you can apply different snapshot and quota policies. Expose them over:
- SMB — best cross-platform compatibility (Windows, macOS, Linux, phones).
- NFS — fast and simple for Linux and your other servers.
Create per-user accounts, give each person only the access they need, and don't use a single shared admin login. Keep guest access off.
Step 7: Enable snapshots
Schedule regular ZFS snapshots so you can instantly roll back mistakes or ransomware, for example hourly kept for a day, daily for a month, weekly for a year. Remember that snapshots live on the same pool — they are not a backup.
Step 8: Back up off the NAS
Follow the 3-2-1 rule. Replicate snapshots to a second machine or an offsite/cloud target with tools like Restic or ZFS send/receive. Test restoring a file now, not during an emergency. Our backup strategy guide walks through it.
Step 9: Protect the power
Add a UPS so a power cut can't corrupt your pool, and configure automatic clean shutdown over USB using NUT or your NAS software.
Step 10: Monitor and maintain
- Enable SMART tests (short weekly, long monthly) and email alerts.
- Schedule a ZFS scrub monthly to find and fix silent corruption.
- Watch temperatures; drives above about 45–50 °C age faster.
- Replace failing drives early and keep a spare.
- Watch free space and keep the system updated.
- Monitor with Uptime Kuma or Grafana and Prometheus.
Security basics
Don't expose SMB or the admin interface to the internet. Use a VPN such as WireGuard for remote access, enable HTTPS on the admin UI, use strong passwords and keep the system patched. Work through the security checklist.
Common mistakes
- Using SMR drives in a RAID or ZFS pool.
- Treating redundancy as backup.
- Skipping burn-in testing of new drives.
- Under-sizing RAM for ZFS.
- Running without a UPS.
- Filling the pool to 95%+.
Your NAS is now the reliable foundation for media, backups and self-hosted apps.
Artículos relacionados
ZFS for Home Servers: A Practical Primer
Understand pools, vdevs, snapshots, RAID-Z and caching — and decide when ZFS is worth the RAM overhead for your NAS or Proxmox box.
RAID explicado para servidores domésticos
Entiende los niveles RAID 0, 1, 5, 6 y 10, qué protegen y por qué RAID no sustituye a una copia de seguridad.
Synology vs NAS casero
Synology vs construir tu propio NAS: coste, rendimiento, software, flexibilidad y qué opción te conviene.