---
title: "Deploy Garage"
description: "S3-compatible object storage for your Railway stack, on a volume"
category: "Storage"
url: https://railway.com/deploy/garage
---

# Deploy Garage

S3-compatible object storage for your Railway stack, on a volume

**[Deploy Garage on Railway](https://railway.com/template/garage)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/garage/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### Garage https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/garage.png

- **Source:** https://github.com/aalfath/garage-railway-template
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Garage on Railway

Garage is an open-source (AGPL-3.0), S3-compatible object store built by Deuxfleurs for small self-hosted deployments. It is a single lightweight Rust binary that stores files and blobs behind the standard S3 API, so existing S3 SDKs, CLIs and apps can use it without code changes.

## About Hosting Garage

This template runs Garage v2.5.0 as one service, built from a small public GitHub repo that pins the official `dxflrs/garage` image by digest. Garage runs in single-node mode with SQLite metadata. Data, metadata and 6-hourly metadata snapshots live on a Railway volume at `/var/lib/garage`. On first boot it creates an access key and a bucket from generated variables, so there is nothing to type in and no default password. The S3 API (port 3900) is reachable privately at `garage.railway.internal` and publicly over HTTPS. The admin API (port 3903) stays private and needs a bearer token.

## Common Use Cases

* File uploads, avatars and attachments for an app already running in your Railway project
* Storage backend for self-hosted tools that expect S3 (Outline, Plane, Immich, Mastodon, Nextcloud external storage and similar)
* Backups and database dumps (restic, rclone, pgBackRest, WAL-G) kept next to the services that produce them

## Dependencies for Garage Hosting

* A Railway volume for data and metadata (created by the template)
* An S3 client or SDK that supports path-style addressing (most do)

### Deployment Dependencies

* Garage documentation: https://garagehq.deuxfleurs.fr/documentation/quick-start/
* Garage releases: https://git.deuxfleurs.fr/Deuxfleurs/garage/releases
* Template repo: https://github.com/aalfath/garage-railway-template

### Implementation Details

Add Garage to the project where your app runs, then point the app at it with reference variables (use the service name you gave Garage; `Garage` by default):

```env
S3_ENDPOINT=${{Garage.S3_ENDPOINT_PRIVATE}}
S3_REGION=${{Garage.S3_REGION}}
S3_BUCKET=${{Garage.GARAGE_DEFAULT_BUCKET}}
AWS_ACCESS_KEY_ID=${{Garage.GARAGE_DEFAULT_ACCESS_KEY}}
AWS_SECRET_ACCESS_KEY=${{Garage.GARAGE_DEFAULT_SECRET_KEY}}
```

`S3_ENDPOINT_PRIVATE` is `http://garage.railway.internal:3900` (private network, no egress cost). Use `S3_ENDPOINT_PUBLIC` (the HTTPS Railway domain) for clients outside Railway, such as browsers loading presigned URLs. The region is `garage`. Turn on path-style addressing (`forcePathStyle: true` in the AWS SDK for JavaScript, `addressing_style = path` in boto3). Buckets are private, and requests must be signed.

This is a single node with no replication, so keep your own backups of important data. Don't change `GARAGE_DEFAULT_SECRET_KEY` after the first deploy: Garage won't start if it no longer matches the stored key. Create more keys and buckets through the admin API on port 3903 with `GARAGE_ADMIN_TOKEN`.

## Why Deploy Garage on Railway?


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 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

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

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