How to Install and Configure Rclone on Linux to Sync and Backup Cloud Storage

Managing remote backups, synchronising directories, and migrating data across disparate cloud storage providers can be complex when relying on proprietary web interfaces or graphical sync clients. Rclone—frequently dubbed the “rsync for cloud storage”—is a command-line utility for Linux that supports over 70 cloud object storage backends, including Google Drive, Amazon S3, Microsoft OneDrive, Dropbox, Backblaze B2, and remote SFTP/WebDAV servers.

This tutorial explains how to install Rclone on Linux, configure encrypted remote endpoints via the interactive setup wizard, perform unidirectional sync and bidirectional transfers, mount remote buckets to local directories, and automate cron backup jobs.

Installing Rclone on Linux Distributions

Rclone is distributed as an optimised, single Go binary with no runtime dependencies.

Method 1: Installing via Official Automated Script (Recommended)

The official installation script checks your Linux distribution architecture, downloads the latest stable binary, installs corresponding man pages, and updates system paths:

sudo -v ; curl https://rclone.org/install.sh | sudo bash

Method 2: Installing via Native Package Managers

On Ubuntu and Debian:

sudo apt update && sudo apt install rclone -y

On Arch Linux and Manjaro:

sudo pacman -S rclone

On Fedora and RHEL systems:

sudo dnf install rclone -y

Verify that Rclone is functional and inspect the installed version:

rclone version

Configuring a Cloud Remote via the Interactive Setup Wizard

Rclone stores connection credentials and API tokens inside a configuration file located at ~/.config/rclone/rclone.conf. The built-in wizard simplifies authenticating with external cloud services.

  1. Launch the interactive configuration terminal:
    rclone config
  2. Type n and press Enter to create a new remote.
  3. Enter a descriptive name for your connection (for example, mygdrive, b2backup, or onedrive-work).
  4. Select your storage provider from the numbered menu (e.g. choose drive for Google Drive, s3 for Amazon S3 / MinIO, or onedrive for Microsoft 365).
  5. Leave the client_id and client_secret blank to use default public tokens, or supply your own GCP / Azure API credentials for higher bandwidth quotas.
  6. When prompted for Use auto config?:
    • If running on a desktop with a web browser, select Y. A local browser tab opens to authorise OAuth2 access.
    • If configuring a headless remote Linux server over SSH, select N and follow the headless verification URL prompts.
  7. Review the final configuration summary and type y to confirm. Press q to exit the configuration wizard.

Core Rclone Commands: Copy, Sync, and Check

Rclone provides distinct commands tailored to data safety:

Command Syntax Example Data Transfer Behaviour
rclone ls / lsd rclone lsd mygdrive: Lists files (ls) or top-level directories (lsd) in the specified remote.
rclone copy rclone copy /var/data mygdrive:backups Copies new/updated files to the destination. Never deletes files from the remote target.
rclone sync rclone sync /var/data mygdrive:backups Makes destination match source exactly. Deletes files from destination that no longer exist on source.
rclone check rclone check /var/data mygdrive:backups Compares MD5/SHA-1 hashes between source and destination without modifying data.

Safety Precaution: Always Test with –dry-run

Because rclone sync deletes files at the destination that do not exist locally, always test complex commands first with the --dry-run flag. This simulates the sync process and outputs exactly which files would be transferred or purged without executing any changes.

Real-Time Progress and Bandwidth Limiting

When transferring large archives, use the -P (or --progress) flag to view real-time transfer speeds, ETA, and per-file progress indicators:

rclone copy /home/admin/database.sql.gz mygdrive:backups -P

To avoid saturating your office or home internet connection during working hours, throttle maximum bandwidth with --bwlimit:

rclone sync /mnt/storage mygdrive:media --bwlimit 10M -P

Mounting Remote Storage Locally via FUSE

Rclone can mount your cloud storage bucket directly into your Linux filesystem, making remote directories accessible to standard file managers and command-line tools as if they were a local hard drive.

  1. Ensure the FUSE filesystem utility is installed:
    sudo apt install fuse3 -y # Debian/Ubuntu
    sudo dnf install fuse3 -y # Fedora/RHEL
  2. Create an empty local mount directory:
    mkdir -p ~/cloud-drive
  3. Mount the remote:
    rclone mount mygdrive: ~/cloud-drive --vfs-cache-mode writes --daemon
  4. To unmount the drive when finished:
    fusermount -u ~/cloud-drive

Automating Nightly Backups with Cron

To establish an autonomous, unattended backup pipeline, schedule a shell script via cron:

# Edit the root or user crontab
crontab -e

# Run incremental backup every night at 02:30 AM
30 2 * * * /usr/bin/rclone copy /opt/production/backups mygdrive:nightly-backups --log-file=/var/log/rclone-backup.log --log-level INFO

Troubleshooting Common Rclone Issues

If Rclone encounters authentication drops or performance bottlenecks, verify these factors:

  • Expired OAuth2 Tokens: Cloud tokens expire periodically if the refresh token is revoked. Run rclone config reconnect mygdrive: to re-authenticate with the remote provider.
  • Google Drive 750 GB Daily Limit: Google enforces a strict 750 GB daily upload quota per user account. If transfers stall with userRateLimitExceeded errors, throttle daily transfers or schedule batches across multiple days.
  • Permission Denied on FUSE Mount: By default, FUSE mounts are only accessible to the user who ran the command. To allow other system users to read the mounted drive, enable user_allow_other in /etc/fuse.conf and add the --allow-other flag to your mount command.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.