Why is the folder ID left as a choice to the user?

When fixing a bug in syncthing-map, I realized that one can force the ID of a shared order (I knew that but never really paid attention).

Why is it so? Why not have gone the devices way where the ID is generated and not directly modifiable?

(this question utterly is out of curiosity to maybe better understand the philosophy behind Syncthing decisions)

Because it is entirely plausible that you need to add a folder where only you know the ID that another device has already chosen for it. Often you will get a sharing “invitation”, but otherwise you will need to enter the ID manually. Conceptionally, there is no difference between adding a “new” shared folder (with a new, unique ID) and “joining” a shared folder which has already got an ID from somewhere.


If I remember correctly from the ancient Syncthing history, originally the ID was the label, and what is currently the label was only introduced later.

This is the GUI from version v0.10.14 (see https://docs.syncthing.net/v0.11.7/intro/getting-started.html).

As you can see, there is no label. The ID is literally the folder name.


Thanks - I thought that you always get an invitation prompt. If this is not the case then indeed this is the only way to provide that information.

As mentioned, that feature didn’t always exist. But you might also want to configure a device before it’s connected to the outside world, if you’re in a cabin in the woods or going to ship it to a research station on Antarctica.

1 Like

Or if you are in France like me and there is a probability of snow tomorrow (I estimate about 1 mm (0.04 in)) and the whole Paris region is preparing to sustain this.

And a general strike on Thursday.

So yes, now I understand the rationale.

1 Like

And once the folder is created, you can only change the ID with Actions/Avancé settings. Even it would be cosmetic only, you can pick a friendly looking ID that tells about the folder purpose. BTW devs, are there any limits (length/char set) for the folders ID ?

Great piece of soft isn’t it Wpg? Sun shine to you from 64.

No specific limits apart from what’s practical, iirc. For presentation purposes it will be interpreted as an utf8 string.

To be able to enter the folder ID is a necessary feature of you want to connect two folders (perhaps very far from each other) where you have done an initial sync by other means (such as copying files from a USB stick):