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
- Debian/Ubuntu
- RHEL/Fedora
- Official Installer
sudo apt update
sudo apt install -y rclone
rclone version
sudo dnf install -y rclone
rclone version
curl https://rclone.org/install.sh | sudo bash
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:
- Select
nfor new remote. - Enter a remote name (example:
remote-prod). - Choose backend type (example:
s3,b2,drive). - 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
| Check | Command | Expected |
|---|---|---|
| Remote exists | rclone listremotes | Remote name appears |
| Read access | rclone lsd remote-prod: | Directory list returns |
| Write access | rclone mkdir ... | No auth/permission error |
| Config location | rclone config file | Path 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
| Pitfall | Symptom | Fix |
|---|---|---|
| Wrong endpoint/region | Request signature errors | Re-run rclone config with correct region |
| Expired token | Auth failures after first success | Refresh token or service account |
| Running as wrong user | Works manually but fails in cron | Keep user/context consistent |
What's Next
- If you're using S3-compatible storage: S3, B2, and R2 Remotes
- For automation basics: Cron and Systemd Timers
- For safety fundamentals: Copy, Sync, Move