Attempting to install & use Syncthing on a ReadyNAS

Hi all,

Firstly, thanks for Syncthing, I have been using it to sync the files on a remote server with an external HDD connected to my laptop for over two years now and it works very well and is extremely useful, so the continued development is much appreciated.

Now I want to expand my use of it to sync the files contained within my Music folder on my NAS with a partition on another external HDD. The music folder is already backed up to the Cloud roughly every other week but I want more redundancy and a local backup that would be easier and quicker to restore from in the event of an issue with the NAS since the files represent a huge and growing time investment.

I am using a ReadyNAS Ultra 2 running ReadyNAS OS 6.10.1

The guide I am attempting to use to install Syncthing is a one written by Danish Nadeem called How to install SyncThing on ReadyNas and Autostart.

The processor on my ReadyNAS is an Intel Atom D425 @ 1.80GHz and I installed the Linux 386 v1.2.1 of Syncthing on the ReadyNAS, which appeared to install ok.

However I am stalled at Step 5; I can start Syncthing on the NAS but no Node ID appears. I have tried ending the process anyway and attempting the next step of editing the config file with nano ~/.config/syncthing/config.xml but get nano: command not found

(Not sure whether it has any bearing on the issue but I am SSHing into the NAS using Terminal via macOS.)

I hope that’s a decent summary of where I’m at. Unfortunately, the guide linked to above is now nearly 4½ years old so I feel it is likely that Syncthing (or ReadyNAS OS) has changed significantly in the meantime such that the guide itself needs updating in order to work.

In addition, attempting to visit the GUI in my browser by visiting http://127.0.0.1:8384/ does not work either, even if I substitute the URL of my NAS.

If anyone can offer any pointers so I can get Syncthing to work on my NAS, it would be very much appreciated. Thanks in advance.

In general I wouldn’t advice following an ancient tutorial unless you actually understand the steps - chances are huge they are totally obsolete. I’d look for explanations how to install and run any kind of program on readynas and go from there.

As to your concrete error message: You missed the second step when you don’t know what’s going on (the first is trying to understand the literal meaning of the error message, which I think is pretty clear in this case): Copy the error (possibly along with some keywords, but not necessarily) into you favorite search engine.

Thanks for your reply.

Yes, I have managed a bit more progress since my original post. Looking at the history in Terminal, I could see that the config file was created on the initial start of Sycnthing on the ReadyNAS and yes, some more searching has revealed to me that nano is a text editor that isn’t installed on the ReadyNAS OS but Vim is.

So, I have edited the config file and am progressing from there…

1 Like

To update - got it all working. Initial scan and full sync completed successfully. :+1:

The only point of concern is the warning:

Syncthing should not run as a privileged or system user. Please consider using a normal user account.

I don’t know if running Syncthing as root on my NAS was just necessary for the initial install or needs to run as such for it to work :confused: at all.

Should point out that I have set up a username and password to access the Syncthing GUI, so hopefully that ameliorates the risk associated with the warning somewhat. If, ideally, it needs to run under a normal user account, I am not sure how to go about that.

What are the risks of Syncthing running as a privileged or system user? Thanks.

There are many risks, we introduce a bug and wipe all your data, even in the system directories, bricking your machine. We introduce a bug in the protocol which allows an attacker to escape syncthing process and get a shell, a root shell in this case, etc, etc.

Well that’s sobering to know, thanks for your reply.

I’ll continue to attempt to find a way to re-install Syncthing with user privilege. Unfortunately the ReadyNAS OS hasn’t got a Syncthing app and porting it over is beyond my expertise.

From searching, whilst someone did take it upon themselves to get a Syncthing app onto ReadyNAS OS6 as a paid-for €3 add-on, it hasn’t been updated since December 2017 from Syncthing 0.14.41. I would happily pay €3 if it was updated for the ease of installation, increased security and adhering more to best practice.

There’s not really something to port, as syncthing doesn’t have much/major OS-specific things inbuild.

The installation instructions you used simply used the official syncthing release for your CPU/OS architecture - that indicates that the only OS-specific thing is the execution of the binary, which was performed using systemd (which is highly common accross Debian/Ubuntu/other Linux). I’m confident you can download and use all offical syncthing releases from here on your NAS.

I don’t know anything about ReadyNAS, but a bit of googling suggested that ReadyNAS is simply modified version of Debian. Therefore you may even be able to install syncthing’s debian releases or if apt-get doesn’t work, maybe you can install the .deb manually using dpkg -i <file.deb>.

The site says it’s a .deb file. I have a feeling someone there is just ripping users off, as it’s probably the exact sime .deb file syncthing provides for free. I can’t imagine ReadyNAS being so different that it supports .deb files but is Debian-incompatible and therefore requires a modified file. If so okay I’m wrong, but that simply seems unlikely to me.

2 Likes

In short follow the instructions on the link @Nummer378 posted (https://apt.syncthing.net/) and then this to get it up and running automatically https://docs.syncthing.net/users/autostart.html#using-systemd. If you encounter problems, both describe the steps you have taken and what happened (and how that’s different from what you want to achieve if not obvious (if in doubt assume everything is not obvious)).

1 Like

OK, thanks for all your replies and taking the time to write some guidance. I will attempt this when I next have the requisite time.

Regarding the Syncthing intall as root, it will need deleting?

No, running Syncthing as root is the problem. And running Syncthing as a specific user is covered in the links above. What’s likely not covered is how to create users under linux, but you can find tons of instructions to do that.

Thanks again for taking the time to reply.

I am not currently able to get stuck into this atm due to an upcoming exam then holiday so will only update this thread once I do.

1 Like