So I’m trying to run syncthing on MacOS as a service. So that it will be synchronising even when the mac is on the login screen.
This because I’m synchronising folders of 100gb, 200gb, 300gb and 600gb depending on the folder the client uses for it’s operational work.
These clients are no always manned but I’d still want them to sync even when the user is not logged in yet. For some annoying policies I had to turn off display after 25minutes and 5 more minutes later it’ll logout the user.
I’m not sure how this works because you don’t want to run the syncthing daemon as root user. And create a specific syncthing user on the system and give it the correct permission. So syncthing is unable to screw up the system.
You put the plist into /Library/LaunchDaemons but edit it to say which user the script will run as
The key you need to add is UserName. For example I run a newserver as user _news
So to be more complete on my situation, I already had syncthing installed on clients, but due to security reasons I had to make the machines logout after X minutes.
BUT I still need to folders to be synced whenever needed.
I needed to make some changes, and thanks to @jerryjacobs also used the UserName entry.
And for some reason it doesn’t like the log paths, unfortunately…
Might need some more research in that, it didn’t even like the /tmp/ folder…
For now this is my syncthing.plist in /Library/LaunchDaemons/