HDD-Housing e.U.

Syncthing as an offsite backup target with ZFS snapshots

Note: Replace poolname in all commands with your customer ID.

Syncthing on its own is not a backup tool: it synchronises changes – including deletions or files encrypted by ransomware – to all devices in real time. At HDD-Housing, however, your Syncthing folder lies on a ZFS pool with regular snapshots. These snapshots cannot be deleted via Syncthing, so older versions of your files remain available.

After deployment, the Syncthing web GUI is available via the link we send you.

Install Syncthing to prefill your pool

You only need this if you want to prefill the Syncthing folder on your pool before sending us your drives. Installation follows the official Syncthing apt repository:

apt install -y curl apt-transport-https ca-certificates
curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | tee /etc/apt/sources.list.d/syncthing.list
apt update
apt install -y syncthing

Create the Syncthing user with its home on the pool

groupadd -g 1110 syncthing
useradd -m -s /bin/bash -d /poolname/syncthing -u 1110 -g 1110 syncthing
echo "syncthing:$(openssl rand -base64 100 | tr -d '=+/\n\r' | cut -c 1-70)" | chpasswd
systemctl enable --now syncthing@syncthing
systemctl status syncthing@syncthing  # shows the IP and port in use