My attempt at CLI-Based onboarding of new syncthing clients, with auto-accepting of folders.
This was originally posted here, but I'm keeping a local copy for self-reliance and preservation: https://forum.syncthing.net/t/my-attempt-at-cli-based-onboarding-of-new-clients-with-auto-accepting-of-folders/24632/1
I know this has been done a million times, but I got it working for 2 test clients and I wanted to share as it has taken me some effort to get this all in 1 place. Maybe this isn’t that applicable, but for me it is. My environment has the following:
- About 30 linux VM’s and clients
- One “Primary” syncthing device, which is my introducer. We need that device’s ID, and the ability to ssh into it.
- Device ID stylized as AAAAAAA-BBBBBBB-CCCCCCC-DDDDDDD-EEEEEEE-FFFFFFF-GGGGGGG-HHHHHHH, make sure to replace
- Introducer hostname stylized by INTRODUCER-HOSTNAME, make sure to replace
- If you use an alt port, change it from 22
- Optionally, a list of shares we want everyone in the group to have; you can also enumerate them for automatic adding, my examples are below:
- ~/.dotfiles called .dotfiles
- ~/.scripts called .scripts