Skip to content

Syncthing: Disable auto-upgrade #6725

@LukasKnuth

Description

@LukasKnuth

Syncthing didn't start successfully on my DS212j. The logs under /var/packages/syncthing/var/syncthing.log showed the following entry multiple times:

WARNING: Accepting connection: accept tcp [::]:22000: accept4: function not implemented (restart)

This issue was reported on the official Syncthing repo: syncthing/syncthing#8325
It was then fixed upstream in Go: golang/go#57333

This fix worked until go version 1.24, where the minimum Kernel version was increased to 3.2: golang/go#67001
The Kernel version on the DS212j is only 2.6.32.12 (no updates available), so the syscall does not succeed.

The auto-upgrade

This installation ran at my parents house unattended for about a year. A few days ago I randomly checked it and noticed it hadn't synchronized in months. It seemingly broke "over night".

When I checked in the "Package Center", the "Installed Version" was 1.23.4-29.
But running the the executable manually via SSH:

$ /var/packages/syncthing/target/bin/syncthing --version syncthing v1.30.0 "Gold Grasshopper" (go1.24.4 linux-arm)

Without a manual update step, the version was updated. The update then broke Syncthing because of the new Go version and unsupported syscall.

Fix

  1. Uninstall Syncthing in "Package Center"
  • SAVE /var/packages/syncthing/var/config.xml first to retain your configuration!
  1. Go to the architecture list and find the one for your model
  2. Go to the repo website and download version 1.23.4-29 for the correct architecture (88f628x in my case)
  3. Install in "Package Center" via "Install Manually"
  4. IMPORTANT Untick the box "Run after Installation"
  5. Once the installation completes, SSH onto the Diskstation
  6. Edit /var/packages/syncthing/var/options.conf to contain SYNCTHING_OPTIONS="--no-upgrade"
  7. Copy back your config.xml
  8. Start Syncthing via the "Package Center" UI

Adding the --no-upgrade option BEFORE starting is required, otherwise Syncthings auto updater updates to the newest version (1.30.0) on the first start and your install is borked again.

Suggestion

To avoid breaking existing installations for users with the silent auto upgrade and to give users more manual control when they want to update, I suggest having the --no-upgrade option as a default.

Upgrades can still happen manually through the "Package Center".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions