Syncing Syncthing config.xml file between computers for same settings

I use syncthing to one-way sync of folder from server to many clients (Ubuntu Linux). All clients configuration is managed by Puppet from server and at most equal (different is only hostname and some local settings).

I want automate install and configure syncthing server on each computer automatically without manual actions.

Seems that syncthing store all configuration in one file .config/syncthing/config.xml so I can install syncthing, copy configuration file and launch server.

Can I sync config.xml file (via Puppet) to each client system for automatic setup with same settings, folders and connections to server? Or each config file contains some local items (for example, local device id) that must be unique?

If yes, can I split config.xml to parts (local and shared), for example, like config.xml.d folder with many files, that will be concated?

It’s not just the config file that is required. The certificate files alongside it are also required, and these device what device ID you’ll have.

You could ship a config.xml that has all the folders and devices you want setup (apart from your own) and it would get automatically added as it starts up.

Though best way is probably having a script that starts syncthing (which generates certificates config and what not) and adds devices via rest api.

I already test this case - all works well!

Before first start of Syncthing, I create only .config/syncthing/config.xml file (copied from other slave host) and at first start Syncthing generate unique id and certificates in other file, and use pre-defined config.xml file without changes.

So each host have unique id and name, but same other configuration options.

Seems that all unique to host settings Syncthing store in other files, not in config.xml file.

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