TrueNAS SCALE Setup Runbook
Start here after TrueNAS SCALE is installed and the web UI is reachable.
This runbook configures TrueNAS as an SFTP target for Restic laptop backups. Do not store passwords, SMTP credentials, Restic passwords, private keys, or recovery keys in this repository.
Target Configuration
| Area | Value |
|---|---|
| Hostname | truenas.home.hovirix.dev |
| Pool | tank |
| Dataset | tank/laptop_backups |
| Dataset path | /mnt/tank/laptop_backups |
| Owner | backup-laptop |
| Group | backup-laptop |
| Access | SSH/SFTP only |
| Restic repository | sftp:backup-laptop@truenas.home.hovirix.dev:/mnt/tank/laptop_backups |
| Snapshots | Daily, 1 month retention, non-recursive |
| Scrub | tank, Sunday 00:00, 35 day threshold |
| SMTP | Resend, smtp.resend.com:587, STARTTLS |
| Alert recipient | homelab@hovirix.dev |
| Alert level | Warning |
Before You Start
- TrueNAS SCALE administrator credentials.
- SSH public key for the laptop backup client.
- Resend SMTP username and password.
- Restic repository password stored on the laptop backup client.
- DNS record for
truenas.home.hovirix.dev.
1. Sign In
- Open the TrueNAS SCALE web UI.
- Sign in as an administrator.
- Open alerts and resolve critical boot, disk, pool, or network alerts before continuing.
2. System Settings
- Open System Settings.
- Open General.
- Set hostname to
truenas. - Set the correct timezone.
- Save changes.
3. Network
- Open Network.
- Confirm the active interface has the intended IP address.
- Confirm the default gateway is set.
- Confirm DNS servers are set.
- From another machine, verify DNS:
getent hosts truenas.home.hovirix.dev4. Pool tank
If tank already exists:
- Open Storage.
- Confirm pool
tankis online. - Confirm the expected disks are assigned.
If tank does not exist:
- Open Storage.
- Create a pool named
tank. - Select the intended disks.
- Select the intended vdev layout.
- Review the disk wipe warning.
- Create the pool only after confirming the selected disks are correct.
5. Dataset tank/laptop_backups
- Open Storage.
- Select pool
tank. - Add a dataset.
- Set name to
laptop_backups. - Leave compression inherited from the pool.
- Do not create an SMB share.
- Save.
6. Group backup-laptop
- Open Credentials.
- Open Local Groups.
- Add group
backup-laptop. - Save.
7. User backup-laptop
- Open Credentials.
- Open Local Users.
- Add user
backup-laptop. - Set primary group to
backup-laptop. - Set the home directory inside the data pool.
- Add the laptop backup client's SSH public key.
- Enable SSH access.
- Disable SMB access.
- Disable TrueNAS web UI access.
- Save.
Avoid password SSH for this account unless temporarily needed for troubleshooting.
8. Dataset Ownership
- Open Storage.
- Select
tank/laptop_backups. - Open the permissions or ACL editor.
- Set owner user to
backup-laptop. - Set owner group to
backup-laptop. - Apply the permissions to the dataset.
- Do not grant access to unrelated users or groups.
9. SSH Service
- Open System Settings.
- Open Services.
- Find SSH.
- Enable public key authentication.
- Start SSH.
- Enable SSH start on boot.
10. SFTP Test
Run from the laptop backup client.
getent hosts truenas.home.hovirix.devssh backup-laptop@truenas.home.hovirix.devsftp backup-laptop@truenas.home.hovirix.devInside SFTP:
ls /mnt/tank/laptop_backups11. Restic Repository
Run from the laptop backup client.
export RESTIC_REPOSITORY='sftp:backup-laptop@truenas.home.hovirix.dev:/mnt/tank/laptop_backups'Set the Restic password using the laptop backup client's secret mechanism.
Initialize once:
restic initCheck access:
restic snapshots12. Snapshots
- Open Data Protection.
- Open Periodic Snapshot Tasks.
- Add a task for
tank/laptop_backups. - Set schedule to daily.
- Set retention to 1 month.
- Disable recursive snapshots.
- Enable the task.
- Save.
13. Scrub
- Open Data Protection.
- Open Scrub Tasks.
- Add or edit the task for pool
tank. - Set schedule to Sunday at 00:00.
- Set threshold to 35 days.
- Enable the task.
- Save.
14. SMTP Email
- Open System Settings.
- Open email settings.
- Set SMTP server to
smtp.resend.com. - Set port to
587. - Set security to STARTTLS.
- Enable SMTP authentication.
- Enter the Resend SMTP username and password from the secret store.
- Set the administrator email address.
- Save.
- Send a test email.
15. Alerts
- Open alert service settings.
- Enable email alerts.
- Set recipient to
homelab@hovirix.dev. - Set alert level to Warning.
- Disable SNMP Trap alerting.
- Save.
- Send or trigger a test alert if available.
16. Backup Test
Run from the laptop backup client.
mkdir -p /tmp/restic-truenas-test
date > /tmp/restic-truenas-test/restore-test.txtrestic backup /tmp/restic-truenas-testrestic snapshotsrestic check17. Restore Test
Restore into a temporary path. Do not restore over live data.
restic snapshotsmkdir -p /tmp/restic-restore-test
restic restore <snapshot-id> --target /tmp/restic-restore-testfind /tmp/restic-restore-test -name restore-test.txt -printrm -rf /tmp/restic-restore-test /tmp/restic-truenas-testRecord the restore test:
| Date | Snapshot ID | Result | Notes |
|---|---|---|---|
YYYY-MM-DD | <snapshot-id> | <pass/fail> | <notes> |
18. Final Checklist
- Pool
tankis online. - Dataset
tank/laptop_backupsexists. - Dataset owner and group are
backup-laptop. - SSH is running and enabled at boot.
backup-laptopcan access SFTP with public key authentication.backup-laptopdoes not have SMB or TrueNAS UI access.- Restic backup succeeds.
- Restic restore test succeeds.
- Daily non-recursive snapshots are enabled with 1 month retention.
- Scrub task for
tankis enabled. - SMTP test email succeeds.
- Warning alerts go to
homelab@hovirix.dev. - SNMP Trap alerting is disabled.
19. Routine Checks
- Review TrueNAS alerts.
- Check pool
tankhealth. - Check recent snapshots for
tank/laptop_backups. - Review the latest scrub result.
- Run
restic snapshotsfrom the laptop backup client. - Run
restic checkon a regular schedule. - Repeat the restore test after major TrueNAS, laptop, network, or backup changes.
20. Future Datasets
| Dataset | Purpose | Status |
|---|---|---|
tank/proxmox_backups | Proxmox backup storage | Planned |
tank/archive | Long-term archive storage | Planned |
tank/media | Optional media storage | Planned |
For each new dataset:
- Create it under
tank. - Set ownership and permissions.
- Enable only required access methods.
- Add snapshots if it needs local recovery points.
- Validate client access.
- Test restore if the data matters.
- Update this runbook.
Troubleshooting
SFTP failure:
- Check SSH service status.
- Check the SSH public key on
backup-laptop. - Check that SSH access is enabled for
backup-laptop. - Check DNS for
truenas.home.hovirix.dev. - Check firewall rules between the client and TrueNAS.
Restic write failure:
- Check ownership of
/mnt/tank/laptop_backups. - Check the repository path.
- Check free space on
tank.
Email alert failure:
- Check
smtp.resend.comand port587. - Check STARTTLS.
- Check SMTP authentication.
- Check Resend credentials.
- Check TrueNAS DNS and outbound internet access.
Safety Notes
- Creating a pool can wipe disks.
- ZFS snapshots are not an offsite backup.
- Restore into a temporary path before replacing live data.
- Keep the Restic repository password outside Git.
- Keep
backup-laptoplimited to backup access. - Treat failed scrubs, checksum errors, SMART alerts, and degraded pools as urgent.
