Skip to content

Syncthing restarts and dies #132

Open

Description

@tizio04

Platform
e.g. WD EX4

Application
e.g. Syncthing

Describe the bug
So I'm trying to install Syncthing on my WD EX4 but I can't get it to work.
If I install version 1.3.0 version from this repo, it installs and I can reach the WebUI, but after a minute it tries to update itself, it restarts but never return up again (I can't reach it anymore on ip:8384).
I tried even doing a speedrun to disable auto-updates, but it requires a restart to apply it, and this doens't work either.
Is there a way to get it working?

Activity

  1. petwu commented on Mar 28, 2026

    @petwu

    I had a similar Issue. The following changes allowed me to build and install a 2.x version of syncthing.

    Git Diff
    diff --git a/wdpk/syncthing/apkg.rc b/wdpk/syncthing/apkg.rc
    index 60746d0..6945652 100644
    --- a/wdpk/syncthing/apkg.rc
    +++ b/wdpk/syncthing/apkg.rc
    @@ -1,5 +1,5 @@
     Package:       syncthing
    -Version:       1.27.1
    +Version:       2.0.15
     Packager:      TFL
     Email:
     Homepage:      https://www.syncthing.net
    diff --git a/wdpk/syncthing/build.sh b/wdpk/syncthing/build.sh
    index 222486b..04f2a0a 100755
    --- a/wdpk/syncthing/build.sh
    +++ b/wdpk/syncthing/build.sh
    @@ -10,7 +10,7 @@ echo "Building ${APP_NAME} version ${VERSION}"
     MODELS="WDMyCloudEX4 WDMyCloudEX2 WDMyCloudMirror WDMyCloud WDMyCloudEX4100 WDMyCloudDL4100 WDMyCloudEX2100 WDMyCloudDL2100 WDMyCloudMirrorGen2 MyCloudEX2Ultra MyCloudPR4100 My
    CloudPR2100"
     
     for model in $MODELS; do
    -  ../../mksapkg -E -s -m $model > /dev/null
    +  ../../mksapkg-OS5 -E -s -m $model > /dev/null
     done
     
     echo "Move binaries"
    diff --git a/wdpk/syncthing/install.sh b/wdpk/syncthing/install.sh
    index 109c568..f9976da 100755
    --- a/wdpk/syncthing/install.sh
    +++ b/wdpk/syncthing/install.sh
    @@ -28,7 +28,7 @@ if [ "${PLATFORM}" = "x86_64" ]; then
     else
            PLATFORM="arm"
     fi
    -VERSION="v1.27.1"
    +VERSION="v2.0.15"
     
     MAINDIR="syncthing-linux-${PLATFORM}-${VERSION}"
     PACKAGE="${MAINDIR}.tar.gz"
    diff --git a/wdpk/syncthing/start.sh b/wdpk/syncthing/start.sh
    index 58dda44..9a916b7 100755
    --- a/wdpk/syncthing/start.sh
    +++ b/wdpk/syncthing/start.sh
    @@ -12,4 +12,4 @@ ADDRESS=$(sed -n '/ip/ {s/.*<ip>\(\S*\)<\/ip>/\1/p;q}' /etc/NAS_CFG/config.xml )
     ADMIN_USER=$(cat /etc/group | grep administrators | head -n 1 | awk -F: '{ print $4}')
     
     # start the binary as ADMIN_USER
    -sudo -H -u $ADMIN_USER ${APKG_PATH}/syncthing/syncthing --no-default-folder -no-browser -home=${ST_HOME} -gui-address="http://${ADDRESS}:${PORT}" 2>&1 >> $log
    +sudo -H -u $ADMIN_USER ${APKG_PATH}/syncthing/syncthing --no-browser --home=${ST_HOME} --gui-address="http://${ADDRESS}:${PORT}" 2>&1 >> $log

    The main issues were the following breaking changes in syncthing v2:

    • single-dash options like -home are no longer supported
    • the default folder creating and thus also the --no-default-folder flag were removed

    Therefore, the start.sh script needed to be adapted, otherwise syncthing fails to start due to invalid flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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