Garage is an open-source, S3-compatible object storage server designed to run on modest hardware spread across different locations. It’s a good fit when you want your own S3 endpoint for backups, static assets or application uploads — without the complexity of large storage systems.

Highlights:

  • Speaks the S3 API — works with restic, rclone, Borg-alternatives, Nextcloud, Mastodon, many backup tools and SDKs.
  • Built for geo-distribution: nodes in different data centers, with data replicated across zones.
  • Light on resources: runs comfortably on small VPS plans.
  • Single binary or container; no external database.

Single node or cluster?

  • 1 node — simple S3 endpoint on one server (no redundancy; back it up elsewhere).
  • 3 nodes in different locations — Garage’s recommended setup, with replication_factor = 3: every object stored in three zones, survives the loss of a whole location.

This guide sets up one node, then shows how to add more.

1. Configuration

mkdir -p /srv/garage/{meta,data}
cat > /srv/garage/garage.toml <<EOF
metadata_dir = "/var/lib/garage/meta"
data_dir = "/var/lib/garage/data"
db_engine = "lmdb"

replication_factor = 1

rpc_bind_addr = "[::]:3901"
rpc_public_addr = "YOUR_SERVER_IP:3901"
rpc_secret = "$(openssl rand -hex 32)"

[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
root_domain = ".s3.example.com"

[admin]
api_bind_addr = "127.0.0.1:3903"
admin_token = "$(openssl rand -base64 32)"
EOF

(For a 3-node cluster, set replication_factor = 3 on all nodes before first start, and use the same rpc_secret everywhere.)

2. Run it

docker run -d --name garage --restart unless-stopped --network host \
  -v /srv/garage/garage.toml:/etc/garage.toml \
  -v /srv/garage/meta:/var/lib/garage/meta \
  -v /srv/garage/data:/var/lib/garage/data \
  dxflrs/garage:v1.0.1
alias garage="docker exec -ti garage /garage"
garage status

Use the current stable tag from Garage’s documentation.

3. Assign the layout

Garage needs to know each node’s zone and capacity:

garage status                                  # shows the node ID
garage layout assign -z dc1 -c 200G <node_id>  # zone name and capacity to use
garage layout show
garage layout apply --version 1

4. Create a bucket and key

garage bucket create backups
garage key create backup-key          # prints Key ID and Secret key
garage bucket allow --read --write --owner backups --key backup-key

5. HTTPS in front of the S3 API

Proxy s3.example.com (and *.s3.example.com if you use virtual-host-style URLs) to 127.0.0.1:3900 with Nginx, add a certificate, and keep port 3900 closed to the public:

location / {
    proxy_pass http://127.0.0.1:3900;
    proxy_set_header Host $host;
    client_max_body_size 0;          # no upload limit
    proxy_request_buffering off;
}

Open port 3901 only between cluster nodes (ufw allow from <other node IP> to any port 3901).

6. Use it

rclone:

[garage]
type = s3
provider = Other
endpoint = https://s3.example.com
region = garage
access_key_id = GK…
secret_access_key = …
rclone copy /var/backups garage:backups

restic:

export AWS_ACCESS_KEY_ID=GK… AWS_SECRET_ACCESS_KEY=…
restic -r s3:https://s3.example.com/backups init

See backing up a VPS to cloud storage for a complete restic workflow.

7. Grow into a cluster

On each new node (ideally in a different city or country), use the same config with its own rpc_public_addr, start Garage, then from any node:

garage node connect <node_id>@<ip>:3901
garage layout assign -z dc2 -c 200G <new_node_id>
garage layout assign -z dc3 -c 200G <third_node_id>
garage layout apply --version 2

Garage rebalances data automatically. With three zones and replication factor 3, you can lose a full location and keep serving data.

For example, you could run nodes on a USA VPS, a Hong Kong VPS and a Japan VPS — three separate zones.

Limitations to know

  • Implements the commonly used S3 features; some advanced AWS features (e.g. object lock, some lifecycle rules) may not be available — check the compatibility list for your tools.
  • Not designed for very high-throughput single-bucket workloads like large data lakes.

Sizing

Garage needs little CPU and RAM; storage capacity is what matters. Our Storage VPS plans offer large SSD disks well suited to Garage nodes. Related: SFTPGo can expose a Garage bucket over SFTP.

  • Object Storage
  • S3
  • Backups