Rclone on Caviness
This document describes how to manually configure (set up) Rclone using University of Delaware email account for Google Drive on Caviness.
Rclone manual configuration of Google Drive
Loading Rclone
First, use VALET to load rclone into your environment; you must load the latest version rclone/1.69.2
as the old versions will not work on Caviness.
[traine@login00.caviness ~]$ vpkg_versions rclone Available versions in package (* = default version): [/opt/shared/valet/2.1/etc/rclone.vpkg_yaml] rclone Rclone is a command line program to sync files and directories to and from cloud services 1.45 Pre-built executable for AMD64/Linux 1.50 Pre-built executable for AMD64/Linux * 1.69.2 official release 1.69.2 [traine@login00.caviness ~]$ vpkg_require rclone/1.69.2 Adding package `rclone/1.69.2` to your environment
Configuration Steps
Create a new Rclone remote configuration by typing rclone config
. In this example, we are going to call this new configuration cavinessGoogleDrive
. You don't have to use this name, you can call your configuration whatever you would like.
[traine@login00 ~]$ rclone config 2025/05/15 15:49:07 NOTICE: Config file "/home/1200/.config/rclone/rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n name> cavinessGoogleDrive
Next, find the "Google Drive" option from the given list of cloud services. Once it is located, enter its value. For this example, it is drive
. These options can change so please make sure that you read and choose the right option.
Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. 1 / 1Fichier \ (fichier) 2 / Akamai NetStorage \ (netstorage) 3 / Alias for an existing remote \ (alias) ... Skipping lines... 18 / Gofile \ (gofile) 19 / Google Cloud Storage (this is not Google Drive) \ (google cloud storage) 20 / Google Drive \ (drive) 21 / Google Photos \ (google photos) 22 / HTTP \ (http) ... Skipping more lines ... 59 / iCloud Drive \ (iclouddrive) 60 / premiumize.me \ (premiumizeme) 61 / seafile \ (seafile) Storage> drive
The next couple of steps will be ask about adding a client_id
and a client_secret
. Unless you know you will need to use these, the default blank option is all that needs to be entered.
Option client_id. Google Application Client Id Setting your own is recommended. See https://rclone.org/drive/#making-your-own-client-id for how to create your own. If you leave this blank, it will use an internal key which is low performance. Enter a value. Press Enter to leave empty. client_id> Option client_secret. OAuth Client Secret. Leave blank normally. Enter a value. Press Enter to leave empty. client_secret>
The next step will give you options to which you will grant Rclone permission to access your files and directories in your Google Drive. We are going to use the default value of full access
but you can read the different options and choose the best option for you.
Option scope. Comma separated list of scopes that rclone should use when requesting access from drive. Choose a number from below, or type in your own value. Press Enter to leave empty. 1 / Full access all files, excluding Application Data Folder. \ (drive) 2 / Read-only access to file metadata and file contents. \ (drive.readonly) / Access to files created by rclone only. 3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ (drive.file) / Allows read and write access to the Application Data folder. 4 | This is not visible in the drive website. \ (drive.appfolder) / Allows read-only access to file metadata but 5 | does not allow any access to read or download file content. \ (drive.metadata.readonly) scope> 1
For the next question the default blank choices should be all that is needed.
Option service_account_file. Service Account Credentials JSON file path. Leave blank normally. Needed only if you want use SA instead of interactive login. Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. Enter a value. Press Enter to leave empty. service_account_file>
For the next question advance config
is generally not required so n
for the no option is typically the correct option.
Edit advanced config? (y/n) y) Yes n) No (default) y/n> n
So far we have been answering the configuration questions mostly with the default options. However, the next question is where we will differ from the typical setup process. Since firewall permissions will not allow the auto config
to work correctly, we will say n
. This option will allow us to safely work around the firewall permission issue by allowing us to request a verification code from our local machine. Then we can manually copy and paste the verification code to Caviness.
Use web browser to automatically authenticate rclone with remote? * Say Y if the machine running rclone has a web browser you can use * Say N if running rclone on a (remote) machine without web browser access If not sure try Y. If Y failed, try N. y) Yes (default) n) No y/n> n
After you enter n,
you will be instructed to run rclone authorize
on your local computer. The next step is to Download the rclone release v1.69.2 on your local computer and run rclone authorize
.
Option config_token. For this to work, you will need rclone available on a machine that has a web browser available. For more help and alternate methods see: https://rclone.org/remote_setup/ Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "drive" "YOUR UNIQUE CLIENT SECRET HERE" Then paste the result. Enter a value. config_token>
For Linux OS, open a new terminal and run the following command on your local computer:
curl -O https://downloads.rclone.org/v1.69.2/rclone-v1.69.2-linux-amd64.zip unzip rclone-v1.69.2-linux-amd64.zip cd rclone-v1.69.2-linux-amd64 ./rclone authorize "drive" "YOUR UNIQUE CLIENT SECRET HERE"
For macOS, open a new terminal and run the following command. Download the rclone for ARM if your machine is equipped with ARM chips. You may also need to allow running rclone in the security settings.
cd && curl -O https://downloads.rclone.org/v1.69.2/rclone-v1.69.2-osx-amd64.zip unzip -a rclone-v1.69.2-osx-amd64.zip && cd rclone-v1.69.2-osx-amd64 ./rclone authorize "drive" "YOUR UNIQUE CLIENT SECRET HERE"
For Windows, first download rclone v1.69.2 for Windows, then extract all files. Open Windows PowerShell
, and then change to the folder where you put the rclone.exe
, run the following command:
.\rclone.exe authorize "drive" "YOUR UNIQUE CLIENT SECRET HERE"
After running the command, you will be given a URL that will allow you to sign into your university Google email account and request a verification code for Rclone to use. Copy this URL and paste it into a web browser on your local computer. Sign in and afterwards you will be given your verification code. Copy and paste this verification code into the Caviness shell session. It will look something like this below:
025/05/14 15:01:53 NOTICE: Config file "/home/traine/.config/rclone/rclone.conf" not found - using defaults 2025/05/14 15:01:53 NOTICE: Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config. 2025/05/14 15:01:53 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=-l7PZrbDasdfgwfa6t6-789 2025/05/14 15:01:53 NOTICE: Log in and authorize rclone for access 2025/05/14 15:01:53 NOTICE: Waiting for code... 2025/05/14 15:02:19 NOTICE: Got code Paste the following into your remote machine ---> ***YOUR UNIQUE VERIFICATION CODE*** <---End paste
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=**The rest of this link is unique for each user.** Log in and authorize rclone for access Enter verification code> *** ENTER YOUR UNIQUE VERIFICATION CODE HERE ***
The last step will ask you if you want to configure this as a "Shared Drive(Team Drive)". For this example we will say no.
Configure this as a Shared Drive (Team Drive)? y) Yes n) No (default) y/n> n
Now you can review and your configuration and make edits if needed. If everything is okay select y
.
-------------------- [cavinessGoogleDrive] type = drive scope = drive token = {"access_token":**The rest of this is private and unique information for each user.**"} -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
Once everything is configured correctly, Rclone will show you a list of your remote configurations, and give you options to modify, create a new one, or simply exit the Rclone configuration. At this point, assuming all steps were followed as described, we will simple Quit Config
with the q
option, and press 'Enter'.
Name Type ==== ==== cavinessGoogleDrive drive e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q
Testing new Rclone remote configuration
To make sure the new remote configuration is working correctly, we will use the Rclone lsd
command to list out the root level directories of the remote configuration, cavinessGoogleDrive
, for our University of Delaware Google Drive on Caviness.
[traine@login00 ~]$ rclone lsd cavinessGoogleDrive: -1 2020-11-16 15:43:38 -1 Introduction to Unix Shell on Caviness GDoc -1 2020-05-05 16:46:11 -1 wifi-map
For additional information on Rclone and more options please visit Rclone