ID of Computer

Hello guys. I ran into a problem. Backstory is I am helping a charity with IT related stuff and a while ago they bought nearly 100 Windows Tablets for their external workers. There is only Windows 10 Home installed so the administration of these tablets is an absolute nightmare. I wanted to come up with a cheap solution for some simple tasks and created a VM from where i can publish Tools/Scripts and other stuff which run on the tablets via task scheduler. I set up my VM and tested it on one tablet and all worked fine and dandy. Then it struck me. I wanted to image this tablet and distribute this image at their annual meeting. But when I put this image on many tablets they all end up with the same ID and I don´t think that´s going to fly. Has anyone with more knowledge of Syncthing an idea how to solve this problem?

Thanks and sry for the long description

Yes, you’ll need a separate ID and keys for each machine. You can create all those 100 instances locally in advance, prepating syncthing’s ‘data’ folders to be deployed for each machine. Keep in mind that once you’ll have all the IDs, you’ll need to link their configs in the way you want.

It might still be a good idea, to pre-create targeted configs, but there is a way to ensure different IDs without pre-creation: In the config, remove all references to your own device ID and delete key.pem and cert.pem. When a client starts with such a config, a new device ID will be generated.

1 Like

So if I understand you correctly I delete references to the local ID in config and delete key.pem and cert.pem. I shut down the tablet and pull an image with clonezilla. I put this image on the other tablets and on first start they will generate new key.pem and cert.pem and make the changes to config(I installed syncthing as service with nssm)? The shared folder I configured will survive this stunt so I “only” have to accept the incoming connections on my “server” from the different tablets as soon as they have internet connection?

That sounds right.

Accepting the connections on the server will be necessary. If you want everything fully working immediately without confirmation, you’ll need to generate configs with the appropriate IDs already set in place. As you are talking about a hole lot of devices, that may be a good thing to do.

1 Like

I found myself in a similar situation (generating new IDs with existing configs and shared folders) but for a completely different reason.

I already had a particular machine setup and syncing. I wanted it to have a different ID because it’s icon looked similar to another machine. A small thing, I know, but it made my eye twitch :wink:

I shut down Syncthing on the machine in question, deleted key.pem and cert.pem (with backups of course) and fired up Syncthing again. When started, the old ID showed as a different node, and I removed it (I could have done this manually before starting). Once the new ID requests were accepted on the other machines, things resumed as if nothing had happened - but with a new ID and icon. Very easy. Syncthing never fails to make my life easier :heart:

2 Likes

After some testing I can confirm that this method works.

I deleted key.pem and cert.pem. I deleted in the config.xml following lines:

In the folder section near the top

and in the device section further down this whole segment dynamic false false 0 0

Syncthing was tested when running manually and installed as a service. All I had to do was confirm the connection on my Source-PC.

Thanks a lot for your help guys and Syncthing is a fine piece of software!

2 Likes

Second try…

After some testing I can confirm that this method works.

I deleted key.pem and cert.pem. I deleted in the config.xml following lines:

In the folder section near the top

device id=“XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX” introducedBy=""></device

and in the device section further down this whole segment

device id=“XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX” name=“MYPC” compression=“metadata” introducer=“false” skipIntroductionRemovals=“false” introducedBy=""> dynamic false false 0 0 </device

Syncthing was tested when running manually and installed as a service. All I had to do was confirm the connection on my Source-PC.

Thanks a lot for your help guys and Syncthing is a fine piece of software!

1 Like

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