👍 What we like
- ✓Free choice of components and drive count, within the limits of the case.
- ✓Built-in ZFS: snapshots, replication, scrubs and data integrity checks.
- ✓Docker built in via the Apps menu, with the option to deploy a Compose file (Install via YAML).
- ✓Open-source system with versioned official documentation.
👎 What to watch
- ✕Assembly and picking compatible parts (SFX or ATX PSU, cooler height, SATA ports) take care.
- ✕The system is deliberately locked down: no apt, a read-only root filesystem and an unsupported developer mode.
- ✕Requires a dedicated system SSD that can't store data.
- ✕Menus and names change between versions, so you have to follow the documentation for your version.
🏆 Our picks
Affiliate links · same price for youFractal Design Node 304
Amazon · price and availability on the listing
See all our recommended gear in the shop.
📑 Contents ▾
- 01 Prerequisites
- 02 Step-by-step installation
- · Step 1: Assemble the hardware
- · Step 2: Download the ISO and create the USB drive
- · Step 3: Install TrueNAS
- · Step 4: Configure the network
- · Step 5: Create the ZFS pool in the interface
- · Step 6: Create a dataset and an SMB share
- · Step 7: Enable Apps (built-in Docker) and deploy Caddy
- 10 Verification checks
- 11 Security and best practices
- 12 Troubleshooting common errors
- 13 FAQ
- · How do I add drives after installation?
- · Do I need regular backups?
- · Jonsbo N4 or Fractal Design Node 304?
- 17 Read also
- 18 Host this yourself
This tutorial explains how to build a DIY NAS running TrueNAS SCALE: assembling the hardware, creating the install drive, installing the system, creating the ZFS pool, configuring the network, setting up an SMB share, running Docker apps, and securing the box. TrueNAS SCALE is the Linux version of TrueNAS. It is based on Debian, whereas the older TrueNAS CORE edition is based on FreeBSD. Since version 25.04, iXsystems has distributed it as “TrueNAS Community Edition”. Version numbers change often (25.10 “Goldeye”, then the 26 series), so take the latest stable release offered on the official download page and keep the documentation for that version at hand.
One point is essential before you follow this guide: TrueNAS is an appliance. Nearly all configuration happens in the web interface. The root filesystem is read-only, apt is disabled, and Docker is already built in (the Apps menu). You don’t install any packages by hand, and you don’t create pools with zpool create.
Prerequisites
- A case: the Jonsbo N4 and the Fractal Design Node 304 are empty cases, not mini PCs. The motherboard, CPU, RAM, power supply and drives are bought separately.
- Jonsbo N4: a compact NAS case for Mini-ITX and Micro-ATX boards, with an SFX power supply. It has 3.5” bays wired to a backplane, 2.5” bays, and half-height expansion slots. Retailer listings give a CPU cooler height limit of about 70 mm. Check the manufacturer’s spec sheet before you buy.
- Fractal Design Node 304: a Mini-ITX/DTX case with an ATX power supply (160 mm long at most, according to the manufacturer), up to six 2.5”/3.5” drives, two 92 mm fans at the front and one 140 mm fan at the rear. Fractal warns that the 90° angled SATA ports on some motherboards can get in the way during installation.
- An x86_64 platform (64-bit Intel or AMD) with at least 2 cores, according to the 25.10 documentation.
- RAM: 8 GB minimum according to the documentation. Plan for more if you intend to run apps. ECC RAM is recommended but not required.
- A dedicated boot device: an SSD of at least 16 GB for 25.10, or 20 GB in the documentation for newer versions. The documentation advises against USB sticks and hard drives for this. This drive is reserved for the system and can’t store data.
- Data drives of the same size: 2 for a mirror, at least 3 for RAIDZ1, and 4 or more for RAIDZ2 to make sense.
- A USB stick of at least 8 GB for the installer, a monitor and keyboard for the first install, and an Ethernet cable connected to your LAN.
- A Linux (or Windows/macOS) computer to download the ISO.
Step-by-step installation
Step 1: Assemble the hardware
- Mount the CPU, its cooler and the RAM on the motherboard before putting the board in the case. Check that the cooler height fits the case.
- Screw the motherboard onto its standoffs, then connect the front panel (power button, LEDs, USB).
- Install the power supply (SFX for the Jonsbo N4, ATX for the Node 304), then connect the 24-pin ATX and the 4/8-pin EPS cables.
- Connect the system SSD to a SATA or M.2 port. Install the data drives in the bays. In the Jonsbo N4, connect the backplane to the motherboard (SATA cables) and to the power supply.
- If your motherboard doesn’t have enough SATA ports, add an HBA card in IT mode in a PCIe slot (see the HBA article below). Don’t use a hardware RAID card: ZFS needs direct access to the drives.
- On first boot, enter the UEFI. Choose UEFI mode (recommended), disable Secure Boot (or set it to “Other OS”), and check that every drive is detected.
Check: the UEFI storage/SATA screen must list the system SSD and every data drive. If a drive is missing, check its cables before going further.
Step 2: Download the ISO and create the USB drive
Download the ISO from the official page (truenas.com/download), along with the SHA256 checksum file published for that version. Then, on your Linux machine:
# Verify the ISO's integrity (compare with the published checksum)
sha256sum TrueNAS-*.iso
# Identify the USB stick: recognize it by its size, vendor and model
lsblk -po +vendor,model
⚠️ Warning: the next command completely erases the target device. Replace
/dev/sdXwith the path of the USB stick you have positively identified withlsblk. If you pick the wrong letter, you permanently lose the data on another disk.
sudo dd status=progress bs=4M if=TrueNAS-*.iso of=/dev/sdX conv=fsync
sync
Check: run lsblk -po +vendor,model again. The stick should now show the partitions written from the ISO. On Windows, you can use Rufus or Ventoy, both listed in the documentation.
Step 3: Install TrueNAS
- Boot the NAS from the USB stick (using your motherboard’s boot menu key).
- In the installer, choose Install/Upgrade.
- Select the system SSD as the destination. Its contents will be erased, so double-check its model and size.
- Choose the Administrative user (truenas_admin) option and give it a strong password. This is the account that logs in to the web interface.
- Answer the UEFI/Legacy boot question to match the mode you chose in the UEFI.
- When the “Installation Succeeded” screen appears, reboot and remove the stick.
Check: at boot, the Console Setup shows the IP address obtained via DHCP. From a PC on the LAN, check that it responds:
ping -c 3 192.168.1.50 # replace with the IP shown on the console
curl -kI https://192.168.1.50
Then open https://<IP> in a browser and log in as truenas_admin. The certificate is self-signed by default, so the browser shows a warning: this is expected.
Step 4: Configure the network
The simplest approach is to create a DHCP reservation for the NAS on your router. If you’d rather set a static IP in TrueNAS, first write down the IP you want, the gateway and the DNS servers, then:
- Open Network and, in the Global Configuration card, fill in the hostname, default gateway and DNS servers.
- In Interfaces, edit the active interface. Turn off DHCP, add the address under Static IP Addresses (for example
192.168.1.50/24), then click Save. - Click Test Changes. You have 60 seconds to reconnect on the new IP and confirm with Save Changes. If you don’t confirm, TrueNAS goes back to the previous settings.
Check:
ping -c 3 192.168.1.50
The web interface must respond on the new address, even after the NAS reboots.
Step 5: Create the ZFS pool in the interface
Do not create the pool with zpool on the command line: the TrueNAS middleware wouldn’t manage it properly. Use the interface:
- Storage > Create Pool (top right of the Storage dashboard).
- Name the pool (we call it
tankfrom here on). Only enable encryption if you know how to keep the key somewhere safe. - In the Data step, choose the Layout:
- Mirror with 2 drives: this is the only redundant option for two drives. RAIDZ on two drives makes no sense.
- RAIDZ1 with 3 or more drives: it survives one drive failure.
- RAIDZ2 with 4 or more drives: it survives two failures, and it’s the recommended choice for large drives.
- Leave the Log, Spare, Cache, Metadata and Dedup vdevs empty unless you have a specific need. Check the summary in the Review step, then create the pool.
⚠️ The selected drives are erased. Before you confirm, check their serial numbers in the wizard’s list.
Check: the pool must show as Online under Storage. You can also run this read-only command in System > Shell (or over SSH on the LAN):
sudo zpool status tank
The output must show state: ONLINE and no errors in the READ/WRITE/CKSUM columns.
Step 6: Create a dataset and an SMB share
- Datasets > select
tank> Add Dataset. Name itpartage, choose the SMB preset, then save. In the same way, create anappsdataset (Apps or Generic preset) for the next step. - Credentials > Users > Add: create a user with a password and the SMB User option checked. Don’t use
truenas_adminfor your shares. - Shares > Windows (SMB) Shares > Add: choose the path
/mnt/tank/partage, save, then accept when TrueNAS offers to enable the SMB service. - Set the dataset permissions (Datasets >
partage> Permissions > Edit) to give your user access.
Check from a Linux machine on the LAN (smbclient package):
smbclient -L //192.168.1.50 -U myuser
The partage share must appear in the list.
Step 7: Enable Apps (built-in Docker) and deploy Caddy
Docker has been built in since version 24.10: there is nothing to install.
- Open Apps. The first time, TrueNAS asks you to choose the pool for apps: pick
tank. If you close the dialog, the setting is still available under Configuration (or Settings, depending on the version) > Choose Pool. TrueNAS then creates an internal dataset reserved for the system: leave it alone. - Prepare the folders and the Caddyfile in System > Shell:
sudo mkdir -p /mnt/tank/apps/caddy/data /mnt/tank/apps/caddy/config
printf ':80 {\n\trespond "Caddy fonctionne sur TrueNAS"\n}\n' | sudo tee /mnt/tank/apps/caddy/Caddyfile
- Apps > Discover Apps > Custom App > Install via YAML. Name the app
caddyand paste this content:
services:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "8080:80"
volumes:
- /mnt/tank/apps/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- /mnt/tank/apps/caddy/data:/data
- /mnt/tank/apps/caddy/config:/config
Caddy is published on port 8080 because the TrueNAS web interface already uses ports 80 and 443 by default. Screen names may vary slightly between versions (“Install iX App” or “Install Custom App”).
Check: the app must reach the Running state under Apps > Installed. From your PC:
curl http://192.168.1.50:8080
# Expected response: Caddy fonctionne sur TrueNAS
After that, you can replace the respond directive with reverse_proxy to your other apps, on the LAN. To reach them from outside, use a VPN (see below).
Verification checks
- Storage: the pool is Online and the health widget reports no errors.
sudo zpool status tank:state: ONLINE, anderrors: No known data errors.sudo docker ps(in System > Shell): the Caddy container is listed with statusUp.curl http://<IP>:8080returns the expected text, andsmbclient -Llists the share.- Data Protection: a scrub task exists for the pool (TrueNAS creates one by default). Check it.
Security and best practices
- Never expose the admin interface, SSH or SMB to the Internet: no port forwarding to ports 80, 443, 22 or 445 on the NAS. For remote access, use a VPN (WireGuard on your router, or a VPN app such as Tailscale if it’s in your version’s Apps catalog).
- Turn on 2FA: System > Advanced Settings > Global Two Factor Authentication widget > Config, check Enable Two Factor Authentication Globally, then save. Each user then sets up their code from the Settings menu in the top toolbar. 2FA depends on the time, so make sure the system clock is correct (NTP).
- Keep SSH turned off (System > Services) when you aren’t using it. Never mount the Docker socket into a container.
- Don’t enable developer mode (
install-dev-tools). The documentation says it’s unsupported, should never be used on a production system, and has to be re-run after every update. Sudo rights and accounts are managed under Credentials > Users, not by editing/etc/sudoers. - Update from System > Update, and read the release notes before moving to a new major version.
- Backups: RAIDZ is not a backup. In Data Protection, set up Periodic Snapshot Tasks, then Replication Tasks to a second NAS or Cloud Sync Tasks to external storage. Also schedule regular S.M.A.R.T. tests.
- Plug the NAS into a NUT-compatible UPS and configure it under System > Services > UPS.
Troubleshooting common errors
- Symptom: the NAS stops responding after an IP change. Cause: the change wasn’t confirmed within 60 seconds, or the gateway or netmask is wrong. Fix: on the local console, use the Console Setup menu to reconfigure the interface, or switch back to DHCP.
- Symptom:
apt: command not foundor “Package management tools are disabled”. Cause: this is normal TrueNAS behavior. Fix: deploy the software you need as an app (Apps) instead of installing it on the system. - Symptom: the Caddy app won’t start (“port already in use”). Cause: host port 80 or 443 is already taken by the TrueNAS web interface. Fix: publish Caddy on other ports (8080 and 8443, for example), as in the example above.
- Symptom: a drive doesn’t show up in the pool creation wizard. Cause: the drive is already in use, has old partitions on it, or is badly cabled (backplane, HBA). Fix: check the cabling and detection under Storage > Disks. Only wipe it after checking its serial number.
FAQ
How do I add drives after installation?
Go to Storage. You can add a whole new vdev to the pool (with Add to Pool, for example a second mirror), which iXsystems still calls the preferred method. Since version 24.10, you can also extend a RAIDZ vdev one drive at a time via Manage Devices > RAIDZ vdev > Extend. The parity ratio stays as it was, so usable capacity ends up slightly lower than a new vdev of the same width. Check the limits in the documentation for your version.
Do I need regular backups?
Yes. ZFS snapshots protect against accidental deletion, but not against losing the pool. Combine Periodic Snapshot Tasks with a Replication Task to another machine, or a Cloud Sync Task to external storage. Test a restore from time to time.
Jonsbo N4 or Fractal Design Node 304?
Both are cases with no components inside. The Jonsbo N4 takes Micro-ATX boards and has a drive backplane, but it requires an SFX power supply and a low-profile cooler. The Node 304 is limited to Mini-ITX/DTX and has no backplane, but it takes a standard ATX power supply and taller coolers. Choose based on the motherboard you have in mind.
Read also
Host this yourself
No hardware to manage? This kind of service runs on a managed VPS, ready in minutes. See PlanetHoster plans