Skip to main content

Installation and First Config

This lesson walks through a production-safe first setup: install, configure, and verify before any transfer.

Learning Focus

You should leave this lesson with one working remote and a repeatable smoke-test you can run before every migration/backup.

Install Rclone

sudo apt update
sudo apt install -y rclone
rclone version
warning

The official install script is convenient, but it executes as root. Prefer package managers when your distro packages are acceptable.

Create Your First Remote

interactive-setup.sh
rclone config

In the wizard:

  1. Select n for new remote.
  2. Enter a remote name (example: remote-prod).
  3. Choose backend type (example: s3, b2, drive).
  4. Provide credentials and region/endpoint as prompted.
Remote Naming Conventions
  • Use environment prefixes: prod-..., staging-..., dev-....
  • Keep names short and explicit: prod-s3, prod-r2, prod-drive.
  • Avoid ambiguous names like backup.

Understand Where Config Lives

Rclone stores remote configuration in a config file.

rclone config file
note

For automation (cron/systemd), prefer a stable shared path like /etc/rclone/rclone.conf and pass it explicitly with --config.

Validate Before Use

# show configured remotes
rclone listremotes

# test remote root listing
rclone lsd remote-prod:

# write test
rclone mkdir remote-prod:healthcheck
rclone rmdir remote-prod:healthcheck
tip

Use a dedicated test bucket/path during onboarding. Do not point first tests at production data.

Setup Checklist

CheckCommandExpected
Remote existsrclone listremotesRemote name appears
Read accessrclone lsd remote-prod:Directory list returns
Write accessrclone mkdir ...No auth/permission error
Config locationrclone config filePath is known and backed up

First Transfer (Safe Sandbox)

sandbox-copy.sh
mkdir -p /tmp/rclone-sandbox && echo "ok" > /tmp/rclone-sandbox/hello.txt

# copy to a lab prefix
rclone copy /tmp/rclone-sandbox remote-prod:labs/rclone-sandbox --progress

# list it
rclone lsl remote-prod:labs/rclone-sandbox

Common Pitfalls

PitfallSymptomFix
Wrong endpoint/regionRequest signature errorsRe-run rclone config with correct region
Expired tokenAuth failures after first successRefresh token or service account
Running as wrong userWorks manually but fails in cronKeep user/context consistent

What's Next