External integration - Syncthing

cover-syncthing

Hi everyone!

Still in the self-hosting series, for those who have a NAS or a home server. Like Sonarr & Radarr, which I loved doing, the idea is to see in Gladys what runs silently on the server: this time, Syncthing, which synchronizes your folders between the phone, the laptop, and the NAS, without cloud. We finally know if the vacation photos have arrived.

What it does

  • One device per folder: status (Up to date, Synchronizing, Scanning, Out of sync, Error, Paused), up to date yes/no, progress in %, what remains to be received, failed items, last synchronized file, and a pause switch.
  • One device per remote device (laptop, phone, other NAS): connected, pause switch, throughput, and how many hours it has been offline.
  • Updates in real-time, via Syncthing’s event API.
  • Two triggers: « Folder synchronized » and « Synchronization error », and three actions: pause, resume, and scan folders.
  • A widget: folders and devices, with the Analyze, Pause All, and Resume All buttons.
  • In French, English, German, and Spanish.

The cool thing

The Photos folder has finished synchronizing → « The photos have arrived on the NAS »
A folder goes into error → alert with Syncthing’s message
The laptop offline for more than 72 hours → « Remember to turn it on, it hasn’t synced in 3 days »

Installation

:warning: Gladys 5.1 minimum.

It will arrive in the store at the next indexer run. In the meantime: Integrations → Install from GitHub, with GitHub - guim31/gladys-syncthing: Syncthing folders and devices for Gladys Assistant · GitHub

  1. In the Syncthing interface: Actions → Configuration → GUI, copy the API key and set the listen address to 0.0.0.0:8384 (by default, Syncthing only responds to itself). The interface then becomes visible on the network: give it a username and password if not already done. In Docker, simply publish port 8384.
  2. In Gladys: the Syncthing address and the key, then Test the connection.
  3. Discovery tab: add the folders and devices to monitor.

Honest small reservations

  • One Syncthing per integration, that of the server. Your other devices appear as its remote devices: nothing to install on them.
  • « Folder synchronized » only triggers on the receiving side: not on the laptop sending its photos to the NAS.
  • Progress and throughput are refreshed every 30 seconds at most.
  • The pause switches do modify Syncthing’s configuration; nothing else is touched, and no file is ever deleted.
  • Tested against two real Syncthing instances connected to each other for the occasion (2.1.6 with 1.30.0, and 2.0.10 with 2.1.6): real sync up to « Folder synchronized », pause, forced error then back to normal, device that leaves. Not yet seen in a real Gladys installation, nor behind a reverse proxy, nor with a Syncthing under Windows or Android: your feedback is welcome.

Like the previous ones, developed with Claude Code. Independent project, not affiliated with Syncthing.

Repository: GitHub - guim31/gladys-syncthing: Syncthing folders and devices for Gladys Assistant · GitHub