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.
Environment Variables
Garage supports several environment variables for configuration. Some variables provide alternative ways to set configuration file options (especially sensitive values), while others can only be set as environment variables.Logging Configuration
These environment variables control log output and can only be set as environment variables (not available in config file).Send logs to syslog instead of stderr (since v0.9.4).Set to
1 or true to enable. Uses the libc syslog() function.Send logs to systemd-journald instead of stderr (since v1.2.0).Set to Note: Do not enable both
1 or true to enable. Uses the native journald protocol.GARAGE_LOG_TO_SYSLOG and GARAGE_LOG_TO_JOURNALD simultaneously.RPC Secret Configuration
The RPC secret can be provided through environment variables instead of the configuration file, which is useful for secret management systems.Override Generate with:
rpc_secret from configuration file (since v0.8.2).32-byte hex-encoded secret shared by all cluster nodes.Path to file containing RPC secret (since v0.8.5/v0.9.1).Alternative to File should contain only the 32-byte hex-encoded secret (no newlines or whitespace).
GARAGE_RPC_SECRET. Overrides rpc_secret and rpc_secret_file from config.Admin Token Configuration
Admin API tokens can be provided through environment variables for better security.Override Generate with:
admin.admin_token from configuration file (since v0.8.2).Bearer token for admin API access.Path to file containing admin token (since v0.8.5/v0.9.1).Alternative to
GARAGE_ADMIN_TOKEN. Overrides admin.admin_token and admin.admin_token_file from config.Metrics Token Configuration
Override Generate with:
admin.metrics_token from configuration file (since v0.8.2).Bearer token for /metrics endpoint access.Path to file containing metrics token (since v0.8.5/v0.9.1).Alternative to
GARAGE_METRICS_TOKEN. Overrides admin.metrics_token and admin.metrics_token_file from config.Security Configuration
Override
allow_world_readable_secrets from configuration file.Bypass permission checks on secret files. Useful with POSIX ACLs or complex permissions.Set to true or 1 to enable.Single-Node Mode Environment Variables
These environment variables are used with the--single-node flag to set up a default development environment.
Access key ID to create in single-node mode with
--default-access-key flag.Secret key corresponding to
GARAGE_DEFAULT_ACCESS_KEY.Required when using --default-access-key flag.Bucket name to create in single-node mode with
--default-bucket flag.The default access key will be granted full permissions on this bucket.Usage Examples
Docker/Container Deployments
Using environment variables is particularly useful with container orchestration:Kubernetes Deployments
Systemd Service
Development Quick Start
For local testing with sensible defaults:Precedence Order
When the same setting is configured in multiple places, Garage uses this precedence order (highest to lowest):- Environment variables (e.g.,
GARAGE_RPC_SECRET) - Environment variable file paths (e.g.,
GARAGE_RPC_SECRET_FILE) - Configuration file paths (e.g.,
rpc_secret_file) - Configuration file values (e.g.,
rpc_secret) - Default values
Example Precedence
Given this configuration:"env-secret" from GARAGE_RPC_SECRET (highest precedence).
Security Best Practices
Secret File Permissions
Garage checks that secret files are not world-readable. If checks fail incorrectly (e.g., with POSIX ACLs), use:Related Resources
- Configuration File Format - Complete configuration reference
- Security Best Practices - Security hardening guide
- Docker Deployment - Container deployment examples