How does syncing among 3 or more devices work?


(Judah Richardson) #1

Possible new user here investigating the service. As I understand it, 2 devices can be synced only if they have each other’s device IDs. How does this work when one wants to sync a folder among 3 or more devices such that syncing continues even if the original device is offline? For example, consider 3 devices: A, B, and C among which a folder \Test is to be synced. Device ID exchanges would proceed as:

  • A&B
  • A&C

However, the problem with the above is B & C are unaware of each other and so if A goes offline B & C cannot sync. This means the Syncthing network graph in this configuration is hub-and-spoke instead of each member being connected to every other one. An obvious solution is to do the Device ID exchange:

  • B&C

However even if that is possible it now presents a scaling problem: as the number of peers grows, so does the number of ID exchanges. Syncing a folder across 5 devices would require a whopping 15 ID exchanges.

Do I have the above right? Is there an easier way or something I’m missing, e.g. on a per folder basis does a peer automatically tell a new peer of pre-existing peers? Or is Syncthing unable to support more than 2 devices per folder?


(Arne Ko) #2

Hello and welcome to syncthing, :smile: it is fairly simple to get any number of devices to sync a folder with each other. If you set up your devices, look for an option about “introducer nodes”. Any device you select as introducer node will share its known device IDs to the other device as needed. It’s kinda like “a peer [will] automatically tell a new peer of pre-existing peers”

Have fun!


(Judah Richardson) #3

Thanks for the reply! I’ve been playing around with it, but the mainline executable lacks a native Windows installer and the GTK wrapper - which fixes that problem - somehow results in the announce address being unreachable. Besides that, the UX of connecting devices is extremely complicated. Given that BTS 2.0 already works on my end (most of the Android & Windows launch bugs have been ironed out in the past week), I’ll have to give this a rest for now. I’ll check back later if BTS starts acting up again.


(Bob Hope) #4

Hi!

You can use Synctrazor to have an windows installer. You can download it over there.

Enjoy!


(Judah Richardson) #5

Thanks man! That worked perfectly on the Windows side. Now I’m just trying to figure out how to get folders I share with my Android device to actually show up in the Android client.


#6

AFAIK the Android client does not show the dialog to add a folder which was shared with you. For that I always use the web interface, where you will get a prompt for every shared folder.


(Judah Richardson) #7

Thanks, I tried that and got it to work, but the UX is awful to say the least, what with having to manually type out folder paths instead using a selector and all. Progress is progress, I guess.


(Judah Richardson) #8

Does the web GUI show all the peers for a given folder, or just the one(s) that was(were) explicitly connected via ID exchange? Curious because if it does that’s great for troubleshooting and seeing what’s going on. OTOH if it doesn’t it’s difficult for the user to determine sync status.


(Bob Hope) #9

Only the ones that were connected.

eg: (no Introducers definded) A <> B, C, D <> F A is connected to B, C and D. All these 3 are connected to F. A is not connected to F All share the same folder. A cannot see (or know about) F


(Judah Richardson) #10

That makes sense. However, I was referring to the case in which all peers have been defined as introducers.

Do all introducer peers for a given folder show up in the client GUI, regardless of whether a manual Device ID exchange was done? e.g. If A, B, & C are introducers BUT Device ID exchanges were done between A <> B and A<>C only, will B show up as a peer in C’s UI?

Thanks all for your patience. I’m genuinely trying to learn the ropes.


(Alex) #11

They will all show up in your device list no matter how they were added (manual or by the introducer)


(Judah Richardson) #12

@Alex Fantastic! Thanks man. I’ll add some other devices today and see how it goes.


(Judah Richardson) #13

So far so good. I migrated 3 Windows PCs and my Android phone to Syncthing today.

@bigbear2nd (or anyone else) what’s the best way to get Syncthing up and running on Linux Mint such that it runs at login like Synctrazor does?


(Bob Hope) #14

For more detailed information about the introducers, you can have a look here: (shameless selflink:)


(Arne Ko) #15

For Linux I definitely recommend syncthing-gtk. While you seem to have had some bad experience with it on Windows, I run it on several Linux-machines (Mint, Arch, Ubuntu) without a problem.


(Stefan Tatschner) #16

If you are using a distro using systemd, just enable it:


(Kenneth H. Nielsen) #17

I have a question regarding the orriginal topic with introducer.

Say I have a configuration where A is connected to B and they are both marked as introducers, then C and D gets connected to A, at the same time E and F gets connected to B.

C, D, E and F are not marked as introducers, in the event that A should be down, automatically C and D should sync with B untill A gets online again and starts to sync with B.

In the event that A and B both are down, will C figure out to sync with say F?


(Audrius Butkevicius) #18

To make it less typing let’s scrap D and F.

So for you to add C, you will have to restart A, once A restarts and connects to B, B will add C. C will not add B, because from C’s perspective A is not an introducer, hence C and B will not sync.

Hence no.


(Kenneth H. Nielsen) #19

But as soon as B adds C, B will figure in C needed to be accepted, and from there on C and B should both know of each other.

Or not?

Because this is the behaviour I see on all my nodes when I make a reinstall creating new identity on one of the devices.


(Audrius Butkevicius) #20

No, C will not add B, as C does not mark A as an introducer, hence it will have to be added manually/via the prompt.