How to Sync to only localhost

Hi,

I’m trying to setup local-ONLY syncthing, for getting files in/out of android’s “private space”. (You can technically share files back and fourth, but not directories. I’d like to keep the directory structure without having to re-create it on both sides).

With syncthing files only on my device, I’d like to lock it down to local-host for both security and speed (make sure the files are only transferred on the device, and also don’t look for devices outside the phone to join).

The problem I’m hitting is for the two app/devices to see eachother, I need Enable NAT Traversal Local Discovery Global Discovery Enable Relaying checked (At least one of, I checked all of those together). I also need the device “link” set to `dynamic`. I tried setting it to tcp://127.0.0.1, but it fails to find the other device then. Is this kind of setup still possible? It worked on the Syncthing app, but I just switched to the Synching-fork version.

I think you need to use different ports for the listen address, e.g. tcp://localhost:22000 for the first, and tcp://localhost:22001 for the second device, and then use these as their hardcoded addresses.

Thanks! But no luck. I tried both with/without the 4 options checked too.

That said, I only changed the listen address. Is there a setting somewhere I’m missing to make the other app send on :22001 maybe?

First, you need to change the listen address in each Syncthing instance in Actions → Settings, and then, on the opposite side, in the specific remote device settings, you need to put that address in the Advanced tab (instead of the default dynamic).

This is just an example, in your case it should say localhost or 127.0.0.1.

1 Like

Cool, the `Sync Protocol Listen Address` was exactly what I was missing. Thank you!

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