Skip to main content

Crypt Remotes and Encrypted Layouts

Rclone crypt encrypts both file content and file names before objects reach cloud storage.

Learning Focus

Use crypt remotes to make cloud backups safe by default, then prove you can restore using only documented keys and config.

Why Use Crypt

BenefitOperational impact
Encrypted contentReduced exposure if cloud bucket is leaked
Encrypted filenamesHides metadata and naming conventions
Transparent CLI usageSame transfer commands after setup

Mapping

What Crypt Does (and Does Not) Protect

ProtectedNotes
File contentsEncrypted before upload
Filenames and directory namesEncrypted to hide structure
Not fully hiddenNotes
Object sizesProviders still see sizes
Access patternsProviders can observe timing and frequency
Total object countStill measurable

Setup Pattern

  1. Configure base remote (example: s3-prod).
  2. Create crypt remote pointing at a subpath.
  3. Use crypt remote for all backup jobs.

Create a Crypt Remote

rclone config

Typical wizard actions:

  1. New remote name: crypt-prod
  2. Type: crypt
  3. Remote to encrypt: s3-prod:org-backups/encrypted
  4. Choose filename encryption and directory name encryption options
  5. Set strong passphrase (store it securely)
crypt-usage.sh
rclone sync /srv/finance crypt-prod:daily/finance --progress
rclone ls crypt-prod:daily/finance
warning

If you lose the crypt passphrase/salt, encrypted backups are effectively unrecoverable.

danger

Do not store crypt secrets only in one person's password manager. Document recovery in a team-accessible, secure location.

Layout Recommendation

LayerExample
Base remotes3-prod:org-backups/
Crypt remote rootcrypt-prod:daily/
Dataset pathcrypt-prod:daily/mysql/

Restore Drill (Minimum)

  1. Pick a backup prefix.
  2. Restore into an isolated directory.
  3. Validate with check.
crypt-restore-drill.sh
SNAPSHOT="daily/finance"
mkdir -p /restore/crypt-drill
rclone sync crypt-prod:${SNAPSHOT} /restore/crypt-drill --progress
rclone check crypt-prod:${SNAPSHOT} /restore/crypt-drill --one-way

Validation

# encrypted listing on raw remote
rclone ls s3-prod:org-backups/daily/mysql

# decrypted listing through crypt remote
rclone ls crypt-prod:daily/mysql

Common Pitfalls

PitfallConsequencePrevention
Mixing crypt and non-crypt pathsData confusionReserve clear remote naming
Inconsistent key storageRestore failuresDocument secure key recovery process
One crypt remote for everythingHard access segmentationUse domain-specific encrypted paths

What's Next