---
title: "Deploy MinIO Object Storage S3"
description: "Self-hosted S3-compatible object storage with a persistent volume"
category: "Storage"
url: https://railway.com/deploy/minio-object-storage-s3
---

# Deploy MinIO Object Storage S3

Self-hosted S3-compatible object storage with a persistent volume

**[Deploy MinIO Object Storage S3 on Railway](https://railway.com/template/minio-object-storage-s3)**

- **Creator:** SuperSlowSloth
- **Category:** Storage
- **Total deploys:** 1

## Template content

### minio

- **Image:** minio/minio:RELEASE.2025-09-07T16-13-09Z
- **Start command:** `/bin/sh -c 'minio server /data --address ":${PORT:-9000}" --console-address ":9001"'`
- **Health check:** /minio/health/live
- **Public domain:** Yes

## Documentation

# Deploy and Host MinIO on Railway

MinIO is a high-performance, open-source object storage server that speaks the Amazon S3 API. Store files, backups, ML datasets, logs, and static assets behind the same API and SDKs you already use for AWS S3 — fully self-hosted, with no per-request or egress bills.

## About Hosting MinIO

This template runs the official `minio/minio` image wired for Railway. MinIO serves its S3 API on the port given by `PORT` (enter `9000` when deploying — it is the only field you have to fill in) and a web console on 9001, and Railway exposes the S3 API over HTTPS on a generated domain. All buckets and objects live on an attached volume at `/data`, so your data survives redeploys. Both root credentials are generated per deploy (`MINIO_ROOT_USER`, `MINIO_ROOT_PASSWORD`), so the store is never left with the well-known `minioadmin` default on a public URL — read them from the service's Variables tab after deploy. `MINIO_SERVER_URL` is pre-wired to your Railway domain so presigned URLs point at the public endpoint. The start command (`minio server /data --address ":$PORT" --console-address ":9001"`) is preconfigured. MinIO holds metadata in RAM and objects on disk, so size the service and volume to your dataset.

## Why Deploy MinIO 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 MinIO 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.

- **S3 storage in one click** — give any app object storage without an AWS account or egress fees.
- **Your data stays yours** — files never leave your infrastructure; no per-request SaaS billing.
- **Secure by default** — both root credentials are generated per deploy; volume, healthcheck, and HTTPS domain are preconfigured.
- **Drop-in S3 replacement** — point boto3, aws-sdk-js, the `aws s3` CLI, or `mc` at your own domain.

## Common Use Cases

- **Application file storage** — user uploads, avatars, documents, and generated media for web and mobile apps.
- **Backups and artifacts** — database dumps, CI build artifacts, and log archives with S3 tooling.
- **AI/ML data lake** — training datasets, model checkpoints, and embeddings storage for pipelines that expect an S3 endpoint.

## Dependencies for MinIO Hosting

- A volume mounted at `/data` (included in this template) for persistent buckets and objects.
- A service and volume sized to your dataset — objects on disk, metadata in RAM.

### Deployment Dependencies

- [MinIO](https://github.com/minio/minio) — upstream object storage server by MinIO, Inc. (AGPL-3.0)
- [MinIO documentation](https://min.io/docs/minio/linux/index.html) — API reference and client SDKs
- [minio/minio Docker image](https://hub.docker.com/r/minio/minio) — the official image this template deploys

### Implementation Details

Create a bucket, upload an object, and read it back with any S3 client:

```python
# pip install minio
from minio import Minio
import io

c = Minio("", access_key="$MINIO_ROOT_USER", secret_key="$MINIO_ROOT_PASSWORD", secure=True)
c.make_bucket("test-bucket")

data = b"hello railway minio"
c.put_object("test-bucket", "hello.txt", io.BytesIO(data), length=len(data))
print(c.get_object("test-bucket", "hello.txt").read().decode())
```

Credentials are in the service's Variables tab (`MINIO_ROOT_USER` / `MINIO_ROOT_PASSWORD`). The web console listens on port 9001 — add a second Railway domain targeting 9001 to reach it (set `MINIO_BROWSER=off` to disable it entirely). Any S3 SDK or the `aws s3` / `mc` CLIs work — just set the endpoint to your Railway domain.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [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/minio-object-storage-s3
