rclone config to add your storage as a remote, optionally wrap it in an encrypted crypt remote, then copy your folders with rclone sync /var/www secret:www --backup-dir secret:old/2026-11-04. Test with --dry-run first and schedule it with cron.
Before you start
- Connect with SSH. Commands use
sudo; root users can leave it out. - Have your storage details ready: for S3-compatible storage an access key, secret key, endpoint and bucket; for Google Drive a Google account and a computer with a web browser.
- A remote is rclone’s name for one storage location, for example
s3backup:orgdrive:.
How to install rclone
The rclone project notes that distribution packages are often out of date, and recommends its install script:sudo apt install rclone on Ubuntu / Debian). Ubuntu 24.04 ships rclone 1.60, which is older but works for the commands on this page.
How to add a cloud storage remote
Run the backup as root, so configure rclone as root too. The configuration is saved in/root/.config/rclone/rclone.conf.
n (new remote), enter a name, then pick the storage type.
- S3-compatible storage
- Google Drive (headless server)
Choose Amazon S3 Compliant Storage Providers, then your provider (or Other). Enter the access key, secret key and endpoint. The finished section in Test it by listing your buckets:
rclone.conf looks like this:How to encrypt backups with an rclone crypt remote
A crypt remote encrypts file contents and file names before they leave your server. It sits on top of a normal remote.1
Create the crypt remote
Run
sudo rclone config, choose n, name it secret, and pick Encrypt/Decrypt a remote. For the remote to encrypt, enter a folder on your storage, for example s3backup:my-bucket/server1.2
Choose passwords
Let rclone generate a password or enter your own, plus the optional second password (salt). Store both outside the server, for example in a password manager.
3
Always use the crypt remote
Upload and download through
secret:. Files written straight to s3backup:my-bucket/server1 are not encrypted.Should I use rclone copy or rclone sync?
For backups, use
sync with --backup-dir, so deleted and changed files are kept for a while.
How to run an rclone backup
1
Dry run
2
Run the backup
3
Check the result
0 differences found.How to run rclone backups on a schedule
Put the sync commands in/usr/local/bin/rclone-backup.sh, then sudo chmod 700 /usr/local/bin/rclone-backup.sh and add it to root’s crontab with sudo crontab -e:
--bwlimit 20M if the upload slows your server; it limits rclone to 20 MiB/s (bytes, not bits). See schedule tasks with cron.
How to restore files with rclone
Copy from the remote to a temporary folder, check the files, then move them into place:secret:old/<date>/.
Frequently asked questions
Does rclone keep old versions of files?
Not by itself.rclone sync keeps only the latest copy unless you add --backup-dir. For proper snapshots with deduplication, use restic, which can also store its repository through rclone.
Where is the rclone config file?
Runrclone config file. On Linux it is normally ~/.config/rclone/rclone.conf, so /root/.config/rclone/rclone.conf for root. It contains your storage keys: keep it readable only by root.
Can I use Google Drive on a server without a browser?
Yes. Answern to the browser question in rclone config, run rclone authorize "drive" on a computer with a browser, and paste the token back on the server.
Why does rclone sync need permission to create buckets?
On S3, rclone checks or creates the bucket. If your key cannot create buckets, create the bucket yourself and add--s3-no-check-bucket.
Related guides
VPS and dedicated server guides
Every guide in this section.
Back up a Linux server
What to back up and which tool to use.
Encrypted backups with restic
Versioned, deduplicated backups.
Back up with rsync
Copy to another server over SSH.
Schedule tasks with cron
Run backups automatically.
Checked against the official rclone documentation on 4 November 2026;
rclone config create, copy, sync --dry-run, --backup-dir, check and a crypt remote tested on Ubuntu 24.04 LTS (rclone 1.60.1) against local storage. Commands can differ on other distributions or releases.Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026