rclone: Cloud Configuration and Transfer Examples

This guide is intended for a Linux account with SSH access. It explains how to configure Google Drive on a server without a local web browser and provides transfer examples that work in a similar way with OneDrive, Dropbox, SFTP, WebDAV and S3-compatible storage.

If rclone is not installed yet, start with our installation guide:

rclone Installation

Check the installation with:

rclone version

1. Google Drive – Create Your Own OAuth Client

For a new Google Drive configuration, create your own Client ID and Client Secret in Google Cloud Console.

  1. Open Google Cloud Console, select or create a project and enable the Google Drive API.
  2. Configure the OAuth consent screen. For a private account, select External, add your own Google account as a test user and configure the required Drive scopes.
  3. Create an OAuth client of type Desktop app. Save the generated Client ID and Client Secret.
  4. If the connection should work permanently, move the application from Testing to Production. An external application left in Testing mode may have a refresh token that expires after 7 days. A personal application may display an unverified application warning during authorization.
ℹ Google Drive OAuth

For detailed Google Drive OAuth configuration, see the rclone Google Drive documentation. Google OAuth token lifetime information is available in the Google OAuth documentation.


2. Connect Your Browser to the Server Through SSH

On your own computer, open a terminal and connect to the server with an SSH tunnel. Replace the username and hostname with your own details:

ssh -L 53682:127.0.0.1:53682 user@server.example.com

Keep this SSH session open. If rclone should run under a different account than the SSH account, switch to the correct user before running rclone config. The rclone configuration is stored separately for each user.

On the server, run:

rclone config

Use the following options:

  • New remote – n
  • Name – for example gdrive
  • Storage type – drive for Google Drive. Select it by name because the menu number may change between rclone versions.
  • Client ID / Client Secret – enter the values created in Google Cloud Console.
  • Scope – use drive for read/write access or drive.readonly for read-only access.
  • Service account file – leave empty when using a normal Google account.
  • Advanced config – usually n.
  • Use web browser to automatically authenticate? – select y because the SSH tunnel is active.
  • Shared Drive – select n for My Drive. Use y only for a Google Workspace Shared Drive.
  • Keep this remote? – select y, then q to exit.

rclone will display an address beginning with:

http://127.0.0.1:53682/

Open exactly the address displayed by rclone in the browser on your own computer. Log in to the correct Google account and approve access. Then return to the terminal to complete the configuration.

More information is available in the rclone remote setup documentation.

💡 Without an SSH Tunnel

If you do not want to use an SSH tunnel, answer n when rclone asks whether it should use a web browser. rclone will display an rclone authorize command. Run the exact command shown by rclone on a computer with a browser and paste the returned result into the config_token field on the server. This is especially important when using your own Client ID.


3. Verify the Connection

rclone listremotes
rclone lsd gdrive:
rclone lsf gdrive:
rclone about gdrive:

gdrive: represents the root directory of the configured remote. You can specify a path after the colon, for example:

gdrive:Backup/server

The name gdrive is only an example. Use the name you selected in rclone config.


4. Transfer Examples

In the examples below, the local directory is $HOME/data and the cloud destination is gdrive:Backup/server. Replace these paths with your own. The -P option displays transfer progress.

Upload a Directory from the Server to the Cloud

rclone copy "$HOME/data" gdrive:Backup/server -P

rclone copies the contents of the data directory to Backup/server. The copy command skips identical files and does not remove files that exist only at the destination.

rclone copy documentation

Download a Directory from the Cloud to the Server

rclone copy gdrive:Backup/server "$HOME/restore" -P

The files will be copied to the restore directory. Files in the cloud remain unchanged.

Upload One File with a Specific Destination Name

rclone copyto "$HOME/archive.zip" gdrive:Backup/archive-2026.zip -P

copyto allows you to specify the complete destination filename. It may replace a file with the same name when its contents are different.

rclone copyto documentation

Synchronize a Directory in One Direction

Always check the planned changes first:

rclone sync "$HOME/data" gdrive:Backup/server --dry-run -P

If the result is correct, run the actual synchronization:

rclone sync "$HOME/data" gdrive:Backup/server -P --max-delete 100
⚠ Important

sync makes the destination match the source. This includes deleting files from the destination when they do not exist in the source. The direction of the command is therefore very important. In this example, --max-delete 100 stops the operation if more than 100 deletions are planned. If you do not need deletions, use copy instead.

rclone sync documentation

Transfer Data Between Two Services

After configuring another remote, for example onedrive, you can copy files between the two services without deleting the source:

rclone copy gdrive:Backup/server onedrive:Backup/server -P

Check a Transfer and Its Size

rclone check "$HOME/data" gdrive:Backup/server
rclone size gdrive:Backup/server

check compares files in both locations using file size and available checksums. size displays the number of files and their total size.

rclone check documentation | rclone size documentation

Limit Transfer Speed

rclone copy "$HOME/data" gdrive:Backup/server -P --bwlimit 10M

--bwlimit 10M limits the total upload and download speed of this rclone process to 10 MiB/s, approximately 80 Mbit/s. rclone uses bytes per second while network connections are commonly advertised in bits per second.

You can configure separate upload and download limits:

--bwlimit 10M:2M

This means 10 MiB/s and 2 MiB/s respectively.

rclone bandwidth limit documentation

Change the Bandwidth Limit During the Day

rclone copy "$HOME/data" gdrive:Backup/server -P \
  --bwlimit "08:00,2M 23:00,off"

From 08:00, the transfer is limited to 2 MiB/s. From 23:00, the limit is disabled. The schedule uses the local time of the machine running rclone.

Reduce Load on the Server and Remote API

rclone copy "$HOME/data" gdrive:Backup/server -P \
  --bwlimit 10M \
  --transfers 2 \
  --checkers 4 \
  --tpslimit 4

This example copies a maximum of two files at the same time, uses four parallel checking operations and limits the number of requests sent to the remote service.

Reducing parallel operations may help when the hosting service or remote API reports limits. --tpslimit limits the number of requests while --bwlimit limits the amount of transferred data. These are two different limits.

Exclude Temporary Files and Save a Log

rclone copy "$HOME/data" gdrive:Backup/server \
  --exclude '*.part' \
  --exclude '*.tmp' \
  --log-file "$HOME/rclone.log" \
  --log-level INFO \
  --stats 30s

Files ending in .part and .tmp will be skipped. rclone will write events to rclone.log and statistics every 30 seconds.

⚠ Log Privacy

The log may contain filenames and paths. Keep it in a private directory and review it before sharing it with anyone.


Commonly Used rclone Options

  • -P / --progress – displays current speed, progress and file count. Useful for transfers started manually in a terminal.
  • --dry-run – displays planned operations without writing or deleting data. Use it before the first sync or move.
  • --bwlimit 10M – limits total transfer speed to 10 MiB/s.
  • --bwlimit 10M:2M – sets separate upload and download limits.
  • --transfers 2 – copies a maximum of two files at the same time. The default is four.
  • --checkers 4 – limits parallel file checking. The default is eight.
  • --tpslimit 4 – limits requests to the remote service to approximately four per second.
  • --exclude '*.part' – excludes files matching the specified pattern. The option can be used multiple times.
  • --log-file FILE – writes logs to a file and appends to the file on subsequent runs.
  • --log-level INFO – sets logging verbosity to INFO.
  • --stats 30s – changes the statistics interval to 30 seconds.
  • --max-delete 100 – stops sync if it would delete more than 100 files.

Options can be combined, but start with a simple command and add options only when they solve a specific problem.

Full rclone options documentation


5. Other Cloud Services and Storage Providers

Add each additional connection using:

rclone config

and select n to create a new remote. In the transfer examples, replace gdrive: with the name of the new remote.

Microsoft OneDrive

Storage type:

onedrive

Log in and approve access in a browser. On a server without a browser, use the SSH tunnel method described above or rclone authorize.

OneDrive documentation

Dropbox

Storage type:

dropbox

Log in and approve access in a browser.

Dropbox documentation

SFTP

Storage type:

sftp

You will need the host, port, username and password or SSH key. Configure host key verification, for example using known_hosts_file.

SFTP documentation

WebDAV

Storage type:

webdav

You will need the HTTPS address, server type, username and application password.

WebDAV documentation

S3 or S3-Compatible Storage

Storage type:

s3

You will normally need the provider, region, endpoint, access key and secret key.

An S3 path has the following format:

remote:bucket/folder

S3 documentation

FTP / FTPS

Storage type:

ftp

You will need the host, port, username and password. For FTPS, configure the appropriate TLS mode.

FTP documentation


6. Mount Cloud Storage as Your Own User

FUSE mounting works without --allow-other. The mounted directory is available to the user who created the mount and to applications running under the same account.

⚠ --allow-other Is Not Available

--allow-other is blocked on this hosting for security reasons. This option removes the normal FUSE restriction that limits access to the user who created the mount. On a shared server, it could make cloud storage accessible to other system accounts depending on directory and file permissions.

Do not add --allow-other to rclone commands and do not modify user_allow_other in /etc/fuse.conf.

Without --allow-other, the mount can be used by the user who started it and by applications running under that user's account. A program running as another system user will not gain access through this mount.

First, verify the remote and create an empty mount point:

rclone lsd gdrive:
mkdir -p "$HOME/gdrive"

Read-Only Mount

If you only need to read files, start the mount in the background:

rclone mount gdrive: "$HOME/gdrive" --daemon --read-only

--daemon keeps the mount active after the command finishes and --read-only prevents writes to the cloud through the mounted directory.

Verify the mount:

mountpoint "$HOME/gdrive"
ls "$HOME/gdrive"

Read/Write Mount with VFS Cache

If you also need write access, first unmount the read-only mount:

fusermount3 -u "$HOME/gdrive"

Then mount the remote with VFS write caching:

rclone mount gdrive: "$HOME/gdrive" --daemon \
  --vfs-cache-mode writes \
  --cache-dir "$HOME/.cache/rclone" \
  --vfs-cache-max-size 5G

--vfs-cache-mode writes buffers writes on the user's local disk before uploading them to the cloud. --vfs-cache-max-size 5G sets a target cache limit, but temporary disk usage can be higher, for example while files remain open. Adjust this value to the available disk space.

rclone VFS cache documentation

Unmount the Remote

When you are finished, unmount the directory:

fusermount3 -u "$HOME/gdrive"

On systems that provide fusermount instead of fusermount3, use:

fusermount -u "$HOME/gdrive"
ℹ Mount Point

The mount point must be an empty directory before starting the mount.

rclone mount documentation


Configuration and Common Mistakes

  • rclone config file displays the location of rclone.conf. On Linux it is usually ~/.config/rclone/rclone.conf. This file contains tokens and access credentials. Do not publish it or paste it into a support ticket.
  • A remote path requires a colon. Use gdrive:Backup, not gdrive/Backup.
  • Put paths containing spaces in quotation marks, for example:
rclone copy "$HOME/My files" gdrive:Backup -P
  • Before using sync, make sure the source directory exists and the argument order is correct. The first argument is the source and the second argument is the destination.
  • If Google authorization stops working after approximately one week, check the OAuth application status in Google Cloud Console. An external application left in Testing mode may have a refresh token that expires after 7 days.
ℹ Current rclone Authorization

Older guides that describe simply copying an authorization code from a browser may not match current rclone prompts. On a server without a browser, use the SSH tunnel method or the rclone authorize procedure described above.


Verification

✔ rclone Configured

If rclone lsd remote: lists the remote directories and your test copy completes successfully, the remote is configured and ready to use.

Was this answer helpful? 0 Users Found This Useful (0 Votes)