Keeping Syncthing Running: Mac OS X (LaunchDaemon)

(Andy Balholm) #22

To keep from ruining the performance of other programs, it is wise to add another item to the plist:

<key>ProcessType</key>
<string>Background</string>
0 Likes

(Dirkjan Ochtman) #23

I’ve made a pull request for this to homebrew:

0 Likes

(Dreamcat4) #24

Hello. Thanks for this. For a Menu Bar Item I have put up some instructions on github, syncthing/syncthing/issues/982

0 Likes

#25

This used to work, but for some reason it doesn’t autostart anymore. Is this a known error in Yosemite or am I doing something wrong?

0 Likes

(Jakob Borg) #26

This is in the repo, and should work fine (it does for me):

0 Likes

(wizonesolutions) #27

How do I kill syncthing? It respawns automatically when I do a regular kill. Do I have to send it a special signal or kill -9? I’m guessing it’s coming back up because of the restart functionality.

0 Likes

(Audrius Butkevicius) #28

There are two processes, you have to kill the monitor process first, and then the app process.

0 Likes

(Jakob Borg) #29

launchctl unload ~/Library/LaunchAgents/syncthing.plist

(or whatever the plist name was)

(launchd respawns syncthing when it’s killed)

0 Likes

(wizonesolutions) #30

@calmh: Yeah, I unloaded it, but even that didn’t make it stop. That’s what was so confusing. I’m pretty sure I am only running it using Homebrew.

0 Likes

(wizonesolutions) #31

OK, yeah, uninstalling using Homebrew and removing the symlink in ~/Library/LaunchAgents DOES make it stop. I can’t find any other way, though. My launchctl unload commands are seemingly ignored. Hrm.

0 Likes

(wizonesolutions) #32

Reinstalling syncthing via Homebrew fixed everything. It’s behaving now and listening when I tell it to stop (it’s been CPU/memory-intensive, so I have been wanting to turn it off while doing things that need those resources).

0 Likes

(Rouviere Joël) #33

Is there a special reason for naming se.nym.syncthing.plist instead of syncthing.plist ?

0 Likes

(Jakob Borg) #35

The plist files are often named with reverse domain to ensure uniqueness. I probably named it like that at some point before syncthing.net was registered.

0 Likes

(Myke) #36

Just a small suggestion - in the readme, put the example launchctl command on it’s own line. Much like others above, I was a little confused by having the command split across two lines to suit the English paragraph :smile:

0 Likes

(Marc) #37

Even though this seems to be a really thread, it still worked for me on my Mac…at first. Now it doesn’t load on restart, but the launchctl command says it is already loaded. Thanks!!

2 Likes

(Cinghialino) #38

thank you.

0 Likes

(Jonathan Cross) #39

I am also having a problem getting syncthing to actually start automatically. I followed instructions here: https://docs.syncthing.net/users/autostart.html#mac-os-x

launchctl says it is running:

launchctl list | grep syncthing
-	0	homebrew.mxcl.syncthing

However there is no PID, other devices cant see it and there is no web GUI or logs, so I doubt that it is actually running. I’ve tried using start / stop / load / unload / kickstart / sudo and messing with permissions and no luck. Running syncthing as a foreground app works fine BTW.

Any debugging suggestions?

0 Likes