New entry for those who installed XPEnology following our tutorial. Rclone is ideal for those who have their media library in the cloud for plex/emby/kodi.
1- We connect viassh to our NAS. I recommend using MobaXterm wh ich can be downloaded from HERE.
If you don’t think you will be able to follow the manual, you have the option of simple, NOT customised installation by typing:
curl https://rclone.org/install.sh | sudo bash
If you feel ready, go ahead
2- Create folders by ssh: (the names of the folders are indicative, everyone can choose the one they like the most).
sudo mkdir /volume1/rclone sudo mkdir /volume1/rclone/cache sudo mkdir /volume1/gdrive
3- We download the latest version of rclone via ssh (at the time of writing this tutorial it is version 1.54.0), you can find it here and see exactly what is the link and name.
cd /volume1/rclone sudo wget https://downloads.rclone.org/v1.54.0/rclone-v1.54.0-linux-amd64.zip sudo 7z x rclone-v1.54.0-linux-amd64.zip cd rclone-v1.54.0-linux-amd64 ls -l (comprobar que está el fichero "rclone") sudo mv rclone /bin/ sudo chown root:root /bin/rclone sudo chmod 755 /bin/rclone sudo chmod +x /bin/rclone sudo rm /volume1/rclone/rclone-v1.54.0-linux-amd64.zip sudo rm -rf /volume1/rclone/bin/rclone-v1.54.0-linux-amd64
Now we will configure rclone with our accounts, either normal or TeamDrives.
rclone config
Here are the steps to configure rclone with gdrive:
name> gdrive (or whatever we want)
Storage> 13 (this may vary from one version to another, check that it says Google Drive.)
client_id> client_id (INTRO)
client_secret> client_secret (INTRO)
scope>1
root_folder_id> (INTRO) Unless we want to give access from a specific folder, so we would put the id of that folder, which appears in the browser bar..
service_account_file> (INTRO)
Use advanced config? “n”
Use auto config? “n”
copy and paste the url in the browser, it takes us to the google page that provides us with the counter key.
copy and paste the code
Configure this as a team drive? “n” if we configure a normal account and “y” if we want to configure a TeamDrive, where it will show us all the accounts we have in that account.
When you ask if everything is OK, we will say yes.
And ready, now we put the letter q to exit the configurator.
5- View configuration file path via ssh.
rclone config file
6- Test that rclone works via ssh.
rclone mount --log-level INFO --allow-other --allow-non-empty --tpslimit 10 --tpslimit-burst 10 --dir-cache-time=48h --buffer-size=64M --attr-timeout=1s --vfs-read-chunk-size=64M --vfs-read-chunk-size-limit=2G --vfs-cache-max-age=5m --vfs-cache-mode=writes --cache-dir /volume1/rclone/cache --config=PATH_DEL_PASO_ANTERIOR --user-agent=NAS --cache-workers 8 gdrive: /volume1/gdrive &
7- Test that there is content of the drive in the gdrive folder with this command:
ls -lh /volume1/gdrive
8- Schedule to run every reboot and in the background.
In DSM open the Control Panel/Task Scheduler/Create/Activated Tasks.
We name the task “activate rclone”, root user, and in the tab “task configuration”/execute command, we put in the box:
Bash:
rclone mount --log-level INFO --allow-other --allow-non-empty --tpslimit 10 --tpslimit-burst 10 --dir-cache-time=48h --buffer-size=64M --attr-timeout=1s --vfs-read-chunk-size=64M --vfs-read-chunk-size-limit=2G --vfs-cache-max-age=5m --vfs-cache-mode=writes --cache-dir /volume1/rclone/cache --config=PATH_DEL_PASO_5 --user-agent=NAS --cache-workers 8 gdrive: /volume1/gdrive &
ok, select script and press run button.
With this, we would have our gdrive folder with all our folders ready to be used locally.