required steps after cloning a syncthing installation

I want to clone a syncthing installation using clonezilla to deploy it on all PCs in a classroom. What steps are required afterwards so each installation knows it’s a different installation? Can I automate these steps (with scripts)?


I am assuming the configuration of the shares has been completed before the creation of the clone.

You can then delete the certificate files and new ones will be generated on first run.

The issue is adding the new nodes to the share, they will try to connect but you will have to accept each new node.

If you image often this could be a problem. A script tying machines to IDs might be beneficial.

It is also possible to run ST with the generate flag to generate the IDs and certificates before deployment. It all depends on how when and where you deploy.

thanks a lot for your answer! The part with deleting the keys work perfectly. How would the part with automatically accepting the new nodes work? I know which hostnames I will create so tying the hostname to the device id sound promising if I could accept them beforehand…

Sorry for the slow reply, work has taken off at the moment.

This really depends on your environment. I have post deploy scripts that run on my machines to configure hostnames, admin passwords, dock builds (I currently only manage Macs) and the like.

I would have my machine be set as an introducer and and accept all of the other instances through it.

If you reimage often, as we do, I would store the certificates remotely and and have a deployment script populate them into the config folder.

1 Like

Thanks a lot!

Just as reference: I made a small script which deletes the syncthing keys when the hostname changes and set a master node as introducer. The only manual step is to accept all nodes on the master node once - the rest works automatically.

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