File:Rclone wide logo.svg - Wikimedia Commons

Introduction

Despite promising Linux support “coming soon” back in 2012, there’s no indication that Google will ever produce a native Linux client for Google Drive. There are several unofficial third-party solutions, such as InSync, overGrive, and ODrive, and some file browsers allow integration with your Google Drive, such as Files in GNOME.

But what if you want to create and run backups from the command line? Or to incorporate that functionality into scripts? That’s all possible thanks to an amazing application called rclone. In fact, with rclone you can back up, download, and synchronize files to over forty different cloud solutions. It’s like rsync for clouds.

Users call rclone "The Swiss army knife of cloud storage", and "Technology indistinguishable from magic".

On our Lean Plans, we do offer RcloneWebUI as an alternative to Resiliio or Syncthing, to make file sync even easier and versatile for everybody. To set up RconeWebUI you need to go through some steps.

Prerequisites for this guide

  • Download & Install rclone from here.

  • Either you have rclone installed on your current device, or already have a working rclone config file.

    Continue with the setup from Step X if you already have a working rclone.conf file.


Step 1 - Generate the rclone.conf file

On the local machine where you have installed rclone, run the following command

On Windows, go to the directory where you have downloaded & extracted the files and run

.\rclone.exe config

On macOS and Linux just run:

rclone config

This will guide you through an interactive setup process. There are a lot of questions in the configuration process. But don’t be disheartened, many of them can be left at their default values and simply accepted by pressing Enter.

The same process applies to any OS you're running rclone on.

rclone tells us there are no remotes configured. Press n and press Enter to create a new remote. It will prompt you for a name. We’re going to call it gdrive. Use whatever name you like.

A long menu allows you to choose the type of storage you’re creating a remote connection to. Scroll through the list until you see the entry for Google Drive, and make a note of its number.

We can see that in this instance, it is number 18. Enter this as the storage type and press Enter.

You'll be prompted for a Google Application Client ID. Press Enter to accept the default.

Note: Please note that creating a Google application client id is optional, but recommended. To know how to create your own Google drive client ID, refer to this link. If you don't want to create the client ID, no problem! You can simply leave it blank and continue the other steps.

After providing the client_id and the client_secret just press Enter. Then you’re asked to provide the scope that rclone will have when it is operating on your Google Drive. Press 1 if you want to give it full access and then press Enter.

At the root_folder_id and/or service_account_file prompt, just leave them blank and press ENTER to accept the default values.

Next, you are asked if you want to edit the advanced configuration file. I just don't want to edit it, so I entered n and hit ENTER to continue.

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Finally, press Y to use auto-config (which is the default) to complete the rclone configuration task.

Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> y

Now your web browser will open and you will be prompted to choose a Google account to continue.

Log in to the account you want to allow Rclone to access your Google Drive (or the one for which you have created your unique client_id - if you did).

Please note that if you newly created an app from Google API Console while creating client_id you will see a security warning as shown below. It is normal. Google usually takes a few weeks to verify the submitted app.

You can simply go ahead by clicking the Advanced link and then click Go to rclone (unsafe) link.

Next Rclone will ask for your permission to access your Google drive. Click the Continue button to authorize Rclone to access your Google drive.

You will see a success message in the browser.

Just close the browser window and go back to the Terminal.

Next, you're prompted if you want to make your Google Drive as a shared drive.

Type n (It is the default) and hit ENTER.

Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> n

The new remote details will be displayed in the Terminal for verification. If everything seems OK, simply type y and press ENTER to continue creating the remote:

Keep this "gdrive" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Done! A new remote named gdrive has just been created.

If you wish to create another remote for a different provider, click n and follow the same procedure as shown above. Or, just quit the rclone configuration wizard by pressing q.

Current remotes:

Name Type
==== ====
gdrive 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

You can view the list of configured remotes at any time by using the following command:

$ rclone listremotes

Did this answer your question?