Appearance
Syncthing
Syncthing synchronizes files between computers. This lab uses a receive-only server that writes to NAS storage and retains older versions. Clients keep their working copies and send changes to the server.
First prepare the Syncthing VM. Private folder mappings, device details, SSH accounts, and AI recovery procedures are in Syncthing · Internal Operations.
Access and configuration
| Setting | This homelab |
|---|---|
| Guest | VM 104, Ubuntu Server 24.04 LTS |
| Host IP | 10.120.40.104 |
| Domain | syncthing.home.rwk.me |
| Dashboard | https://syncthing.home.rwk.me |
| Direct GUI | https://10.120.40.104:8384 |
| Transfer ports | TCP and UDP/QUIC 22000 |
| Installation | Official Syncthing stable-v2 APT packages |
For another lab, choose your server address, user account, data location, and discovery policy. A NAS is optional: local Linux storage also works. Keep state and identity on persistent local storage, separate from synchronized content.
Install the package
On the prepared Ubuntu guest:
sh
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://syncthing.net/release-key.gpg -o /etc/apt/keyrings/syncthing-archive-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing
syncthing --versionUse the packaged systemd service, following Syncthing's autostart guide. Choose a normal account that owns the data paths and run sudo systemctl enable --now syncthing@<service-user>.service, replacing the placeholder with your account. Do not run a second instance from a shell, cron, or a user service.
For NAS storage, install the guest guide's mount and storage guard before enabling the application. The VM should remain accessible when storage is absent, while Syncthing refuses to use an empty local mount directory.
Secure the GUI
The initial GUI is local-only. Open it through a local session or SSH tunnel, set a strong GUI login, and then configure any desired LAN listener. Run Syncthing CLI commands as the account owning the service state.
For the lab's HTTPS upstream configuration:
sh
syncthing cli config gui raw-address set 0.0.0.0:8384
syncthing cli config gui raw-use-tls set trueAllow GUI traffic only from intended management networks or the reverse proxy. The direct certificate is self-signed; verify it through the trusted setup path before accepting it. Keep GUI authentication enabled behind the proxy. Identity certificates, the API key, and the state directory are private and must not be synchronized to peers.
Configure the proxy
Resolve syncthing.home.rwk.me to Nginx Proxy Manager (10.120.40.101 here). Add an HTTPS backend at 10.120.40.104, port 8384, enable WebSockets, select the certificate covering the dashboard name, and force HTTPS. Handle the self-signed upstream certificate deliberately; client-facing TLS does not establish upstream trust automatically.
The reverse proxy carries GUI traffic only. Peer synchronization still connects directly to port 22000, independently of the GUI hostname.
Pair devices and folders
Install Syncthing on each source computer. Exchange IDs through Actions → Show ID and Add Remote Device on both peers; share IDs through the live setup process rather than publishing them.
This lab disables global/local discovery, NAT traversal, and relays on the server. Configure clients with an explicit server address of tcp://10.120.40.104:22000. If you choose discovery or relays on another lab, configure and test their network requirements deliberately.
- Create a folder on the source with a unique folder ID and its actual working path.
- Share it with the server device.
- Accept it on the server using the same folder ID and a distinct destination path.
- Set the server folder type to Receive Only and the working client to Send & Receive.
- Avoid overlapping paths assigned to different IDs. Confirm both peers connect and initial synchronization completes.
For this topology, enable filesystem watching, use a one-hour full rescan, and set versioning on the server. The lab uses staggered retention up to 14 days for documents and simple retention of five versions with 14-day cleanup for pictures. Choose retention based on your own recovery needs.
On CIFS-backed folders, ignore permission synchronization and disable sparse files before receiving data. Sparse temporary files on this NAS can otherwise become zero-filled. For a chosen folder ID:
sh
syncthing cli config folders <folder-id> disable-sparse-files set trueKeep actual personal folder paths and client mappings in the private runbook.
Configure desktop clients
On macOS, the Homebrew package can run as a login service:
sh
brew install syncthing
brew services start syncthingOpen http://127.0.0.1:8384 locally. Grant the process the macOS privacy access needed for the chosen folders, especially Documents and Pictures. Keep its GUI bound locally and set a login.
On Windows, use the current-user installer linked from Syncthing downloads, enable login-time startup, and allow the required transfer traffic in Windows Firewall. Keep the GUI local-only. Check for folder redirection, antivirus, and Controlled Folder Access if files cannot be read.
Verify and maintain
Check the native service, connected peers, folder error list, and a test file's contents at the destination. Up to Date means connected peers agree; disconnected peers can still hold newer changes. A receive-only server's local changes are not intended to be published back to source computers.
Use APT for package updates, then verify the service, mount, and synchronization. For a failed CIFS transfer, check sparse-file settings, source permissions, and the actual mounted filesystem before repairing temporary files. Never rename a zero-filled temporary file into place, and do not use Override Changes as a generic repair for incomplete receive-only data.
Backups and recovery
Synchronization can propagate deletions, and version retention expires. Keep an independent backup of important files. Stop the service before archiving its local state, including identity certificates, configuration, and index. Protect that archive like a credential backup.
Restore the original identity and ownership before reconnecting peers. Verify the NAS mount before enabling the service, then check folder IDs, paths, versions, and a representative file. Do not replace identity files merely to resolve a connection error.