TrueNAS Administration Guide#
The complete UNAS-Pro backup architecture, schedules, TrueNAS node configuration, and recovery procedures are documented in Unifi UNAS-Pro Backup Strategy.
1. TrueNAS Scale: Initial Setup & Security#
Virtual Machine Configuration (Proxmox)#
- Initial Setup: Create the VM. Add a second virtual disk (10GB) for apps and home directories.
- Post-Login: Verify the Time Zone is accurate.
- Duplicate Serial Error: If Proxmox reports
Disks have duplicate serial numbers, add serials manually in the PVE host:nano /etc/pve/qemu-server/212.conf # Add serial strings: scsi0: Storage:vm-212-disk-0,discard=on,size=32G,ssd=1,serial=PROX-001 scsi1: Storage:vm-212-disk-1,discard=on,size=1G,ssd=1,serial=PROX-002
Datasets & Users#
- Datasets: Create
HP3-10Gb-Apps-HomeDirs. Add sub-datasetsApps(Type: Apps) andHomeDirs(Type: Generic). - Standard User: Create user
marcfor SMB shares. - Sync User: Create
backupuser. Set a home directory, uncheck Samba authentication, and do not set a password. - Admin Hardening: - Create user
marcouewith full admin rights.- Upload SSH keys and enable 2FA for
marcoue. - Disable the default
truenas_adminaccount once verified.
- Upload SSH keys and enable 2FA for
SSH Hardening#
sudo nano /etc/ssh/sshd_config
# Modify/Add:
PermitRootLogin prohibit-password
PubkeyAuthentication yes
sudo systemctl restart sshd- Services: Go to System > Services > SSH and disable “Allow Password Authentication.”
2. System & Networking Optimization#
Startup Scripts & Cron#
- Cron Shutdown: (System Settings > Advanced)
- Command:
/sbin/shutdown -h now
- Command:
- Init Scripts: (Post Init)
- Command:
iperf3 -s -d
- Command:
- Session Timeout: (Access > Configure) Set to
2147482.
Host Identification & Email#
- Hostname/NetBIOS: Set to
HP2TrueNAS. - Gmail OAuth/SMTP: - Use OAuth login if available.
- SMTP:
smtp.gmail.com| Port:25or587. - Use an App Password from 1Password.
- SMTP:
3. Data Protection & Replication#
Periodic Snapshots (Source)#
- Path: Data Protection > Periodic Snapshot Tasks.
- Settings: Uncheck “Recursive” (unless needed). Uncheck “Taking Empty Snapshot.”
- Schedule: Daily at 08:30, retention 7 days.
Replication Task (Remote Server Pull)#
- Source: Different System.
- Connection: New SSH (Semi-Auto).
- Settings: Admin:
marcoue, User:backupuser. Enable passwordless sudo. - ZFS Commands: Check “Use Sudo for ZFS Commands.”
- Schedule: Every hour at 08:45.
4. Syncthing Deployment#
TrueNAS Scale Implementation#
- System Settings > Advanced > Sysctl:
- Var:
fs.inotify.max_user_watches| Value:524288.
- Var:
- Apps > Advanced: Disable “Host Path Safety Check.”
- App Setup: Install Enterprise Version. Use Host Path for storage (e.g.,
/mnt/HP1-4TBSSD-Raid0/HP1Storage).
5. Hardware-Specific Configurations#
Mac Pro Auto-Restart (After Power Outage)#
cd /sys/bus/pci/devices/0000:00:1f.0
sudo chmod -R 777 config
setpci -s 0:1f.0 0xa4.b=0Wake-on-LAN (WOL) Persistence#
Create a systemd service to ensure WOL stays active: