Understanding Cloudstic Encryption
Cloudstic’s encryption model:- A random 32-byte master key is generated during
cloudstic init - The master key encrypts all backup data
- The master key itself is wrapped into one or more key slots
- Each slot is unlocked with different credentials (password, platform key, KMS key, or recovery phrase)
- All slots unlock the same master key
Think of key slots like multiple keys to the same safe. You can unlock your backups with any valid credential.
Key Slot Types
Creating a Repository with Encryption
Password-Based Encryption
Most common for personal use:Password + Recovery Key (Recommended)
Add a recovery key during initialization:Platform Key for Automation
Use a raw encryption key for non-interactive systems:Platform keys are intended for automation where password prompts aren’t possible. Store them in a secrets manager (HashiCorp Vault, AWS Secrets Manager, etc.).
Dual Access (Password + Platform Key)
Create a repository with both types of access:Listing Key Slots
View all key slots in a repository:key list does not require authentication. Slot metadata is stored unencrypted.Adding a Recovery Key
Add a recovery key to an existing repository:Changing Your Password
Update the password slot:- Current password (or provide via
-password) - New password (or provide via
-new-password) - Confirmation of new password
Using Recovery Keys to Access Backups
If you’ve lost your password, use your recovery key:Environment Variables for Credentials
Avoid typing credentials repeatedly:~/.bashrc, ~/.zshrc) for persistence:
Store-Level Encryption Configuration
When using profiles, encryption settings can be stored on the store entry using secret references. Only the reference is saved, never the secret value itself:store new guides you through encryption setup if no encryption flags are provided:
profiles.yaml as secret references. You can
then initialize the store immediately or later with cloudstic init -profile <name>.
This saves to profiles.yaml:
env://VAR_NAMEkeychain://service/accountwincred://targetsecret-service://collection/item
Interactive Password Prompts
If no credential is provided, Cloudstic will prompt interactively:Advanced: AWS KMS Integration
For enterprise deployments, use AWS KMS to manage encryption keys:1
Create a KMS key
KeyId from the output.2
Initialize repository with KMS
3
Use KMS for all operations
KMS integration requires AWS credentials with
kms:Decrypt and kms:GenerateDataKey permissions.Security Best Practices
1
Use strong, unique passphrases
- At least 20 characters
- Mix of words, numbers, and symbols
- Not reused from other services
- Consider using a passphrase generator
2
Always create a recovery key
3
Store recovery keys offline
- Write on paper, store in a safe
- Use a safety deposit box
- Split across multiple secure locations
- Never store digitally alongside backups
4
Test recovery key access
Verify your recovery key works:
5
Rotate passwords periodically
6
Use KMS for production systems
Leverage hardware security modules for enterprise deployments:
Troubleshooting
”Could not open key slots” Error
Your password or key is incorrect. Verify:“Repository not encrypted” Message
The repository was created with-no-encryption. Key management commands don’t apply to unencrypted repositories.
Lost Password and Recovery Key
There is no recovery option if both are lost. Your backups are permanently inaccessible. This is by design: encryption without a backdoor. Preventive measures:- Always create a recovery key (
-add-recovery-key) - Store recovery key in multiple secure locations
- Document your encryption setup
Changing Password Doesn’t Work
Ensure you’re providing the correct current credentials:Recovery Key Format
Recovery keys use the BIP39 mnemonic standard:- 24 words from a standardized word list
- Each word encodes ~11 bits of entropy
- Total: 256 bits of entropy (same as the master key)
- Words are lowercase, space-separated
- Order matters
Unencrypted Repositories
You can create an unencrypted repository (not recommended):- Testing and development
- Backups of already-encrypted data
- Air-gapped systems with physical security
Next Steps
First Backup
Create your first encrypted backup
Restoring Files
Use your encryption key to restore backups
Automation
Automate backups with platform keys
Check Command
Verify encrypted data integrity