I want to replicate my Syncthing configuration from one device to many others. Can this be done efficiently? How?
I don’t want to set up each device by hand because there are a lot of shared folders and a lot of devices. It will be tedious to do that manually.
What I tried so far:
I took the original configuration file and replaced the folder GUID’s with new ones, then copied that file to a new device, retaining that device’s own unique ID. However, Syncthing fails to start. I assume it is looking for those specific folder GUID’s to exist in its database?
So far I have not found any documents on copying a conf.xml from one device to multiple others.
I’ll try again. From your reply, I assume it should work. After I try again, if I can’t get it to work, I’ll post the log or console output. Thank you.
What I have gathered from this thread is that I should be able to simply copy a working config file from one device to a new device. That’s mainly what I needed to know. (If that is how it can be done, I’m sure I’ll sort out the details. If not, I’ll reply with specific error messages.) Thank you.
I have this working now. I can indeed copy a complete configuration file from an existing device to a new one. It requires only minor editing of the configuration. I have done it for a couple different devices today and I did not have any problems – as long as I let syncthing make the device id’s.
What I’m doing now is starting syncthing on the new device to let it generate a config file and device ID. Then I shut it down, copy the device ID, and edit the config file as required.
I would like to know if I can create my own GUID’s for the new device’s ID. Then I could simply copy the new config file into place using my own GUID to further simplify my steps.
In my OP, I mistakenly called the device ID’s “folder GUID’s”. Anyway, I am talking about the device id that looks like this in the XML config file:
Can I make those up myself (e.g., using uuidgen on the Linux CLI)? Do they have to meet any specific formatting rules or other criteria?
Using my own ID’s is the only part of the process that seems to be giving me any trouble. uuidgen generates a GUID that is a different length than the one that syncthing generates. Here’s an example:
$ uuidgen
6c2a4c71-b04e-42a6-8234-8987356b8682
Could that be the cause of my original problem? Thank you.
The API key doesn’t have to be changed but best practice suggests you would change it.
It is used to by the rest API to authenticate request so a malicious actor with your API key can issue commands / take control of your Syncthing instance.
If, on the other hand, you are using a bot to control multiple ST instances and, like me, you are lazy. Only having one API key can make things simpler… Not best practice but sometimes worth the trade off