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.
Configuration File Format
Garage uses a TOML configuration file to define its behavior. This page documents all available configuration options.Configuration File Location
The configuration file path is specified when starting Garage:Full Configuration Example
Here is a complete example showing all available options:Top-Level Configuration Options
Replication and Consistency
Number of copies of data to store across the cluster. Must be a positive integer ≤ node count.Recommendations:
1: Single node, no redundancy (testing only)2: Tolerates one node failure, read-only mode when one node is down3: Recommended - tolerates two node failures, maintains read/write with one failure5,7, etc.: Higher fault tolerance with uneven numbers preferred
replication_factor. Changing this requires deleting the cluster layout and rebalancing all data.Controls read and write quorum behavior.Options:
consistent: Default. Guarantees read-after-write consistencydegraded: Lowers read quorum to 1. Allows reads when multiple nodes are down, but no read-after-write consistencydangerous: Lowers both read and write quorums to 1. Least consistent mode, use with extreme caution
Storage Directories
Directory for storing metadata (node ID, network config, peer list, bucket/key info, object indexes).Recommendation: Use fast SSD storage for best performance.
Directory for storing data blocks. Can be a single path or multiple paths with attributes.Single directory:Multiple directories (since v0.9.0):
Directory for metadata snapshots. By default, snapshots are stored in
<metadata_dir>/snapshots/.Set this to a location with more space if snapshots fill your metadata storage.Database Configuration
Database engine for metadata storage.Options:
lmdb: Recommended for high-performance clusters (default since v0.9.0)sqlite: Alternative backend, slower but more portablefjall: Experimental LSM-tree based engine (testing only)
- Prone to corruption after unclean shutdown (use
metadata_auto_snapshot_interval) - Database format not portable between architectures
- Not recommended for 32-bit systems
- Keys limited to 511 bytes (affects S3 object keys)
Maximum size for LMDB database. This is virtual memory mapping size, not physical RAM.Defaults:
- 1GiB on 32-bit systems
- 1TiB on 64-bit systems
Data Integrity and Durability
Enable synchronous writes for metadata database. Reduces corruption risk during power failures but significantly impacts write performance.Impact by database engine:
- SQLite:
PRAGMA synchronous = NORMAL(vsOFF) - LMDB:
MDB_NOMETASYNConly (vsMDB_NOMETASYNC+MDB_NOSYNC) - Fjall: Not supported
Call
fsync() after writing data blocks to disk. Moderately impacts write performance.Reduces risk of data loss during simultaneous power failures on multiple nodes.Disable automatic monthly data scrubbing. Garage normally reads all data files to verify integrity and rebuilds corrupted files.Set to
true if scrubbing at filesystem level. If you find corrupted files, delete them and run garage repair blocks.Automatically snapshot metadata database at regular intervals. Accepts duration strings like Note: Snapshot operations are intensive and may impact performance during heavy write loads.
"6h", "1d", etc.Garage keeps the two most recent snapshots. Snapshots enable recovery from metadata corruption.Block Storage Configuration
Size of data blocks for splitting stored objects. Accepts human-readable sizes.Recommendations:Note: Only affects newly uploaded files. Existing files remain accessible but won’t deduplicate with new files.
- Default:
1M(1 MiB) - Fast networks (≥1 Gbps) with large files:
10Mor higher
Maximum RAM for buffering data blocks awaiting asynchronous transfer to storage nodes.When limit is reached, backpressure is applied to S3 clients. This is not a hard limit on total RAM consumption.
Maximum number of block files open simultaneously for reading (since v1.3.0/v2.1.0).Provides backpressure mechanism for HDD read speed. Requests wait up to 15 seconds for a read slot; timeouts indicate I/O bottleneck.Monitor
block_read_semaphore_timeouts metric in Prometheus for timeout events.Maximum parallel block writes per PUT request (since v1.3.1/v2.2.0).Recommendations:
- NVMe: 10-30
- HDD: 3-10
Zstd compression level for data blocks.Values:
-99to-1: Fast compression (smaller file to faster compression)0: Zstd default (currently 3)1to19: Standard compression (faster to smaller)20to22: Ultra compression (high memory usage)'none': Disable compression entirely
RPC Configuration
32-byte hex-encoded secret shared by all cluster nodes for authentication.Generate with:
openssl rand -hex 32Can also be set via rpc_secret_file or environment variables (see Environment Variables).Address and port for inter-cluster RPC communication.Important: Port must be consistent between internal and external addresses, even behind NAT. Multiple nodes behind NAT must use different ports.
Public address and port other nodes use to contact this node. Recommended but optional.Useful when behind NAT with port mapping.
When
rpc_public_addr is not set, filter autodiscovered IPs to specific subnet.Bind outgoing RPC connections to the same IP as
rpc_bind_addr (since v0.9.2).Necessary when node has multiple IPs but only one can reach other nodes due to firewall or routing rules.Cluster Discovery
List of peer identifiers for initial cluster discovery.Format: Get node identifier with:
<node-public-key>@<ip-or-hostname>:<port>garage node idSecurity
Bypass permission checks on secret files. Useful with POSIX ACLs or complex permissions.Can also be set via
GARAGE_ALLOW_WORLD_READABLE_SECRETS environment variable.Allow punycode in bucket names. Enables almost any Unicode character in website domain names.
Miscellaneous
Run lifecycle worker at midnight in local timezone instead of UTC (since v1.1.0).Ensure all nodes have the same timezone configuration.
Consul Discovery Configuration
The[consul_discovery] section enables automatic node discovery via Consul. Nodes must have rpc_public_addr set.
Consul API to use for service registration.Options:
catalog: Use/v1/catalogendpoints with optional mTLSagent: Use/v1/agentendpoints with optional token
Full HTTP(S) address of Consul server.
Service name under which Garage RPC ports are announced.
Path to CA certificate for TLS communication with Consul.
Path to client certificate for mTLS with Consul. Only available with
api = "catalog".Both client_cert and client_key must be provided.Path to client key for mTLS with Consul. Only available with
api = "catalog".Skip TLS hostname verification. When enabled,
ca_cert is ignored.Authentication token for Consul. Only available with
api = "agent".Required policy:Additional tags for service registration.
Additional service metadata.
List of datacenters for service discovery in WAN federation.
Kubernetes Discovery Configuration
The[kubernetes_discovery] section enables automatic node discovery via Kubernetes custom resources.
Kubernetes namespace containing custom resources.
Service name label for filtering resources (allows multiple deployments per namespace).
Skip automatic creation/patching of
garagenodes.deuxfleurs.fr CRD. You must create the CRD manually.S3 API Configuration
The[s3_api] section configures the S3-compatible API endpoint.
IP and port for S3 API. Can be a TCP address or Unix socket path (mode 0222).This endpoint does not support TLS; use a reverse proxy for HTTPS.
S3 region name. API calls for other regions fail with
AuthorizationHeaderMalformed.Domain suffix for vhost-style S3 requests. Requires wildcard DNS and optionally wildcard TLS certificate.Path-style requests always work regardless of this setting.With this setting, bucket
my-bucket is accessible at my-bucket.s3.garage.S3 Web Configuration
The[s3_web] section configures static website hosting from S3 buckets.
IP and port for web server. Can be TCP address or Unix socket path (mode 0222).This endpoint does not support TLS; use a reverse proxy for HTTPS.
Domain suffix for website hosting.Bucket
deuxfleurs.fr accessible at both:deuxfleurs.fr.web.garagedeuxfleurs.fr
Include HTTP
Host header in Prometheus metrics. Disabled by default to prevent cardinality explosion.Admin API Configuration
The[admin] section configures the administration and monitoring API.
IP and port for admin API. Can be TCP address or Unix socket path (mode 0220).
Bearer token for admin API access (except metrics endpoint).Generate with:
openssl rand -base64 32Can also be set via admin_token_file or environment variables (see Environment Variables).Since v2.0, additional tokens can be defined dynamically with expiration and scoped permissions. This token acts as full-scope, non-expiring token.Bearer token for
/metrics endpoint access.Generate with: openssl rand -base64 32If not set and metrics_require_token is false, metrics are accessible without authentication.Can also be set via metrics_token_file or environment variables (see Environment Variables).Require authentication token for metrics endpoint (since v2.0.0).Valid tokens include
metrics_token and dynamically defined admin tokens with Metrics scope.OpenTelemetry collector address for distributed tracing.
Configuration File Conversion
To convert metadata between database engines:Related Resources
- Environment Variables - Environment variable overrides and configuration
- Admin API Reference - Administration API endpoints
- Cluster Management - Managing your Garage cluster