Autoupdate mechanism

When I want to update ST I go to the github releases page, browse what’s new and make a decision about updating. Invariably I just get the update anyway because newer==better right? So I grab the AMD64 binary URL and stop ST on my laptop (CTRL+C - no fancy daemons here) and wget the new version, unpack it and then ssh to my desktop and server and do the same there. Then finally start each one in turn looking out for disasters.

Would it be possible to have some kind of automatic update mechanism? Bonus points if one node gets the update then shares it with the others which update and restart. :smile:

If only the platform had a way to do this!

Hang on, it does. :slight_smile: Ubuntu does, anyway. Why don’t we[1] set up a syncthing PPA?

[1] you :wink:

1 Like

Hah! Well, funny man, I was expecting people on other platforms to maybe want an update mechanism too. But you’re right, screw those guys :wink:

It’s something I’ve been thinking about. Technically it’s not rocket science; the latest release data is available as JSON on including links to .tar.gz files etc. Parsing that and grabbing the appropriate .tar.gz could be done. I’m slightly more concerned about 1) hardcoding in that github URL and 2) authenticating the release to avoid pulling in some random code.

Btw another line of thinking is that if one node was designed “trusted master” (by some checkbox or whatever on the other nodes), it could expose a “meta-repository” of some sort that could include the desired release of syncthing and a base configuration or something like that. Other nodes would then trust that and apply upgrades as they are published by the master node. It’s a bunch of complexity though.

An upgrade-syncthing shell script (or .bat file) that just grabs the latest release and does the upgrade would be an easy step zero. :wink:

While I understand that other platforms want it too, having syncthing fit in with the upgrade process on each platform rather than reinventing this particular wheel once again from scratch would be much better for users, although I admit more work.

While I agree with @sil in principle, I’ve added an optional, non-automatic upgrade system.

Huzzah! Got the chance to try this today. Worked a treat, thank you.

alan@deep-thought:~/Applications/syncthing$ ./syncthing -upgrade
2014/05/12 15:40:42 INFO: Attempting upgrade to v0.8.5...
2014/05/12 15:40:42 INFO: Downloading syncthing-linux-amd64-v0.8.5.tar.gz...
2014/05/12 15:40:44 OK: Upgraded "/home/alan/Applications/syncthing/syncthing" to v0.8.5.
2014/05/12 15:40:44 OK: Previous version saved in "/home/alan/Applications/syncthing/syncthing.v0.8.4".

the autoupdate didn’t work for me on the raspberry pi (ARMv6) with raspbian, it just says

2014/05/19 10:06:25 INFO: Attempting upgrade to v0.8.7...

and closes again, on other PCs it works (testet on Ubuntu 32bit, CentOS 64bit)

Right. That’s a bug; the ARM releases aren’t named as syncthing expects, because they are all “linux-arm” architecture wise but there is actually three of them (v5, v6 and v7). Please create an issue at

Yes, i can confirm this.

btw. What’s about to add a “upgrade” button on the WebGUI ?

Planned, requires some minor changes to the restart process.

This has been implemented in the latest version for anyone finding this thread.