Deploy MinIO Object Storage S3
Self-hosted S3-compatible object storage with a persistent volume
Just deployed
/data
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 s3CLI, ormcat 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 — upstream object storage server by MinIO, Inc. (AGPL-3.0)
- MinIO documentation — API reference and client SDKs
- minio/minio Docker image — the official image this template deploys
Implementation Details
Create a bucket, upload an object, and read it back with any S3 client:
# 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.
Template Content