I have a QNAP NAS and I installed syncthing from the package manager (myQNAP repository).
The actual version is 1.3.0.
Today I noticed in the syncthing administrative interface the button to upgrade it to the latest 2.0.
I tried but something went wrong and the application couldn’t restart well. I think the upgrade procedure is not compatible with the installed package and the way qnap installed it.
I’ve just been looking at exactly the same thing today!
The problem lies in the launch script - syncthing.sh - which needs editing to update it for the new double-dash arguments. Once this is done, you should be good.
To do this, you’ll need to SSH into the Qnap and find the syncthing.sh file - for me it was in /share/ZFS531_DATA/.qpkg/syncthing/syncthing.sh - but I don’t know if the early parts of this file path are different for different installations.
Your formatting has been messed up by the forum software (which merged double -- dashes into en – dashes), but basically you need to change all leading single - dashes to double -- dashes, e.g. --home instead of -home, etc.
Not sure if I have exactly the same script (same name but different capitalisation). Mine had the same command (and fix), but also had an earlier line syncthing -upgrade which I changed to syncthing upgrade.
I noticed there is also a syncthing -upgradeand I didn’t change it. I don’t know if it’s correct or the dash should be removed or it needs a double dash. I just know that the upgrade (from the web dashboard) worked but the server didn’t restart as expected. The log showed syncthing shutdown but not a restart. So i stopped the application from App Center (although it was already stopped) and then I restarted it.
Yes, I had the same - running on my 15 year old ancient QNAP TS-559 Pro II.
I looked up where syncthing.sh in /etc/init.d/ was referring to. For me it was /share/MD0_DATA/.qpkg/syncthing and on line 105 I changed
Wanted to share my experience with upgrading my environment. My 3 QNAP units are dual-tier, with SATA HDDs for bulk storage and critical files and high-load apps on SSD. The Syncthing QPKG is hosted on SSD, along with its back-end DB. In my case (QTS 5.2.6, SSD array was the second to be created), the path was /share/CE_CACHEDEV2_DATA/.qpkg/SyncThing. My installed Syncthing version before I started the upgrade was 1.30.0, and the web UI offered to upgrade to 2.0.2.
Refresh your off-box backups (I use an OWC RAID enclosure with SATA SSDs that I unplug and put away when done)
Enable SSH connectivity to each QNAP if disabled
Pause or minimize all other storage activities until the upgrade completes to reduce resource thrashing
Start the Syncthing upgrade from its web UI, watch Resource Monitor in the QNAP web UI to see when all Syncthing processes stop
Stop the Syncthing app in QNAP App Center
SSH to the unit and edit /share/<RAID ID where Syncthing QPKG is hosted>/.qpkg/SyncThing/SyncThing.sh
Scroll down to lines 36 and 38 and change all CLI flags to use double-dashes. (Pasted version below.) Save the file.
Start Syncthing app in QNAP App Center. Don’t touch anything except Performance Monitor and try to stop/minimize all other storage activities. When the upgrade completes, you’ll see your disk utilization drop down to normal levels, and the Syncthing web UI will come up. The RAID array where the Syncthing QPKG is installed will get hammered the hardest - I saw spikes of up to 145 MB/s.
Lines to change in SyncThing.sh - this is the final state
Looking at the snippets shared in this topic, it seems I’m lonely with my QPKG installation, which seems completely different. I would say, that I’m running Syncthing from that package over a decade or so (from v0.11 or v0.10).
I started with Syncthing from a QPKG installation but I noticed the application proposed an upgrade to v2.0 while the QPKG was limited to the v1.3. Maybe it takes time before the package’s update.
For example, on my laptop syncthing didn’t propose any update to the v2.0.
Yeah, assuming you use the official APT packages, you need to manually change the channel in order to upgrade to Syncthing v2 (see https://apt.syncthing.net).
FWIW I used the QPKG from here - Release v1.23.0-alpha1 · bmachek/syncthing-qnap · GitHub - and it prompted me for the v2 upgrade. At that point I then had to edit the syncthing.sh file to add double-dashes, as already noted.