How to Add Google Drive to Proxmox: A Step-by-Step Guide

Setting up cloud storage integration with your Proxmox Virtual environment can significantly enhance your backup and file management capabilities. In this guide, I’ll walk you through the process of adding Google Drive to your Proxmox server using rclone, a powerful open-source synchronization tool.

What is rclone?

Rclone is a free, open-source command-line program designed to sync files and directories between your local systems and various cloud storage providers. It supports many popular services, including:

  • Google Drive
  • OneDrive
  • Dropbox
  • Amazon S3
  • Azure Blob Storage
  • SFTP
  • And many more (over 40 providers)

Prerequisites

  • A Proxmox server with root access
  • An active Google account
  • PuTTY (if connecting remotely from Windows)

Step by Step Guide on youtube

Step 1: Install rclone on Proxmox

Log into your Proxmox server via SSH and install rclone using the package manager:

apt-get install rclone

Step 2: Configure rclone for Google Drive

  1. Start the interactive configuration:
rclone config
  1. Follow the prompts:
    • Press n to create a new remote
    • Give it a name (e.g., “synbricks”)
    • Type 18 to select Google Drive (or the number corresponding to Google Drive in your menu)
    • Press Enter to skip Client ID
    • Press Enter to skip Client Secret
    • Press Enter to skip advanced configuration
    • When asked about auto config, type yes

Step 3: Set up SSH tunneling for authentication

Since you’re connecting to a remote server, you’ll need to create an SSH tunnel to complete the Google authentication:

  1. In PuTTY, configure an SSH tunnel:
    • Go to Connection > SSH > Tunnels
    • Set Source port to 53682 (or the port shown in rclone config)
    • Set Destination to 127.0.0.1:53682
    • Click Add
  2. Open the URL provided by rclone in your browser
  3. Authorize rclone to access your Google Drive
  4. The authentication will complete automatically in the terminal

Step 4: Test the connection

Verify the connection by listing directories:

rclone lsd synbricks:

Create a test folder in your Google Drive:

rclone mkdir synbricks:proxmox-tutorial

Step 5: Mount Google Drive to Proxmox

  1. Create a mount point:
mkdir /mnt/gdrive
  1. Mount the Google Drive:
rclone mount synbricks: /mnt/gdrive --allow-other --cache-db-purge --poll-interval 10m

Step 6: Create a systemd service for persistent mounting

To ensure your Google Drive remains mounted after reboots, create a systemd service:

[Unit]
Description=rclone for G drive for synbricks
AssertPathIsDirectory=/mnt/gdrive
After=network.service

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount --config=/root/.config/rclone/rclone.conf synbricks: /mnt/gdrive --allow-other --cache-db-purge --poll-interval 10m
ExecStop=/bin/fusermount -u /mnt/gdrive
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

Save this file as /etc/systemd/system/gdrive.service

Step 7: Enable and start the service

  1. Enable the service to start at boot:
systemctl enable gdrive.service
  1. Start the service:
systemctl start gdrive.service
  1. Check the status:
systemctl status gdrive.service

Step 8: Test the mounted drive

Verify that your Google Drive is properly mounted:

cd /mnt/gdrive
ls

You can now create directories for backups:

mkdir /mnt/gdrive/backup

Benefits of Adding Google Drive to Proxmox

  1. Offsite Backups: Store critical VM backups in the cloud for disaster recovery
  2. Flexibility: Easy access to files across multiple Proxmox nodes
  3. Cost-Effective: Take advantage of Google Drive’s storage quotas
  4. Automation: Combine with scripts for automated backup routines

Final Thoughts

By following these steps, you’ve successfully integrated Google Drive with your Proxmox environment. This setup allows you to leverage cloud storage for backups and file syncing, adding an additional layer of data protection to your virtualization environment.

To learn proxmox Enroll Now

Enroll Now

Leave a Comment