Part 02 – VM to Google Drive (rclone Storage)
Turn Your Free VM into Cloud Storage
In Part 01 we created a free VM (VPS) and connected to it using SSH.
In this Part 02, we connect that VM to Google Drive
using rclone. This lets the VM read and write files
directly to your Drive – perfect for backups, downloads and automation.
At the time of recording this guide, Jio is offering an official Google AI Pro / Gemini benefit which includes 2 TB Google One storage free for 18 months on selected Jio 5G unlimited plans. This is a legal, official Google–Jio offer, not a workaround or hack. After 18 months, you must either upgrade your Google plan or reduce usage back to the free limit. Always verify the latest status inside the MyJio app because offers can change anytime.
Install rclone on the VM
SSH into your VM and install rclone and FUSE:
sudo apt update
sudo apt install -y rclone fuse
Confirm it installed correctly:
rclone version
Create Google API Client ID & Secret
By default, rclone can use its own built-in OAuth credentials.
But in this vlog we create our own Google API Client ID and
Secret for better stability and to avoid shared limits.
- Open Google Cloud Console and log in with the same Google account you’ll use for Drive.
- Create a new project (for example rclone-vm-drive).
- Go to APIs & Services → Enabled APIs & services → + Enable APIs and Services.
- Search for Google Drive API and enable it.
- Go to APIs & Services → OAuth consent screen and configure it as External (simple personal setup is fine).
- Go to APIs & Services → Credentials → Create credentials → OAuth client ID.
- Choose application type Desktop app and create it.
- Copy the generated Client ID and Client Secret – we’ll paste these into
rclonenext.
If you skip this, rclone will still work using its defaults, but using your own Client ID/Secret is cleaner for long-term use.
Configure rclone Remote for Google Drive
Start the interactive rclone config:
rclone config
Then follow these options (same as shown in the vlog):
- Type
nand press Enter → New remote. - Remote name:
gdrive - Storage: choose the number for Google Drive.
- When asked for client_id, paste your Client ID (or press Enter to leave blank).
- When asked for client_secret, paste your Client Secret (or press Enter to leave blank).
- Scope: choose full access (usually option 1:
drive). - Leave root folder ID and service account file empty.
-
When it asks
Use auto config?:- If the VM has a browser, you can say
y. - On a headless VPS (most cases), type
n, copy the URL, open it on your local PC, log into Google, allow access, then paste the code back into the terminal.
- If the VM has a browser, you can say
- Team Drives / Shared Drives: answer
nunless you know you need it. - At the end, type
yto save the new remotegdrive.
Test the connection:
rclone ls gdrive:
If this runs without error, your VM can now talk to your Google Drive.
Mount Google Drive on the VM
Create a mount folder:
mkdir -p ~/gdrive
Mount the remote into that folder:
rclone mount gdrive: ~/gdrive \
--daemon \
--vfs-cache-mode writes
Check that it’s mounted:
ls ~/gdrive
You should see your Google Drive files and folders. Anything copied into
~/gdrive from the VM will be uploaded to Drive.
--daemon to see logs, or check with
ps aux | grep rclone.
Create a Dedicated vm-torrents Folder
For torrent automation in the next part, we’ll use a dedicated folder where completed torrents will be stored and then synced to Google Drive.
- Open Google Drive in your browser.
- Create a new folder, for example: vm-torrents.
-
After mounting
gdrive, this same folder will appear on the VM as:~/gdrive/vm-torrents -
In your torrent client (Transmission, qBittorrent etc.), you can:
- Set the download directory directly to
/home/YOUR_USERNAME/gdrive/vm-torrents, or - Download first to a fast local folder, then move finished files into
~/gdrive/vm-torrentsusing a script or “run on completion” hook.
- Set the download directory directly to
In the vlog, this is the folder where torrents land and then automatically sync to Google Drive in the background.
Auto-Mount on Reboot (systemd)
Finally, we make sure the Google Drive mount comes back after every reboot using a small systemd service.
Create the service file:
sudo nano /etc/systemd/system/rclone-gdrive.service
Paste this content:
[Unit]
Description=Rclone Mount for Google Drive
After=network-online.target
[Service]
Type=simple
User=YOUR_USERNAME
ExecStart=/usr/bin/rclone mount gdrive: /home/YOUR_USERNAME/gdrive \
--vfs-cache-mode writes \
--dir-cache-time 12h \
--poll-interval 15s
ExecStop=/bin/fusermount -u /home/YOUR_USERNAME/gdrive
Restart=on-failure
[Install]
WantedBy=default.target
Replace YOUR_USERNAME with your actual Linux username
(for example, sachin).
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable rclone-gdrive
sudo systemctl start rclone-gdrive
sudo systemctl status rclone-gdrive
If the status shows active (running), your VM will automatically
mount Google Drive to ~/gdrive after every reboot.
What You Have After Part 02
After completing this part:
- Your free VM is fully connected to Google Drive via
rclone. - You have a dedicated
vm-torrentsfolder for torrent downloads. - The mount comes back automatically after reboot using systemd.
In Part 03 we’ll plug a torrent client into this setup so that completed downloads move into Google Drive with almost zero manual work.