Skip to main content

rclone Config

The rclone config command launches an interactive wizard for creating and managing remote storage backends. Every rclone workflow starts here — you must configure at least one remote before you can copy, sync, or mount anything.

Quick Summary

rclone config writes entries to ~/.config/rclone/rclone.conf. Each entry defines a remote — a named connection to a cloud provider, SFTP server, or local alias. Once configured, you reference remotes by name in all other commands (e.g., myremote:bucket/path).

Basic Syntax

rclone config                # Launch the interactive menu
rclone config show # Print current config (redacted passwords)
rclone config file # Print the config file path
rclone config paths # Show config and cache paths
rclone config create NAME TYPE [KEY=VALUE ...] # Non-interactive create
rclone config update NAME [KEY=VALUE ...] # Non-interactive update
rclone config delete NAME # Remove a remote
rclone config password NAME KEY # Set an obscured password
rclone config dump # Dump config as JSON (includes secrets)

Interactive Setup Walkthrough

When you run rclone config with no subcommand, you get a text menu:

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config

Creating a New Remote (Example: Google Drive)

rclone config
n/s/q> n
name> gdrive
Storage> drive
client_id> # Leave blank for default, or paste your own
client_secret> # Leave blank for default
scope> 1 # Full access
...
y) Yes, this is OK

After completing the wizard, verify with:

rclone lsd gdrive:

Creating a New Remote (Example: S3-Compatible)

rclone config
n/s/q> n
name> wasabi
Storage> s3
provider> Wasabi
access_key_id> YOUR_KEY
secret_access_key> YOUR_SECRET
region> us-east-1
endpoint> s3.wasabisys.com

Non-Interactive Creation

For automation and scripts, skip the wizard entirely:

# Create an S3 remote
rclone config create myaws s3 \
provider=AWS \
access_key_id=AKIAIOSFODNN7EXAMPLE \
secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \
region=us-east-1

# Create an SFTP remote
rclone config create myserver sftp \
host=192.168.1.100 \
user=deploy \
key_file=/home/user/.ssh/id_rsa

# Create a Google Cloud Storage remote
rclone config create mygcs gcs \
project_number=123456789 \
service_account_file=/path/to/sa.json
Automation

Non-interactive rclone config create is the recommended approach for server provisioning scripts, Docker containers, and CI/CD pipelines — no manual input required.

Managing Existing Remotes

# Show all configured remotes with details
rclone config show

# Show config for a specific remote
rclone config show myremote

# Print the path to the config file
rclone config file

# Delete a remote
rclone config delete old-remote

# Rename a remote
rclone config update myremote --name newname

Config File Location

| OS | Default Path | | - | | | Linux | ~/.config/rclone/rclone.conf | | macOS | ~/.config/rclone/rclone.conf | | Windows | %APPDATA%\rclone\rclone.conf |

Override with the --config flag or RCLONE_CONFIG environment variable:

# Use a custom config file
rclone ls myremote: --config /etc/rclone/prod.conf

# Set via environment variable
export RCLONE_CONFIG=/etc/rclone/prod.conf

Config File Format

The config file is a standard INI file:

~/.config/rclone/rclone.conf
[gdrive]
type = drive
client_id =
client_secret =
scope = drive
token = {"access_token":"...","token_type":"Bearer","refresh_token":"..."}

[wasabi]
type = s3
provider = Wasabi
access_key_id = YOUR_KEY
secret_access_key = YOUR_SECRET
region = us-east-1
endpoint = s3.wasabisys.com
Security

The config file contains credentials in plain text by default. Protect it with:

  • File permissions: chmod 600 ~/.config/rclone/rclone.conf
  • Config encryption: rclone configs → set a password
  • Environment variables: Pass secrets via RCLONE_CONFIG_PASS instead of storing in the file

Encrypting the Config File

Set a master password so all credentials are encrypted at rest:

rclone config
# Choose: s) Set configuration password

After setting a password, rclone will prompt for it on every run. For automation:

export RCLONE_CONFIG_PASS="your-master-password"
rclone ls myremote:

Practical Examples

Server Provisioning Script

#!/bin/bash
# Provision rclone remotes on a new server

rclone config create backup-s3 s3 \
provider=AWS \
access_key_id="${AWS_KEY}" \
secret_access_key="${AWS_SECRET}" \
region=ap-southeast-1

rclone config create backup-sftp sftp \
host=backup.example.com \
user=backupuser \
key_file=/root/.ssh/backup_key

echo "Configured remotes:"
rclone listremotes

Docker Container Setup

# Pass config as environment variables (no config file needed)
docker run --rm \
-e RCLONE_CONFIG_MYREMOTE_TYPE=s3 \
-e RCLONE_CONFIG_MYREMOTE_PROVIDER=AWS \
-e RCLONE_CONFIG_MYREMOTE_ACCESS_KEY_ID=AKID \
-e RCLONE_CONFIG_MYREMOTE_SECRET_ACCESS_KEY=SECRET \
rclone/rclone ls myremote:mybucket

Common Pitfalls

| Pitfall | Consequence | Prevention | | | - | - | | Config file world-readable | Credentials exposed to other users | chmod 600 ~/.config/rclone/rclone.conf | | Using default OAuth client IDs | Rate-limited by shared quota | Create your own API project and client ID | | Expired OAuth tokens | Authentication failures after months | Re-run rclone config reconnect remote: | | Typo in remote name | Failed to create file system errors | Verify with rclone listremotes before use |

What's Next

Examples with Output

1. Identify Config File Location

Find out where rclone is storing your remotes. Command:

rclone config file

Output:

Configuration file is stored at:
/home/user/.config/rclone/rclone.conf

2. List Configured Remotes

Quickly see which storage providers are available. Command:

rclone listremotes

Output:

gdrive:
s3-backup:
dropbox:

3. Show Remote Configuration

Inspect the settings for a specific remote (secrets are obscured). Command:

rclone config show gdrive:

Output:

[gdrive]
type = drive
scope = drive
token = {"access_token":"xxx","token_type":"Bearer","refresh_token":"xxx","expiry":"2024-01-01T00:00:00Z"}

4. Create a Local Alias

Create a shortcut to a specific folder on a remote for faster access. Command:

rclone config create my-docs alias remote:path/to/my/documents

Output:

(No output on success)

Note: This allows you to use my-docs: instead of the full path.

5. Check Remote Storage Quota

Verify how much space is left on a supported provider. Command:

rclone about gdrive:

Output:

Total:   15 GiB
Used: 7.5 GiB
Free: 7.5 GiB
Trashed: 200 MiB