Can make syncthing only use LAN connection for some folders?

I have a folder which I want to synchronise between my laptop and my desktop only when my laptop is at home and connected to the home LAN. Is there a way that one can make syncthing do this?

There are other folders which synchronise whenever my laptop is connected to the internet, I have this working already.

I guess what I want to do is to disable ‘NAT Traversal’, ‘Global Discovery’ and ‘Enable Relaying’ for just one folder.

1 Like

Unfortunately, no.

OK, thanks, maybe I should make this a feature request but I guess it’s rather specialised.

It’s also tricky, for various technical reasons. You could work around it by running two copies of Syncthing on the home server, with one sharing only the relevant folder and having the global discovery stuff disabled.

I’m doing something similar but in reverse:

I have few places (LANs) with “desktop server” in them, those servers sync everything using one syncthing instance (global discovery + relays as well).

And then I have a mobile unit: One syncthing instance that syncs constantly only a handful of crucial folders (via LAN and Internet). Second syncthing instance that syncs all “non-critical + huge-sized” folders that has only local discovery on, hence will only sync when i’m on the same LAN with one of the “desktop servers”.

BTW, for me the original intention behind this multi-instance setup was to avoid a huge index (*) exchange on the go (when i use hotspots, etc.)

  • the “huge-sized” folders are few TB in size, and due to the lack of “delta-indexes” implementation (#438, PR 2020), every time that mobile unit wakes from sleep, it needs to exchange almost 1GB of indexes, which is a no-go while using poor connections, data-caps, and is just killing the battery life in general)

Hello @scienmind

Thanks for your workaround. I have this exact issue eating my data every month, and I’ve just realized I should have kept the second Syncthing client on my mobile. Will reinstall it asap.

Cheers !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.