Garage is an open-source, S3-compatible object storage service built for small-to-medium self-hosted deployments that span multiple geographic locations. It solves the challenge of maintaining resilient, redundant storage without requiring dedicated infrastructure or enterprise-grade hardware, making it ideal for individuals, small teams, and privacy-focused organizations seeking control over their data.
Built in Rust, Garage runs as a single dependency-free binary on Linux systems with minimal resource requirements. It leverages distributed systems research from Dynamo, CRDTs, and Maglev to ensure data consistency and fault tolerance across unreliable networks. Garage supports deployment on heterogeneous hardware across the public internet, enabling clusters to be assembled from second-hand servers in different data centers or home environments.
What You Get
- S3 API Compatibility - Fully implements the Amazon S3 API, enabling seamless integration with existing tools like rclone, MinIO clients, WordPress media uploads, and backup software without code changes.
- Multi-Zone Data Replication - Automatically replicates data chunks across three configurable zones (physical locations) to ensure availability during node or network failures.
- Single Binary Deployment - Ships as a standalone, dependency-free binary that runs on any Linux distribution with x86_64, ARMv7, or ARMv8 architecture.
- Low Resource Requirements - Operates on hardware with as little as 1 GB RAM, 16 GB disk space, and 50 Mbps network bandwidth, making it suitable for older or second-hand machines.
- Network Resilience - Designed to handle high latency (up to 200 ms), intermittent connectivity, and partial network outages without data loss or service interruption.
- Heterogeneous Cluster Support - Allows mixing of different hardware models and network conditions within a single cluster, enabling cost-effective scaling with surplus equipment.
- AGPLv3 Licensed - Fully open-source with no vendor lock-in, allowing audit, modification, and deployment without licensing fees or restrictions.
Common Use Cases
- Running a self-hosted media server - A home user stores photos and videos across three geographically dispersed servers, ensuring access even if one location loses power or internet.
- Hosting a private backup target - A sysadmin uses Garage as an S3 endpoint for rclone or Duplicati to back up critical data across multiple data centers for disaster recovery.
- Deploying a resilient website asset store - A developer hosts static assets (CSS, JS, images) for a website on Garage, leveraging S3 compatibility to work with Cloudflare or Nginx without vendor lock-in.
- Building a privacy-focused cloud storage stack - An organization replaces AWS S3 with Garage to eliminate third-party dependencies while maintaining compatibility with existing S3-based applications.
Under The Hood
Architecture
- Modular Rust workspace with distinct crates enforcing clear separation of concerns through explicit dependencies and bounded contexts
- Service-layer design where domain models are decoupled from HTTP/S3/admin endpoints, implemented via async RequestHandler traits
- Centralized access to storage layers through dependency injection using Arc<Garage>, enabling consistent configuration and testability
- Protocol-agnostic data layer abstracted by TableReplication trait, supporting pluggable replication strategies like sharded and full-copy
- RPC layer built on MessagePack and Tokio with peer coordination via watch-based shutdown signals
- Shared utilities for signature validation, error handling, and CORS centralized in a common module to reduce duplication
Tech Stack
- Rust backend leveraging Tokio and Hyper for high-performance async networking
- Embedded storage engines including Sheed, Rusqlite, and Fjall for low-level data management
- Production-grade deployment via static binaries in scratch Docker images with environment-driven logging
- Kubernetes integration for orchestration and service discovery using modern Rust client libraries
- Comprehensive tooling with Cargo workspace, formatters, and validation tools for development consistency
Code Quality
- Limited test coverage with ad-hoc assertions and no structured unit or integration testing framework
- Error handling relies on generic types, resulting in opaque failure modes and poor debuggability
- Inconsistent naming conventions across modules without clear style guidelines
- Type safety is undermined by frequent unwrap() calls and unchecked option handling in critical paths
- Absence of formal linting, formatting standards, or static analysis tools
- Test utilities are fragmented, consisting of custom macros rather than a cohesive testing infrastructure
What Makes It Unique
- Native CRDT-based cluster layout with real-time staging and versioned history for auditable topology changes
- Unified S3 and K2V data model with shared replication layer, eliminating silos between object and key-value storage
- End-to-end checksum validation during uploads via trailer-based integrity verification
- Pluggable storage backends with automatic Merkle tree generation for distributed consistency verification
- Dynamic admin token injection with scoped permissions enabling secure zero-touch deployment
- Granular partition-level indexing with metadata endpoints exposing byte-counts and conflict tracking via S3-compatible APIs