# Garage — Lightweight Self-Hosted S3-Compatible Storage > Garage is a lightweight, self-hosted, geo-distributed object storage system that implements the S3 API and is designed for small to medium infrastructure. ## Install Save in your project root: # Garage — Lightweight Self-Hosted S3-Compatible Storage ## Quick Use ```bash # Download and start a single-node instance curl -Lo garage https://garagehq.deuxfleurs.fr/dl/v1.0/x86_64-unknown-linux-musl/garage chmod +x garage # Generate a config file cat > garage.toml << EOF metadata_dir = "/var/lib/garage/meta" data_dir = "/var/lib/garage/data" db_engine = "lmdb" replication_factor = 1 [s3_api] api_bind_addr = "[::]:3900" s3_region = "garage" root_domain = ".s3.garage.localhost" [rpc_bind_addr] # defaults [admin] api_bind_addr = "[::]:3903" EOF ./garage -c garage.toml server ``` ## Introduction Garage is a self-hosted S3-compatible object storage server built in Rust. Unlike heavyweight systems like Ceph or MinIO, Garage is designed for small clusters spread across multiple locations. It handles geo-distribution natively, replicating data across zones with minimal coordination, making it suitable for homelab setups and small organizations. ## What Garage Does - Serves objects over the S3 API, compatible with standard AWS SDKs and tools - Replicates data across geographic zones for redundancy without a central coordinator - Supports multi-tenancy with access keys, bucket policies, and per-bucket quotas - Provides a static website hosting mode directly from S3 buckets - Runs as a single static binary with minimal resource consumption ## Architecture Overview Garage uses a peer-to-peer protocol where all nodes are equal — there is no master or coordinator. Metadata is stored in a Merkle-search-tree CRDT that synchronizes across nodes without consensus overhead. Data blocks are replicated across zones according to a configurable replication factor. The cluster layout maps partitions to nodes, and rebalancing happens automatically when nodes join or leave. ## Self-Hosting & Configuration - Deploy as a single static binary on each node (Linux, ARM, or x86_64) - Configure via a TOML file specifying data directories, RPC ports, and S3 endpoint - Assign nodes to geographic zones for cross-site replication - Create access keys and buckets via the `garage` CLI or the admin HTTP API - Monitor with built-in Prometheus metrics and optional Grafana dashboards ## Key Features - Designed for geo-distributed clusters across multiple physical locations - No single point of failure — fully decentralized peer-to-peer architecture - Low resource footprint suitable for Raspberry Pi and homelab hardware - S3-compatible API works with rclone, restic, Nextcloud, and any S3 client - Static website hosting directly from S3 buckets with custom domain support ## Comparison with Similar Tools - **MinIO** — Higher performance for single-site deployments but heavier resource usage - **Ceph (RGW)** — Enterprise-grade with POSIX and block support, but complex to operate - **SeaweedFS** — Blob-oriented store with FUSE mount, not primarily S3-focused - **CubeFS** — Cloud-native distributed filesystem, requires larger minimum cluster - **Wasabi / Backblaze B2** — Managed cloud storage, not self-hosted ## FAQ **Q: How many nodes do I need to run Garage?** A: A single node works for testing. For production geo-distribution, 3 nodes across 3 zones is recommended with replication factor 3. **Q: Can I use Garage as a backup target?** A: Yes. Tools like restic, Duplicati, and rclone work with Garage's S3 API for encrypted backups. **Q: Does Garage support versioning or lifecycle policies?** A: Bucket versioning is supported. Lifecycle policies for automatic deletion are on the roadmap. **Q: What are the hardware requirements?** A: Garage runs on hardware as small as a Raspberry Pi 4 with 2 GB RAM. Production nodes benefit from SSDs for metadata storage. ## Sources - https://github.com/deuxfleurs-org/garage - https://garagehq.deuxfleurs.fr/documentation/ --- Source: https://tokrepo.com/en/workflows/asset-d0a7b7dd Author: AI Open Source