Setup Syncthing on spot virtual machines

Hello there. I ran into a ticket at work, which require me to create 2 machines to be the bastion host, and to both share the same home folder on a single disk. I would like to know if there is a way to setup SyncThing with the help of a startup script and to make it automatically connect to the other machine since it can be taken down at any time by the cloud provider. The machines are CentOS 7, provider Google Cloud Platform.

Thank you in advance

Sounds like a hammer problem.
I’d probably rather check out how to make whatever modifies the home directories do so on both hosts.

And autoprovisioning Syncthing is definitely doable, you’ll find topics on the forum on it and the community contributions page links to ansible setups (and other deployment tools too I think).

1 Like