How to Encrypt Files Before Uploading to Cloud Storage

Cloud providers usually encrypt your files, but they often hold the keys. Client-side encryption flips that: your device scrambles each file before it syncs, so the provider stores only ciphertext. Tools such as Cryptomator and rclone crypt do this with a vault or a wrapped remote. The trade-offs are real: you lose provider-side previews, search and easy sharing, and a lost password means lost data. Set up one vault, test recovery, then decide what belongs in it.
Uploading a contract to a cloud drive feels private. The connection is encrypted, the provider says files are encrypted at rest, and a password protects your account. Yet in most mainstream services, the provider can decrypt your files, because it manages the keys. That is why the files can be previewed in the browser, searched, scanned and restored by support staff.
For most everyday files that arrangement is fine. For a small set of files, such as client financial statements, legal drafts, HR records or source code, some teams prefer that the provider cannot read them even in principle. The approach is called client-side encryption, and it means encrypting each file on your own computer before it reaches the cloud.
This guide explains how it works, walks through a safe setup, and states plainly what you give up. It draws on the documentation of two well-known open-source tools, Cryptomator and rclone crypt. We have not benchmarked them or compared them as products, and the guide is not an endorsement. Always read the current documentation before you rely on any tool.
What "encrypted in the cloud" usually means
Three different statements get blended together, so separate them first.
- Encrypted in transit. Data is protected between your device and the provider's servers, normally with TLS. Our explainer on TLS for business covers this.
- Encrypted at rest. The provider stores data in encrypted form on its disks. This protects against someone stealing a physical drive from a data center. It does not stop the provider's own systems or staff with access from reading the data, since the provider holds the keys.
- Client-side (or end-to-end) encrypted. Encryption and decryption happen on your devices. The provider only sees ciphertext. This is what the tools in this guide provide.
The Cryptomator project puts the difference this way: most cloud providers encrypt data only during transmission or keep the keys for decryption for themselves, and keys that someone else holds can be stolen, copied or misused. The comparison of end-to-end encryption and encryption at rest goes deeper, and zero-knowledge encryption explains the marketing term.

When client-side encryption is worth the effort
Use it for folders where the cost of exposure is high and the number of collaborators is small:
- Client or investor financial records.
- Legal documents and settlement drafts.
- HR files, payroll exports and background checks.
- Credentials, keys and configuration backups.
- Archives you rarely open but must keep for years.
Skip it, or use it sparingly, for folders that many people edit together every day, because collaboration features depend on the provider being able to read the file. For those, concentrate on access controls, expiry and audits instead; our cloud storage sharing permission audit guide is a good start.
Option 1: A vault with Cryptomator
Cryptomator creates an encrypted folder, called a vault, inside the cloud-synced folder you already use. You unlock it with a password, and it appears as a virtual drive.
How the documentation describes it:
- Files in the virtual drive are transparently encrypted and decrypted on the fly, and "there are no unencrypted copies on your hard disk drive."
- It uses a virtual file system. On Windows it uses WinFsp, on macOS macFUSE and on Linux FUSE, and if those are unavailable it falls back on a local WebDAV server that accepts only loopback connections on your own machine.
- Both file contents and file names are encrypted with AES and 256-bit keys, so someone browsing your cloud folder sees scrambled names and structure.
- Every vault has its own 256-bit encryption master key and 256-bit MAC master key. For a password-protected vault, a key-encryption key is derived from your password using scrypt, and the master keys are wrapped with AES Key Wrap and stored in a file in the vault.
- A vault configuration file in the vault's root records the format and cipher mode, and is signed so that tampering with it is detected.
Setting up a vault safely
- 1Create the vault inside the synced folder of your chosen cloud service, so the encrypted files sync automatically.
- 2Choose a long passphrase of several unrelated words, generated and stored in a password manager. The vault's strength depends on it.
- 3Save the recovery key if the app offers one, and store it somewhere separate from the vault and from the device.
- 4Move a small test set of files into the unlocked vault.
- 5Look at the cloud folder directly in the provider's web interface. You should see scrambled file names and unreadable contents.
- 6Lock the vault and confirm the virtual drive disappears and its contents are no longer accessible.
- 7Sign in on a second device, install the same tool, add the vault and confirm that files open there.
- 8Practice recovery: delete the app on a test machine and restore access using only your documented steps.
Option 2: A crypt remote with rclone
rclone is a command-line program that syncs files with many cloud services. Its crypt feature wraps another storage location and encrypts before upload and decrypts after download. It is more technical than a vault app, so it suits administrators and scheduled backups.
What the documentation says:
- A crypt remote does not access storage directly; it wraps another remote that does. Anything inside the configured path is encrypted, and anything outside it is not.
- File contents are encrypted with NaCl SecretBox, based on the XSalsa20 cipher with Poly1305 for integrity.
- File and directory names are encrypted by default, segment by segment, using AES with a 256-bit key in a wide-block mode. Name encryption can be turned off, with implications described in the documentation.
- Keys are derived from your password with scrypt. An optional second password acts as a salt, and the documentation says you should always use one for full protection against dictionary attacks.
- Hashes are not stored for encrypted remotes; integrity comes from the cryptographic authenticator, and the documentation recommends its dedicated check command instead of the normal one.
- Modification times depend on whether the underlying storage supports them.
Two cautions in the documentation deserve emphasis. First, the crypt password stored in the configuration file is only lightly obscured, which protects against cursory inspection but is not secure unless configuration encryption is enabled. Treat the configuration file like a secret. Second, if you reach the underlying storage with another application, you will see scrambled content, and anything you upload that way will not be encrypted. Point the crypt remote at its own dedicated directory so that encrypted and unencrypted material do not get mixed.

Cryptomator or rclone: which approach fits?
| Question | Vault app (Cryptomator style) | Crypt remote (rclone style) |
|---|---|---|
| Who uses it? | Anyone who can use a folder | Administrators comfortable with a command line |
| Everyday access | Virtual drive on the desktop | Mount or sync command |
| Automation | Limited | Strong: scheduled backups and scripts |
| Name encryption | Yes | Yes, on by default |
| Key backup | Recovery key and password | Password, optional salt and config file |
| Mixing with unencrypted files | Vault is a distinct folder | Needs a dedicated directory |
Both are open source and well documented, which allows independent review. Neither guarantees safety on a compromised computer. If malware is on your device while the vault is unlocked, it can read the decrypted files.
What stops working once files are encrypted
Be honest with your team about the costs before rolling this out.
- Browser previews and editing. The provider cannot render a file it cannot read.
- Provider search. Full-text search inside file contents will not work, and scrambled names cannot be searched in the web interface.
- Sharing links. A link to a ciphertext file gives the recipient a scrambled file. The recipient needs your tool and password, or you must share an unencrypted copy through another route. See secure file sharing versus email attachments for choices.
- Mobile access. Some tools support mobile apps and some do not; confirm for the platform you need.
- Server-side malware scanning and DLP. If a provider scans file contents for threats or data-loss rules, it cannot scan ciphertext. Compare this with data loss prevention needs.
- Provider recovery. Support staff cannot reset a forgotten vault password for you. This is the point of the design, and also its biggest risk.
Key and recovery planning
Treat the password as the file. These steps prevent most disasters:
- 1Store the passphrase in a team password manager with at least two administrators.
- 2Keep recovery material offline, for example in a sealed envelope in a safe or an offline encrypted drive.
- 3Document who can unlock which vault and review the list when staff change.
- 4Back up the vault folder itself, not just the plaintext you see when unlocked. The documentation for rclone also recommends syncing the encrypted files for backups and keeping passwords the same on the target remote, which avoids decrypting and re-encrypting unnecessarily.
- 5Test a restore every six to twelve months from an independent copy.
- 6Plan for staff departures. If a person who knew a shared vault password leaves, create a new vault with a new password and move files across.
See also the 3-2-1 backup rule and ransomware-proof cloud backups for the surrounding backup routine.
A practical 30-minute pilot
- 1Pick one folder that contains no regulated or irreplaceable data.
- 2Create a vault with a strong generated passphrase.
- 3Copy 10 non-sensitive test files into it.
- 4Verify in the provider's web view that names and contents are unreadable.
- 5Open the files from a second device.
- 6Delete a file, lock the vault and restore the file from the provider's version history if available.
- 7Write a half-page procedure covering setup, daily use and recovery.
- 8Ask two colleagues to follow the procedure without help. Fix every confusing step.
Only after that pilot should you move live material in.
Mistakes to avoid
- Uploading plaintext copies "temporarily." Copies in downloads folders and sync clients undermine the vault. Clean up and use secure deletion where needed; see how to securely delete files.
- Putting the password in the same shared drive. It defeats the point.
- Assuming the tool covers metadata everywhere. Folder sizes, file counts and modification times may remain visible to the provider, depending on the tool and settings.
- Treating encryption as a replacement for access control. Encrypt and limit who can sync the vault.
- Never testing recovery. An untested backup is an assumption.

Where this fits in a larger plan
Client-side encryption addresses one risk: a provider, or someone who compromises the provider's systems, reading your stored files. It does not address phishing, stolen laptops, weak passwords or oversharing. Pair it with device encryption (see our file encryption software guide), multifactor authentication as recommended by CISA, and a clear retention policy so you do not keep encrypted files you no longer need.
Frequently Asked Questions
Usually yes, in transit and at rest, but the provider typically holds the keys. Cryptomator describes the common situation as encrypting data only during transmission or keeping the decryption keys. Client-side encryption means your device holds the keys and the provider stores only ciphertext.
Sources
- Cryptomator: Free and open-source cloud storage encryption
- Cryptomator Documentation: Security Architecture
- rclone Documentation: Crypt
- NIST SP 800-111: Guide to Storage Encryption Technologies for End User Devices
- CISA: Require multifactor authentication
Keep Reading

About the Author: Mohamed Siraj
Mohamed is the founder of SecureTools.live. He leads the team in building secure, compliant, and privacy-first directory tooling for software teams, finance professionals, and enterprise security leaders worldwide.