---
title: "Deploy Garage S3 Storage"
description: "Ultra-light S3 server: fast, open-source, plug-and-play."
category: "Storage"
url: https://railway.com/deploy/garage-s3-storage
---

# Deploy Garage S3 Storage

Ultra-light S3 server: fast, open-source, plug-and-play.

**[Deploy Garage S3 Storage on Railway](https://railway.com/template/garage-s3-storage)**

- **Creator:** PROJETOS
- **Category:** Storage
- **Total deploys:** 8

## Template content

### Garage S3 https://garagehq.deuxfleurs.fr/images/garage-logo.svg

- **Source:** matheusac19/railway_garage_template
- **Start command:** `sh /start.sh`
- **Public domain:** Yes

## Documentation

# Deploy and Host Garage S3 Storage on Railway

Garage is an ultra-lightweight, open-source distributed object storage service tailored for self-hosting. It implements the Amazon S3 API, allowing seamless integration with existing tools and SDKs. Written in Rust, it is designed for extremely low resource consumption, making it ideal for cost-effective cloud deployments and resource-constrained environments.

## About Hosting Garage S3 Storage

Hosting Garage S3 Storage on Railway provides a zero-configuration, plug-and-play experience for robust object storage. This template utilizes a lightweight Alpine Linux Docker image running the official compiled Garage binary. It automatically provisions a persistent Railway Volume mounted at `/data` to ensure your metadata and files survive container restarts. 

On its first boot, a custom shell script automatically initializes the cluster topology, assigns the node capacity, creates your primary bucket, and generates secure access keys based on your environment variables. Railway automatically exposes the S3 API via an HTTP proxy, meaning your storage is immediately ready to accept API requests from any application.

## Common Use Cases

- Storing user-uploaded media (images, documents, videos) for web frameworks like Django, Express, or Laravel.
- Hosting static assets or creating cost-effective, self-hosted backups for your databases and applications.
- Replacing heavy storage backends like MinIO or AWS S3 in resource-constrained environments to save RAM and CPU.

## Dependencies for Garage S3 Storage Hosting

- **Persistent Volume:** A Railway volume mounted at `/data` to persistently store chunks and metadata.
- **Environment Variables:** `GARAGE_BUCKET`, `GARAGE_KEY_NAME`, `GARAGE_ACCESS_KEY`, and `GARAGE_SECRET_KEY` for auto-initialization.

### Deployment Dependencies

- [Garage Official Website](https://garagehq.deuxfleurs.fr/)
- [Garage Official Documentation](https://garagehq.deuxfleurs.fr/documentation/)
- [Garage GitHub Repository](https://git.deuxfleurs.fr/Deuxfleurs/garage)

### Implementation Details

Since Railway does not support wildcard subdomains (e.g., `my-bucket.domain.com`), you **must** configure your S3 clients to use **Path-Style Addressing**.

**Example: Connecting with Python (Boto3)**
```python
import boto3
from botocore.client import Config

s3 = boto3.client(
    's3',
    endpoint_url='https://',
    aws_access_key_id='',
    aws_secret_access_key='',
    region_name='garage',
    # Mandatory configuration for Railway deployments:
    config=Config(signature_version='s3v4', s3={'addressing_style': 'path'})
)







xample: Connecting with Django (django-storages)
# settings.py
AWS_S3_ENDPOINT_URL = 'https://'
AWS_ACCESS_KEY_ID = ''
AWS_SECRET_ACCESS_KEY = ''
AWS_STORAGE_BUCKET_NAME = ''
AWS_S3_REGION_NAME = 'garage'

# Mandatory configuration for Railway deployments:
AWS_S3_ADDRESSING_STYLE = 'path'


## Why Deploy
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Garage S3 Storage on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.








## Similar templates

- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.
- [Postgres Backup to Cloudflare R2 (S3-Compatible)](https://railway.com/deploy/postgres-to-r2-backup) — Automated PostgreSQL backups to S3-compatible storage with encryption

Open this page in a browser: https://railway.com/deploy/garage-s3-storage
