Encryption is a critical security consideration for object storage. While Garage does not handle all encryption internally, it provides multiple layers of security and supports various encryption strategies.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deuxfleurs-org/garage/llms.txt
Use this file to discover all available pages before exploring further.
Understanding Your Encryption Needs
Before implementing encryption, consider:- Why do you want encryption? - Compliance, security, privacy?
- What is your threat model?
- Stolen hard drive?
- Curious administrator?
- Malicious administrator?
- Remote attacker?
- What services need protection? - Existing applications like Nextcloud, or custom applications?
Built-in Security Features
Encrypted Inter-Node Communication
All RPC communication between Garage nodes is encrypted by default. Garage uses the kuska handshake library implementing Secure ScuttleButt’s Secret Handshake protocol. Key characteristics:- Clear-text RPC is impossible in Garage
- The
rpc_secretconfiguration parameter is mandatory - Node identifiers are derived from encryption keys
HTTP Endpoints (Unencrypted)
Garage’s HTTP API endpoints (S3 API, web endpoint, admin API) serve traffic in clear text. TLS support is not built into Garage. Recommended approach: Use a reverse proxy to provide TLS termination. See the Reverse Proxy Configuration guide for details.Data-at-Rest Encryption
Plain Text Storage (Default)
By default, Garage stores data blocks in plain text on the filesystem. This is suitable when:- Physical security is assured
- Full-disk encryption is used
- You trust all system administrators
SSE-C (Server-Side Encryption with Customer Keys)
Garage supports SSE-C encryption, an S3 encryption mode where:- Client provides encryption key in request headers
- Garage encrypts/decrypts data using the provided key
- Garage discards the key immediately after use
- Only the gateway node receiving the request knows the encryption key
- Data is encrypted at rest on all storage nodes
- Requires client application support
- Not suitable if you assume the server is compromised (keys pass through server memory)
- Ideal for untrusted storage nodes when using trusted gateway nodes
Full-Disk Encryption
For protection against physical theft, use full-disk encryption with LUKS or similar tools:- Stolen hard drives
- Physical access to decommissioned hardware
- Malicious system administrators
- Remote attackers with system access
- Running system compromise
Client-Side Encryption
For maximum security, encrypt data before sending it to Garage.Protection Level
Client-side encryption protects against:- Honest-but-curious administrators
- Malicious administrators attempting to corrupt data
- Remote attackers who gain access to storage servers
- Compromised Garage nodes
Implementation Examples
Cryptomator (Cyberduck)
Cyberduck supports Cryptomator vaults for client-side encryption:- Create a Cryptomator vault in your S3 bucket
- All files are encrypted before upload
- Transparent decryption on download
Matrix
Matrix uses the OLM protocol for E2EE:- User messages: End-to-end encrypted
- Media files: Encrypted with symmetric keys distributed through encrypted messages
XMPP
XMPP clients support OMEMO/OpenPGP for messages and XEP-0454 for media file encryption.Aerogramme
Aerogramme (email server) uses the user’s password as a key to decrypt bucket data, providing transparent encryption for email storage.Custom Application Encryption
When developing applications that use Garage:- Never transmit plaintext data to Garage
- Manage encryption keys separately from stored data
- Use established encryption libraries (don’t roll your own crypto)
- Consider key rotation strategies
Encryption Strategy Comparison
| Method | Protects Against | Performance Impact | Client Support Required |
|---|---|---|---|
| Inter-node RPC | Network eavesdropping | Minimal | None (built-in) |
| Reverse Proxy TLS | Client-to-server eavesdropping | Low | None (standard HTTPS) |
| Full-Disk Encryption | Physical theft | Low | None |
| SSE-C | Data at rest | Low-Medium | Yes (SSE-C support) |
| Client-Side Encryption | All server threats | Medium | Yes (custom implementation) |
Recommendations
For most deployments:- Always use: TLS reverse proxy for client connections
- Highly recommended: Full-disk encryption (LUKS) on storage nodes
- For sensitive data: Client-side encryption in your application
- For untrusted storage: SSE-C if client-side encryption isn’t feasible