Update 2023
Accessing Amazon Drive with Rclone can sometimes present challenges, particularly with authentication. Previously, direct API keys were utilized, but due to changes, a workaround using an oauth proxy server is now recommended. This guide will walk you through setting up Rclone to work with Amazon Drive using a community-provided proxy server, ensuring you can manage your data effectively.
Why Use a Proxy Server for Amazon Drive?
In the past, Rclone could directly connect to Amazon Drive using API keys. However, Amazon has since revoked these keys for third-party applications like Rclone. This means the direct authentication method no longer functions. To overcome this, a clever solution emerged: an oauth proxy server.
This proxy acts as an intermediary, handling the authentication process between Rclone and Amazon Drive. It avoids the need for Rclone to embed sensitive API keys directly within its code, enhancing security and providing a functional workaround. The proxy server we’ll be using is a publicly available instance, kindly hosted by a member of the Rclone community.
Configuring Rclone with the Proxy Server
To utilize this proxy server, you’ll need to configure Rclone to use specific authentication URLs. Here’s a step-by-step guide:
Prerequisites:
- Rclone Beta Version: Ensure you are using the latest beta version of Rclone. This is crucial as older versions might not fully support the necessary configuration options for the proxy server, especially for remote setups. Download the latest beta from the official Rclone website.
Configuration Steps:
-
Start Rclone Configuration: Open your command line interface and run the command
rclone config
.rclone config
-
Create a New Remote: When prompted to create a new remote, type
n
for “New remote”.No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n
-
Name Your Remote: Give your Amazon Drive remote a descriptive name. For example, you can name it
acd
.name> acd
-
Choose Amazon Drive Storage: Select the storage type. Type the number corresponding to “Amazon Drive” or directly type
amazon cloud drive
.Type of storage to configure. Choose a number from below, or type in your own value 1 / Amazon Drive "amazon cloud drive" 2 / Amazon S3 (also Dreamhost, Ceph, Minio) "s3" 3 / Backblaze B2 "b2" 4 / Dropbox "dropbox" 5 / Encrypt/Decrypt a remote "crypt" 6 / FTP Connection "ftp" 7 / Google Cloud Storage (this is not Google Drive) "google cloud storage" 8 / Google Drive "drive" 9 / Hubic "hubic" 10 / Local Disk "local" 11 / Microsoft OneDrive "onedrive" 12 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) "swift" 13 / SSH/SFTP Connection "sftp" 14 / Yandex Disk "yandex" Storage> 1
-
Enter Client ID and Secret: For “Amazon Application Client Id” and “Amazon Application Client Secret”, type
rclone
andacd
respectively. These are generic credentials used with the proxy server.Amazon Application Client Id - required. client_id> rclone Amazon Application Client Secret - required. client_secret> acd
-
Specify Auth and Token URLs: This is the crucial step for using the proxy server. Enter the following URLs for “Auth server URL” and “Token server url”:
Auth server URL - leave blank to use Amazon's. auth_url> https://quixotic-module-170120.appspot.com/auth Token server url - leave blank to use Amazon's. token_url> https://quixotic-module-170120.appspot.com/token
-
Automatic Configuration: Rclone will ask about auto config. Choose
y
(Yes) unless you are on a headless or remote server.Remote config Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config. Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) No y/n> y
-
Authorize Rclone: Your web browser should automatically open, prompting you to log in to your Amazon account and authorize Rclone. Follow the on-screen instructions. If the browser doesn’t open automatically, you’ll be provided with a link to manually paste into your browser.
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth Log in and authorize rclone for access Waiting for code... Got code
-
Verify Configuration: Once authorization is complete, Rclone will display your configuration details. Confirm they are correct by typing
y
(Yes).-------------------- [acd] client_id = rclone client_secret = acd auth_url = https://quixotic-module-170120.appspot.com/auth token_url = https://quixotic-module-170120.appspot.com/token token = XXXX -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
Testing Your Amazon Drive Configuration
After completing the configuration, it’s essential to test if Rclone can successfully connect to your Amazon Drive. Use the following command, replacing acd:
with the name you gave your remote if you chose a different name:
rclone lsd acd:
This command lists the directories at the root of your Amazon Drive. If the configuration is successful, you should see a list of your directories. If you encounter errors, double-check each step of the configuration process and ensure you are using the latest Rclone beta.
Conclusion
By following these steps, you can successfully configure Rclone to access Amazon Drive using a proxy server. This method provides a reliable workaround for the API key issue and allows you to continue managing your data on Amazon Drive with Rclone. Remember to use the latest beta version of Rclone for optimal compatibility.