I have a scenario where I would like to use syncthing:
I want to collaborate on a given folder
2 devices I trust, let’s say my laptop and my phone, must be able to exchange data back and forth
I have a third device that I want to act as a kind of gateway. It must be able to read all the data from the same folder, but can’t modify anything
The third device is trusted in the sense that it can read data, but it is not trusted in that it can’t change data. I want it to be as safe as possible, so I can’t just “hope” that the gateway behaves correctly.
Is there a way to achieve this ? I can only set send-only and receive-only folders, but not devices.
You can add the same folder on disk twice with different folder ids and sharing modes. It’s not ideally elegant and has some overhead, but it’s a workaround.
Suppose there’s a directory on the laptop at the following path…
~/Syncthing
On the phone…
/storage/emulated/0/Syncthing
And on gateway…
~/Syncthing
In Syncthing on the laptop, configure two Syncthing folders (with different folder IDs), both pointing to ~/Syncthing.
Set one Syncthing folder to “Send & Receive” with the phone while the other is set “Send Only” with the gateway.
The two Syncthing folders on the laptop aren’t syncing with each other – one is paired with the phone and one is paired with gateway.
If the phone is also paired with gateway, repeat the same steps above, pairing phone ↔ laptop and phone ↔ gateway.
In a regular mesh/many-to-many setup, there would be one Syncthing folder shared with multiple devices and the folder type (e.g. “Send & Receive”) would apply to all devices.
But in order to guarantee that gateway is read-only, it requires overlapping mesh configurations so that the laptop and phone can be set to “Send Only”, otherwise simply setting the Syncthing folder on gateway to “Receive Only” would be enough.
(The term “folder” is used generically as a synonym for “directory”, but they’re technically different, so it often causes confusion.)