Linux truenas. NAS Configuration, instalations
Budget: $30 – $250 USD
1. PROJECT GOAL /// BUDGET 100$;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Build a complete TrueNAS SCALE server with:
- ZFS storage (4 HDDs)
- OS mirror (2× Samsung 870 EVO)
- NVMe pool for Apps, VM, Cache (4× NVMe)
- Plex/Jellyfin 4K streaming with GPU hardware transcoding
- Cloudflare Tunnel for secure external access (no open ports)
- Full Apps Marketplace (TrueNAS Official + TrueCharts)
- SMB/NFS shares
- Snapshots and backup policies
2. STORAGE ARCHITECTURE (BASED ON USER HARDWARE)
• 4 × 3.5" HDD → ZFS RAIDZ1 pool “tank”
• 2 × Samsung 870 EVO → BootPool (RAID1) • 4 × NVMe M.2 → apps, VM, cache, metadata
Dataset layout:
tank/media – recordsize 1M tank/downloads – recordsize 128K tank/apps – recordsize 128K tank/vm – recordsize 16K tank/backup – recordsize 128K
ZFS settings:
Compression: lz4
ATIME: off
Dedup: off
Sync: standard
3. TRUENAS SCALE INSTALLATION
1. Create boot USB (BalenaEtcher)
2. Boot server → enable AHCI, disable CSM, enable virtualization
3. Install TrueNAS SCALE on 2× 870 EVO as RAID1 mirror
4. Reboot and open web UI at: http://SERVER_IP
5. Set:
- Static IP
- Timezone: Europe/Paris
- DNS: 1.1.1.1 (Cloudflare)
- System updates ON
4. CREATE ZFS POOLS
• Pool “tank” → 4× HDD → RAIDZ1
• Pool “nvme_apps” → 1× NVMe for Apps
• Pool “nvme_vm” → 1× NVMe for VM storage
• Pool “nvme_slog” → optional fast NVMe for SLOG
• Pool “nvme_l2arc” → optional NVMe for L2ARC (if RAM < 128GB)
5. SHARES CONFIGURATION SMB share for Windows:
- tank/media
- ACL: Assign user with read/write access
NFS share for Linux (optional)
6. INSTALL APPS (FREE APP STORE)
A. TrueNAS Official Catalog → free
B. Install TrueCharts (free):
Apps → Manage Catalogs → Add:
Name: TrueCharts Repo:
https://github.com/truecharts/catalog
Train: enterprise
Pool: nvme_apps
7. 4K STREAMING (PLEX OR JELLYFIN) Enable GPU:
Apps → Settings → Enable GPU Support → Reboot
Install Plex (or Jellyfin):
- Mount: /mnt/tank/media
- Enable: Hardware transcoding (NVENC)
- 4K HEVC 10bit support
8. VIRTUAL MACHINES (OPTIONAL)
Enable KVM
Use pool “nvme_vm” for VM disks
Create Windows, Debian, Ubuntu VMs as needed
9. SNAPSHOTS & BACKUP
Enable automatic ZFS snapshots:
- Frequency: hourly or daily
- Retention: 1–2 weeks
Enable replication or external USB backup
10. SECURITY HARDENING
- Enable 2FA
- Disable root SSH login
- Use SSH keys
- Block WAN access in firewall
- Local network access only
11. CLOUDFLARE SECURE ACCESS (NO OPEN PORTS) Requirements:
- Domain name (ANY domain)
- Cloudflare account (free)
A. Add domain to Cloudflare
B. Open Cloudflare → Zero Trust → Tunnels → Create Tunnel
C. Install cloudflared on TrueNAS:
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
-o cloudflared.deb sudo dpkg -i cloudflared.deb
D. Cloudflare → Public Hostnames:
Add services:
TrueNAS UI → https://nas.yourdomain.com → port 443
Plex → https://plex.yourdomain.com → port 32400
Jellyfin → https://jellyfin.yourdomain.com → port 8096
Nextcloud → https://cloud.yourdomain.com → port 9000
Reverse Proxy (optional) → https://proxy.yourdomain.com → port 81
BENEFITS:
• No port forwarding
• IP remains hidden
• Free SSL certificates
• Full HTTPS access
• Zero Trust security
12. FREELANCER TASK LIST (FINAL) The freelancer must:
✓ Install TrueNAS SCALE on RAID1 SSD
✓ Create ZFS pools (HDD RAIDZ1 + NVMe)
✓ Create datasets with correct recordsize
✓ Configure SMB/NFS shares
✓ Install TrueNAS Apps + TrueCharts
✓ Install & configure Plex/Jellyfin with GPU
✓ Configure Snapshots and Backups
✓ Install and configure Cloudflare Tunnel (secure external access)
✓ Create subdomains for services
✓ Test 4K streaming, remote access, NVMe performance, ZFS health
::::::::::::::::::::::::::::::::::::::::::::::::BAKUP
) EXPORT FULL SYSTEM CONFIGURATION (REQUIRED)
------------------------------------------------------------
Navigate to:
System Settings → General → Save Config Then:
✔ Check the option:
Include Secret Seed
(This is mandatory. It includes all encrypted data: passwords, app secrets, certificates, database credentials, API keys, Cloudflare Tunnel keys, etc.)
✔ Download the configuration file:
truenas-config-backup.db
Save this file in two locations:
1. Inside the NAS: /mnt/tank/backup/
2. On the client’s PC or USB drive
This file allows a FULL RESTORE of:
- Network settings
- SMB/NFS shares
- Users and groups
- Permissions / ACL
- Apps configuration
- TrueCharts settings
- Cloudflare Tunnel configuration
- Pool import settings
- All system preferences
------------------------------------------------------------
2) CREATE BOOT-POOL SNAPSHOT (OPTIONAL BUT RECOMMENDED)
------------------------------------------------------------
Open TrueNAS Shell and execute: zfs snapshot boot-pool/ROOT/default@post_install_backup
This creates an OS-level snapshot, allowing rollback to the exact working state after installation.
------------------------------------------------------------
3) VERIFY ZPOOL HEALTH & IMPORTABILITY
------------------------------------------------------------
Run the following commands in TrueNAS Shell:
zpool status zpool import
Confirm:
- All pools show ONLINE
- No errors reported
- All pools are importable
------------------------------------------------------------
4) DELIVERABLES FOR THE CLIENT
------------------------------------------------------------
The freelancer must provide:
✔ The file: truenas-config-backup.db
✔ Screenshot of successful config export
✔ Screenshot or log of “zpool status”
✔ Screenshot of boot-pool snapshot (if created)
------------------------------------------------------------
5) FREELANCER TASK SUMMARY
------------------------------------------------------------
1. Export full TrueNAS configuration with “Include Secret Seed”.
2. Save configuration in NAS + client’s external location.
3. Create a boot-pool snapshot.
4. Verify ZFS pool health.
5. Send all required files and screenshots to the client.
Build a complete TrueNAS SCALE server with:
- ZFS storage (4 HDDs)
- OS mirror (2× Samsung 870 EVO)
- NVMe pool for Apps, VM, Cache (4× NVMe)
- Plex/Jellyfin 4K streaming with GPU hardware transcoding
- Cloudflare Tunnel for secure external access (no open ports)
- Full Apps Marketplace (TrueNAS Official + TrueCharts)
- SMB/NFS shares
- Snapshots and backup policies
2. STORAGE ARCHITECTURE (BASED ON USER HARDWARE)
• 4 × 3.5" HDD → ZFS RAIDZ1 pool “tank”
• 2 × Samsung 870 EVO → BootPool (RAID1) • 4 × NVMe M.2 → apps, VM, cache, metadata
Dataset layout:
tank/media – recordsize 1M tank/downloads – recordsize 128K tank/apps – recordsize 128K tank/vm – recordsize 16K tank/backup – recordsize 128K
ZFS settings:
Compression: lz4
ATIME: off
Dedup: off
Sync: standard
3. TRUENAS SCALE INSTALLATION
1. Create boot USB (BalenaEtcher)
2. Boot server → enable AHCI, disable CSM, enable virtualization
3. Install TrueNAS SCALE on 2× 870 EVO as RAID1 mirror
4. Reboot and open web UI at: http://SERVER_IP
5. Set:
- Static IP
- Timezone: Europe/Paris
- DNS: 1.1.1.1 (Cloudflare)
- System updates ON
4. CREATE ZFS POOLS
• Pool “tank” → 4× HDD → RAIDZ1
• Pool “nvme_apps” → 1× NVMe for Apps
• Pool “nvme_vm” → 1× NVMe for VM storage
• Pool “nvme_slog” → optional fast NVMe for SLOG
• Pool “nvme_l2arc” → optional NVMe for L2ARC (if RAM < 128GB)
5. SHARES CONFIGURATION SMB share for Windows:
- tank/media
- ACL: Assign user with read/write access
NFS share for Linux (optional)
6. INSTALL APPS (FREE APP STORE)
A. TrueNAS Official Catalog → free
B. Install TrueCharts (free):
Apps → Manage Catalogs → Add:
Name: TrueCharts Repo:
https://github.com/truecharts/catalog
Train: enterprise
Pool: nvme_apps
7. 4K STREAMING (PLEX OR JELLYFIN) Enable GPU:
Apps → Settings → Enable GPU Support → Reboot
Install Plex (or Jellyfin):
- Mount: /mnt/tank/media
- Enable: Hardware transcoding (NVENC)
- 4K HEVC 10bit support
8. VIRTUAL MACHINES (OPTIONAL)
Enable KVM
Use pool “nvme_vm” for VM disks
Create Windows, Debian, Ubuntu VMs as needed
9. SNAPSHOTS & BACKUP
Enable automatic ZFS snapshots:
- Frequency: hourly or daily
- Retention: 1–2 weeks
Enable replication or external USB backup
10. SECURITY HARDENING
- Enable 2FA
- Disable root SSH login
- Use SSH keys
- Block WAN access in firewall
- Local network access only
11. CLOUDFLARE SECURE ACCESS (NO OPEN PORTS) Requirements:
- Domain name (ANY domain)
- Cloudflare account (free)
A. Add domain to Cloudflare
B. Open Cloudflare → Zero Trust → Tunnels → Create Tunnel
C. Install cloudflared on TrueNAS:
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
-o cloudflared.deb sudo dpkg -i cloudflared.deb
D. Cloudflare → Public Hostnames:
Add services:
TrueNAS UI → https://nas.yourdomain.com → port 443
Plex → https://plex.yourdomain.com → port 32400
Jellyfin → https://jellyfin.yourdomain.com → port 8096
Nextcloud → https://cloud.yourdomain.com → port 9000
Reverse Proxy (optional) → https://proxy.yourdomain.com → port 81
BENEFITS:
• No port forwarding
• IP remains hidden
• Free SSL certificates
• Full HTTPS access
• Zero Trust security
12. FREELANCER TASK LIST (FINAL) The freelancer must:
✓ Install TrueNAS SCALE on RAID1 SSD
✓ Create ZFS pools (HDD RAIDZ1 + NVMe)
✓ Create datasets with correct recordsize
✓ Configure SMB/NFS shares
✓ Install TrueNAS Apps + TrueCharts
✓ Install & configure Plex/Jellyfin with GPU
✓ Configure Snapshots and Backups
✓ Install and configure Cloudflare Tunnel (secure external access)
✓ Create subdomains for services
✓ Test 4K streaming, remote access, NVMe performance, ZFS health
::::::::::::::::::::::::::::::::::::::::::::::::BAKUP
) EXPORT FULL SYSTEM CONFIGURATION (REQUIRED)
------------------------------------------------------------
Navigate to:
System Settings → General → Save Config Then:
✔ Check the option:
Include Secret Seed
(This is mandatory. It includes all encrypted data: passwords, app secrets, certificates, database credentials, API keys, Cloudflare Tunnel keys, etc.)
✔ Download the configuration file:
truenas-config-backup.db
Save this file in two locations:
1. Inside the NAS: /mnt/tank/backup/
2. On the client’s PC or USB drive
This file allows a FULL RESTORE of:
- Network settings
- SMB/NFS shares
- Users and groups
- Permissions / ACL
- Apps configuration
- TrueCharts settings
- Cloudflare Tunnel configuration
- Pool import settings
- All system preferences
------------------------------------------------------------
2) CREATE BOOT-POOL SNAPSHOT (OPTIONAL BUT RECOMMENDED)
------------------------------------------------------------
Open TrueNAS Shell and execute: zfs snapshot boot-pool/ROOT/default@post_install_backup
This creates an OS-level snapshot, allowing rollback to the exact working state after installation.
------------------------------------------------------------
3) VERIFY ZPOOL HEALTH & IMPORTABILITY
------------------------------------------------------------
Run the following commands in TrueNAS Shell:
zpool status zpool import
Confirm:
- All pools show ONLINE
- No errors reported
- All pools are importable
------------------------------------------------------------
4) DELIVERABLES FOR THE CLIENT
------------------------------------------------------------
The freelancer must provide:
✔ The file: truenas-config-backup.db
✔ Screenshot of successful config export
✔ Screenshot or log of “zpool status”
✔ Screenshot of boot-pool snapshot (if created)
------------------------------------------------------------
5) FREELANCER TASK SUMMARY
------------------------------------------------------------
1. Export full TrueNAS configuration with “Include Secret Seed”.
2. Save configuration in NAS + client’s external location.
3. Create a boot-pool snapshot.
4. Verify ZFS pool health.
5. Send all required files and screenshots to the client.