TrueNAS & Synology Administration Guide#
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).
Synology DSM Implementation (Docker)#
- Inotify Limit:
echo "fs.inotify.max_user_watches=204800" | sudo tee -a /etc/sysctl.d/90-override.conf sudo sysctl -p /etc/sysctl.d/90-override.conf - User IDs: Use Task Scheduler to run
id > /volume1/docker/id.txtto find UID/GID (e.g.,1027/100). - Docker Compose Highlights:
environment: - PUID=1027 - PGID=100 - TZ=America/New_York volumes: - ./config:/config - /volume2/HP3Storage:/volume2/HP3Storage
Standard .stignore Patterns#
Create a .stignore file in the root of the sync folder:
(?i)#recycle
@eaDir
.DS_Store
.stfolder
.stignore
$RECYCLE.BIN
Thumbs.db
Desktop.ini
.SynologyWorkingDirectory5. 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:
nano /etc/systemd/system/wol_fix.service
[Unit]
Description=Fix WakeOnLAN being reset to disabled on shutdown
[Service]
ExecStart=/usr/sbin/ethtool -s eno5 wol g
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
systemctl enable --now wol_fix6. Storage & Maintenance Commands#
ZFS Management#
- Rename Pool:
# Export first, then import with new name sudo zpool import OLDNAME NEWNAME sudo zpool export NEWNAME - Rename Dataset:
sudo zfs rename Pool/OLD_NAME Pool/NEW_NAME - Locked Folder Deletion:
sudo rm -rf /mnt/myPool/foldertodelete # Remove hidden/junk metadata sudo find . -name "@eaDir" -type d -prune -exec rm -rf {} \;
Performance & Updates#
- Update Disk Space Fix: If updates fail due to space, move system dataset to boot-pool:
- System Settings > Advanced > Storage. Change to
boot-pool.
- System Settings > Advanced > Storage. Change to
- iPerf3 on Synology: ```bash
sudo -i
synogear install
iperf3 -s -p 11111
Monitoring (NetData)#
Install on each node for real-time metrics:
wget -O /tmp/netdata-kickstart.sh [https://my-netdata.io/kickstart.sh](https://my-netdata.io/kickstart.sh) && sh /tmp/netdata-kickstart.sh --stable-channel --disable-telemetry7. Installing Proxmox 8 on Mac Pro 5,2#
- Dataset: Create
VmsandTEMP(permissions:libvirt-qemu). - VM Config: Clock: Local, Boot: UEFI, Display: VNC, CPU: Host Passthrough.
- Network: VirtIO.
- Post-Install Script:
bash -c "$(wget -qLO - [https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pve-install.sh](https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pve-install.sh))"