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.
Description
Thegarage server command starts a Garage node, which will run the distributed object storage server. This is the main daemon process that handles S3 API requests, manages data storage, and participates in the cluster.
Usage
Options
Automatically configure a single-node layout in the cluster.Garage will refuse to run if the cluster already has other nodes. This option is useful for development, testing, or single-node deployments where you don’t need a multi-node cluster.
Configure a default S3 API key using environment variables
GARAGE_DEFAULT_ACCESS_KEY and GARAGE_DEFAULT_SECRET_KEY.This option requires --single-node to be set. The access key is automatically created and configured with full permissions.Configure a default bucket using environment variable
GARAGE_DEFAULT_BUCKET.This option implies --default-access-key and requires --single-node. The bucket is automatically created and linked to the default access key.Configuration File
The server requires a configuration file (default:/etc/garage.toml) that specifies:
- Node metadata directory
- Data directory
- RPC and API bind addresses
- RPC secret for cluster communication
- Replication mode
- And other operational parameters
Examples
Start Server with Default Configuration
/etc/garage.toml.
Start Server with Custom Configuration
Single-Node Development Setup
Single-Node with Default Credentials
Complete Single-Node Setup with Bucket
- A single-node cluster layout
- An S3 access key with the specified credentials
- A bucket named “my-bucket” accessible with those credentials
Running as a Service
systemd Service
Create a systemd service file at/etc/systemd/system/garage.service:
Docker
Environment Variables for Server
RUST_LOG- Control logging verbosity (e.g.,garage=info,netapp=info)GARAGE_LOG_TO_SYSLOG- Log to syslog (set to1ortrue)GARAGE_LOG_TO_JOURNALD- Log to journald (set to1ortrue)GARAGE_DEFAULT_ACCESS_KEY- Default access key (with--default-access-key)GARAGE_DEFAULT_SECRET_KEY- Default secret key (with--default-access-key)GARAGE_DEFAULT_BUCKET- Default bucket name (with--default-bucket)
Startup Process
When Garage starts:- Loads and validates the configuration file
- Initializes or loads the node ID (public key)
- Opens the metadata database
- Initializes data storage directories
- Starts the RPC subsystem and connects to other cluster nodes
- Starts the S3 API server
- Begins background tasks (replication, repair, garbage collection)
Shutdown
Garage handles graceful shutdown on SIGTERM or SIGINT:- Stops accepting new requests
- Completes in-flight operations
- Closes database connections
- Flushes any pending writes
Monitoring
Once the server is running, you can monitor it using:Troubleshooting
Server Won’t Start
-
Check configuration file syntax:
- Verify RPC secret is correct
-
Ensure metadata and data directories exist and are writable:
-
Check if ports are available: