How to Use Cloudflare and Google to Build a Unlimited Storage Drive Index for FREE

On April 27 2020, the developer of Goindex:donwa deleted the whole repository of Goindex, no matter for what reason, it's so sad to see a great program gone. To still use this program, you need to find and use anyone who forked and fixed the Goindex after this incident on github.

Before we start | 开始之前

Before we get into today's tutorial, you will need four things:

  1. A Google Account
  2. A Cloudflare Account
  3. Goindex
  4. Rclone

Which are all free to get, so upon finish this guide, you will have a UNLIMITED storage drive for FREE.

Get an Unlimited Team Drive

You will need an edu or business account with Google to be able to get unlimited storage.
https://edu.google.com/

[ppblock ex="Input password to view hidden content"]
In order for the normal Google account (which has 15GB free storage) to have unlimited storage, you will have to have a team drive. You can get one for free from link below:

Disclaimer: The above web pages and methods all collected from the internet, I bear no responsibility for any problems, losses, or legal issues caused by using it.


[/ppblock]

Setup google drive with rclone

Download rclone here (https://rclone.org/downloads/)
Extract the rclone or rclone.exe binary from the archive
Run rclone config to start setup

Setup Process

Run CMD on the rclone directory, the type rclone config to start setup process.

No remotes found - make a new one
n) New remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
n/r/c/s/q> n
name> remote
Type of storage to configure.
Choose a number from below, or type in your own value

We choose n to create a New remote then type any name you like, when rclone ask us to choose a type of storage, here, we will type 13 to choose Google Drive, as demonstrated in the picture below:

Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>

Then rclone will ask for your google application client id and secret, you CAN leave it blank to use the default one comes with rclone. But it is highly recommended to set up your own since the default one is shared between all the rclone users and can be low performance. (If you want to leave it blank, just press ENTER)

How to get your own client_id and secret

If you are using default client_id and secret, you can pass this section.
  1. Log into the Google API Console with your Google account.
  2. Select a project or create a new project.
  3. Under “ENABLE APIS AND SERVICES” search for “Drive”, and enable the “Google Drive API”.
  4. Click “Credentials” in the left-side panel (not “Create credentials”, which opens the wizard), then “Create credentials”, then “OAuth client ID”. It will prompt you to set the OAuth consent screen product name, if you haven’t set one already.
  5. Choose an application type of “other”, and click “Create”. (the default name is fine)
  6. It will show you a client ID and client secret. Use these values in rclone config to add a new remote or edit an existing remote.

Create new project

Create OAuth client ID

Continue Setup rclone

After you get your client_id and secret, paste it in rclone. The choose scope 1 as requested.

Scope that rclone should use when requesting access from drive.
Choose a number from below, or type in your own value
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

Get Root folder ID

ID of the root folder - leave blank normally. Fill in to access Computers folders. (see docs).
root_folder_id>

Since we will not using the default root folder, so we will need to set a root folder ID, you can find your desired root folder id by openning the relevant folder in the drive web interface.

This will be the last segment of the URL when you open the relevant folder in the drive web interface. So if the folder you want rclone to use has a URL which looks like: https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh in the browser, then you use 1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh as the root_folder_id in the config.

After you set up your root folder ID, use the default setting for the next two questions. Then choose Yes for the team drive and select your desired team drive to be indexed. After that, you are all set.

Now copy the client_id, client_secret, root_folder_id and refresh_token for the next section.

Change Goindex Config

First, download index.js file HERE
Use any editor you like to open index.js file, and change the client_id, client_secret, root_folder_id and refresh_token with one you just got from rclone.You can also change the site name and root password if you want. (This will be your website name and the password)

Deploy to Cloudflare

Open Cloudflare, Login and choose Workers (You need to set up your own subdomain if you use it for the first time, it can't be changed once setted)

After you have set up your subdomain, then select create a worker, copy and paste all the content in the index.js file to the workers and change the name if you want.

Once you finished, hit save and deploy and go check out your new unlimited storage drive index from the url you just defined.

Video Tutorial

Youtube

Last modification:October 2, 2020
If you like my post, you can donate to buy me a cup of coffee.