NAS - Synology Box

Does anyone have instruction hot to install it on Synology Box ?

There is a Package Source that has been developing a Syncthing installation for the Synology NAS.

http://cytec.us/spk/

This spk installation has bugs, in my opinion. It will install, and it will open a WebGUI. Unfortunately, when you make any configuration changes, Syncthing will hang on the required restart. The issue is discussed here:

Hopefully, this will be fixed in the future. If you have discovered another solution for Synology, please share it.

Are thise packages getting updated? And how well does it work?

I have DS214play which has intel ATOM. So I did download linux-386 version of package, unpack it in PC. Then created new user on synology called “st”. Then scp unpacked syncthing program to st@IP_of_my_synology. Then login over ssh to synology as “st” users and start syncthing program. I did stop it with CTRL+C and edit config file, I did change 127.0.0.1:8080 to 0.0.0.0:8080 and then start syncthing again. After that I could enter IP_of_my_synology:8080 to browsere and I did get webuig of syncthing.

This is okay, but when you close ssh sesion to synology program stop. Have anybody idea how to run syncthing on synology without active login to it?

I use DS214 and installed Syncthing from the source that NickPyz mentioned. The version of Syncthing binary is 0.9.4 and the GUI initially listens to port 7070.

Looks like a outdated package but in fact it’s not, that magical button still exists in the web GUI, so just a click you will upgrade Syncthing in your Synology box to the lastest version.

I use it to sync some of my files (13GiB), works fine.

1 Like

well, I am using 0.9.13 downloaded from here as binary package: Release v0.9.13 · syncthing/syncthing · GitHub I thing that you are using dev version. I have not magic button to update.

I am sarting program like this: ./syncthing & so it will run in background. but som how after I logout from synology it stop the program :frowning:

thanks for any tip / help

This is because you start syncthing as subprocess of ssh and when you kill ssh your syncthing get killed too.

I think a simple solution for this is to just start it in screen or tmux. But be warned this don’t stay online between reboots.

1 Like

yes, thats clear I think that syncthing program should fork it self with different parent …

I did write this script:

#!/bin/sh
#
# save this file in /usr/local/etc/rc.d/syncthing.sh

case "$1" in
  stop)
          echo "Stop SyncThing ..."
          kill "`cat /volume1/homes/st/st.pid`"
          kill "`cat /volume1/homes/st/st.pid`"
          ;;
  start)
          echo "Starting SyncThing ..."
          cd /volume1/homes/st/
          su st -c "/volume1/homes/st/syncthing"
          ;;
  restart)
          $0 stop
          sleep 1
          $0 start
          ;;
  status)
          ps | grep syncthing | grep -q -v grep
          return $?
          ;;
  *)
          echo "usage: $0 { start | stop | restart | status}" >&2
          exit 1
          ;;
esac

will be also helpfull if syncthing could save PID of new forked process into file, so script can stop it.

anyway, script should work with current version

Upgrading via the GUI does not work on my box.

The reason is that Syncthing runs as a “normal” user, and the syncthing binary is stored in a folder that only root has write-access to.

You either have to rely on the syno-packages being updated, or log in as root and do it on the command line.

At the moment (09/2014, Syncthing v0.9.13) I would NOT recommend it, because there are some bugs (e.g. #642) preventing it from being usable on my Diskstation.

v.0.9.4 is still running fine.

1 Like

Hello,

I’ve made syncthing running properly in Synology. I don’t know if all of you achieved that, but there is no simple step-by-step instruction, so I wrote it down: https://github.com/jedie/syncthing/wiki/Syncthing-in-Synology-DSM

and I hope author of original package will include my changes, so installation would be simplier ( https://github.com/SynoCommunity/spksrc/issues/1011 )

1 Like

Which one of the Linux versions will run on my Synology DS213+ with Freescale QorlQ P1022 PPC CPU

When I read and understand this correctly, the answer is: There is not a working client for you right now… Sorry!

Well that thread does not have very good news at all. It seems I’ll have to replace my DS213+ with a DS214+ to use with Syncthing.

At least now we know why the current version of syncthing (0.9.17) isn’t working on the DM1812+

The DM1812+ has an Intel CPU and should run the amd64 or i386 binaries. A few versions back the amd64 version stopped working. I switched to the i386 version, which stopped a few upgrades later.

In the beginning the binaries were statically compiled, i.e. they didn’t need any libaries installed on the machine. This changed at first with the amd64 binaries and shortly thereafter with the i386 version.

The libraries on the Diskstation are incompatible and any attempt to get it running with newer libraries from a 64 bit Ubuntu system failed - see here.

However, in the same thread calmh provided a link to a statically compiled version of ST 0.9.17 - which is now run on my Diskstation.

1 Like

well, I have DS214play, after some test I did finally install package from http://cytec.us/spk.

syncthing is upgrading it self, well, it is showing that new version is avaible so clicking upgrade and it will just restart to newer version.

so I am running last version without problems …

1 Like

I can confirm for DS210j and DS214+

I am running lastest (0.9.19) version without any problems.

How could i choose a Folder? I get following error: 9:06:32: Stopping folder “stat /volume1/homes/xxx/sync: permission denied” - %!v(MISSING)

Has the group “users” the read/write rights? And, i am not 100% sure, but maybe there is a / missing at the end. /volume1/homes/xxx/sync/

If I do

ps w | grep syncthing

it shows that it runs as user “syncthing”.

If you become user “syncthing”, you can check which groups it belongs to:

> su syncthing
$ id
uid=100(syncthing) gid=100(users) groups=100(users)

(I’m not sure if I made “syncthing” member of “users” myself, or if it has been done automatically during the installation)

Then choose the rights for the directory accordingly.

I always had to log into the box to set them manually.

I hate responding to myself :smiley:

I meanwhile have version ST 0.10 running on my DM1812+

The only drawback, I had to compile it myself. But that is not hard. You can read my how-to here.