Installing rclone on Synology (DS414)

I’ve been trying to install rclone on my Synology DS414.
I hit a few stumbling blocks and figured this might help out someone searching for answers on the forum.

Firstly, check which processor your Synology NAS is running:
https://www.synology.com/en-uk/knowledgebase/DSM/tutorial/General/What_kind_of_CPU_does_my_NAS_have

For me this was:
DS414 Marvell Armada XP MV78230 Dual Core 2 Yes Armadaxp DDR3 1 GB
(arm processor?)

I had been following the instructions on the rclone install page
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip

however, what I have discovered, after also trying:
curl -O https://downloads.rclone.org/rclone-current-linux-386.zip

is that I might need the arm version:
curl -O https://downloads.rclone.org/rclone-current-linux-arm.zip
(NB: should I be using this one, or the arm-64?)

visit this page to browse all the available versions of rclone you can download:
https://downloads.rclone.org

ie.
rclone-current-freebsd-386.zip
rclone-current-freebsd-amd64.zip
rclone-current-freebsd-arm.zip
rclone-current-linux-386.zip
rclone-current-linux-amd64.zip
rclone-current-linux-arm.zip
rclone-current-linux-arm64.zip
rclone-current-linux-mips.zip
rclone-current-linux-mipsle.zip
rclone-current-netbsd-386.zip
rclone-current-netbsd-amd64.zip
rclone-current-netbsd-arm.zip
rclone-current-openbsd-386.zip
rclone-current-openbsd-amd64.zip
rclone-current-osx-386.zip
rclone-current-osx-amd64.zip
rclone-current-plan9-386.zip
rclone-current-plan9-amd64.zip
rclone-current-solaris-amd64.zip
rclone-current-windows-386.zip
rclone-current-windows-amd64.zip

TIP:
If you have trouble accessing your Synology via SSH you can install sshfs via Community Packages

Q: does it matter if I access my Synology as root or a normal user?
Q: should rclone be installed as root or normal user?

the next line on the install page tells me to run:
unzip rclone-current-linux-amd64.zip
or for me this would be:
unzip rclone-current-linux-arm.zip

My Synology doesn’t have unzip installed – but it does seem to have 7zip
so I used:
sudo 7z x rclone-current-linux-arm.zip

then I ran:
cd rclone-*-linux-arm
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone
sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb

this last line gave me an error:
sudo: mandb: command not found

is there any way to fix this?
I read on the forum that it isn’t necessary to have this for rclone to run(?)
but can it be added/installed on Synology?

then simply:
rclone config

to run…

I think this would have been easier if my specific Synology NAS model supported Docker (but apparently it doesn’t).
https://www.synology.com/en-us/dsm/packages/Docker

The stumbling blocks for me were I wrongly tried:
rclone-current-linux-amd64.zip
rclone-current-linux-386.zip

which lead to the following error:
-sh: /bin/rclone: cannot execute binary file: Exec format error

also using 7zip instead of unzip solved another problem.

I wasn’t able to figure out the bit about ‘mandb’

You don’t need the man page - rclone will run without it.

Nice writeup - thanks. Fancy making a page on the rclone wiki with the above in?

The new install script works well on Synology, other than the lack of support for ‘unzip’. So if you do:

curl https://rclone.org/install.sh > install.sh

and then edit the file to change this line:

unzip -a $rclone_zip -d $unzip_dir

to this:

7z -x $rclone_zip -o $unzip_dir

It should work fine.

Considering rclone seems to support Google Team Drives… that’d be a real plus if it could be integrated in the packages UI or used as base in Cloud Sync

As of approx Dec 2018, a check for 7z has been included in install.sh. It works for me.