Connecting Google Drive to NAT VPS via RCLONE


Natvps.id – You can connect Google Drive to NAT VPS to access all the stored files. This is useful if you want to transfer data from VPS to Google Drive directly, such as for reserveStoring large data, and so forth. This can be done with help software named RClone.

This article discusses the steps to connect Google Drive to NAT VPS using RCLONE, with the SSH tunnel so that it does not require a port of port prosecution configuration. This article uses Ubuntu 22.04 as a mold. For other OS, please adjust the steps.

Install RClone

First, install curly Using Orders:

apt update && apt install curl -y

Then, run manuscript Automatic RCLone Installation By Entering:

sudo -v ; curl  | sudo bash

Wait until the installation process is complete.

Produce an oauth client ID

In order to be able to communicate with Google Drive, RClone requires an authentication configuration called Oauth, and its credentials. This credential will later be used for the login process and get tokens.

1. Activate Google Drive API

Google’s API console opens, click “Activating API and Service”

Search Google Drive APIThen click Possible.

2. Produce client ID

Open Google API Console again, click tab Credential.

Click Create credentials -> OAUTH client ID

Enter the following information:

  1. Application Type: Desktop application
  2. Name: Free, here I use Rclone-client

You will get information Client ID And Client secret. Keep this information carefully.

Rclone configuration

In NAT VPS, enter the following command to start the configuration:

rclone config
  • No remote is found, for new ones? N
  • Enter the name for a new remote: Gdrive (free)
  • Types of storage for configuration: drive
  • Google Application Client ID: Enter the client ID that has been created
  • Oauth Client Secret: Enter the secret client that has been made
  • List of separate coma scope that RClone must use when asking for access from the drive: drive
  • JSON File Path File Service Account Crack: Let it be empty (enter)
  • Edit Advanced Configuration? N
  • Use a web browser to automatically automatically automatically automatically automated RClone? Y

At this point, you need to log in & authorization of RClone to access your Google Drive. But before that, we need to do SSH Port Forwarding first.

Ssh port forwarding to the rclone port

Because we use RClone on the Remote/Headless server, we cannot just log in. To access the RCLone Authentication URL address, we need directing port 53682 from VPS to our deviceUsing SSH Port Forwarding.

On local devices (PC/computer to access VPS), run the following command:

ssh -L localhost:53682:localhost:53682 root@<IP publik NAT VPS> -p <Port SSH NAT VPS>

For example:

ssh -L localhost:53682:localhost:53682 [email protected] -p 19000

This command instructs SSH to log in to our NAT VPS, as well as activating tunnel To continue port 53682 VPS to a local port.

Don’t close the SSH connection, or the tunnel will be cut off!

Back again to RClone, please open the authentication url listed to continue the login process.

If so, RClone will automatically detect a successful login process. Continue the configuration process by answering the following questions:

  • Configure this as a joint drive (drive team)? N
  • Keep this “Gdrive” remote? Y

The RClone configuration has been completed.

Install Google Drive

It’s time to direct Google Drive into NAT VPS (mounting). To do installationUse orders rclone mount.

For example, if you want to mount Google Drive to the Directory /gdriveThen enter the command:

mkdir /gdrive
rclone mount gdrive: /gdrive --vfs-cache-mode minimal --daemon
  • gdrive: is the name of the previous RClone configuration. College (:) Used if you want to access a certain directory on Google Drive. Leave it blank to access the entire directory
  • /gdrive is the target directory of Google Drive Mounting
  • --vfs-cache-mode minimal is mode Caching used RClone. Mode minimal used because it minimizes usage disk room Server when reading the file from Google Drive. So, when reading something from Google Drive, RClone will get data directly from Google Drive without the need to save it to the server first.

All available commands can be accessed in the RClone documentation.

Happy! Google Drive has been successfully connected to NAT VPS.

Cover

Thus this article is about the steps to connect Google Drive to NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center