Install rclone on Synology NAS
If you need help you can find me on the plex forum or rclone forum @blim5001
First thing is to setup rclone and make sure you can access your google drive
This step will allow you to configure rclone and so create a working config that you will need later
After this you will be able to list and manage the content in your google drive using rclone commands
What it will NOT do is allow you to mount your google drive on your nas. In order to mount your drive you will need FUSE. This is not available as standard on Synology NAS devices.
So I have a couple of ways to do this. Depending on your NAS model and architecture, you may be able to install the SSHFS package from the synocommunity, but have recently discovered that the SSHFS package does not seem to be available for some of the newer architectures.
If it is not available for your architecture, then my alternative is to use a Docker image.
So anyway, on to setting up rclone
On my NAS I have homes setup (this means your home directory should be accessible from the other machines on the network) and so for this guide we will say I have:
- A user account: admin
- A folder on my nas at this location /volume1/homes/admin
- I connect to the NAS via ssh using this admin account
- An rclone config to my Google Drive, which in this case is gDrive:
[Note: You do not need to have 'homes' enabled, but if not then I would create a folder on your raid volume to store the programs and scripts]
If you are on a Mac then you can use the Terminal program from your Utilites folder. For Windows users (Which I am not) I guess it's Putty for you guys and girls
I am not a fan of the default Shell that is set when you login via SSH.
So the first command to run after connecting via SSH is this:
That will put you into a bash shell (Which may prevent issues where you need to escape command line flags, you will see what I mean by these as we go on.)
So you should now be connected to your NAS via SSH using your NAS admin account
Now let's install rclone with the following command:
curl https://rclone.org/install.sh | sudo bash
You will probably need to enter your password to complete the install
At which point it will install rclone to the /usr/bin directory Don't worry about the: bash: line 153: mandb: command not found warning You can safely ignore this.
To check it is installed there run this command:
If it is installed at that location, you should see something like:
rclone v1.43 - os/arch: linux/amd64 - go version: go1.11
Then try just
If that gives the same result, then fine, your system knows where rclone is, if not, then exit from your SSH session and re login (I have found that sometimes the path does not get updated until you logout and log back in)
Now you need to configure rclone to connect to your google drive. There are detailed instructions here https://rclone.org/drive/, so really don't think I need to repeat all that here.
Once you have done that you should have a working rclone connection to your google drive. Test this with
rclone lsd gDrive:
Replace gDrive with whatever you called your remote when you did your rclone config.
This should list all the Directories in the top level of your google drive.
If that is the case then it's all good.
The only thing I would add is that I am not sure if the /usr/bin/ will get replaced when you do a DSM update, so you may want to move the rclone binary somewhere else. I store mine in a bin directory inside my users home directory (partly why I use homes) if you do move it, unless you add it to your PATH, you will need to specify the full path when running rclone e.g.
Now you need to find out where your config file is. By default is usually in the user directory of the the user that ran the config command.
the config file is just a text file and can be placed where ever you want, but you will then need to specify the config file to use when you run rclone
You can find the location with this:
rclone config file
You can set a specific path by adding something like this to your rclone command this: