---
title: "Deploy RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set"
description: "S3-compatible object store, keys and public URL preset, volume kept"
category: "Storage"
url: https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p
---

# Deploy RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set

S3-compatible object store, keys and public URL preset, volume kept

**[Deploy RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set on Railway](https://railway.com/template/rustfs-or-just-updated-s3-object-store-p)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Storage

## Template content

### rustfs

- **Image:** rustfs/rustfs:1.0.1@sha256:1803faef57627e2d9c2e7d89d655d712ddded5389040054987163043fecb6a3c
- **Start command:** `/bin/sh -c 'set -e; D=/data/rustfs_data; mkdir -p $D /logs; export RUSTFS_ADDRESS=0.0.0.0:${PORT:-8080} RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 RUSTFS_CONSOLE_ENABLE=true; echo "[railway] s3 on :${PORT:-8080} uid=$(id -u) owner=$(stat -c %u:%g $D) writable=$(test -w $D && echo yes || echo no)"; exec /usr/bin/rustfs $D'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host RustFS on Railway

RustFS is a high-performance, S3-compatible object store written in Rust and licensed Apache-2.0. Point any S3 SDK,
`aws s3`, `rclone` or `mc` at it to keep files, backups and media on your own storage.

This template runs RustFS 1.0.1 as a single service from a digest-pinned official image, with an access key and
secret key generated for you and a persistent volume for the data.

## About Hosting RustFS

RustFS needs a few things handled for Railway, all done in the start command:

- **Writable volume.** Railway mounts volumes root-owned while the image runs as an unprivileged user, so the volume
  would be read-only. The service runs as root and logs the owner and writability of the data directory at boot.
- **Port follows Railway.** The S3 API listens on `$PORT` so the public domain and the `/health` healthcheck reach it.
- **Generated keys.** `RUSTFS_ACCESS_KEY` and `RUSTFS_SECRET_KEY` are random per deploy, so the well-known default
  credentials are never live on a public URL.
- **Data dir under the mount.** Objects are stored in a subdirectory of `/data`, so the volume's `lost+found` never
  lands in the store.

## Why Deploy

- S3 endpoint on a public HTTPS URL plus a private URL for services in the same project
- Keys and endpoints preset as variables: `S3_ENDPOINT`, `S3_PRIVATE_ENDPOINT`, access and secret key
- Buckets and objects survive redeploys
- The admin console runs on port 9001 and stays private; it is not exposed publicly

## Common Use Cases

- Self-hosted S3 storage for application uploads and media
- Backup target for databases and tools such as restic or rclone
- A MinIO-style store for development and staging environments
- Artifact and dataset storage for AI and data pipelines

## Dependencies for RustFS Hosting

- None. RustFS runs as one service with a volume at `/data`.

### Deployment Dependencies

- RustFS: https://github.com/rustfs/rustfs
- Documentation: https://docs.rustfs.com/
- Official image: https://hub.docker.com/r/rustfs/rustfs

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `RUSTFS_ACCESS_KEY` | S3 access key, generated per deploy. |
| `RUSTFS_SECRET_KEY` | S3 secret key, generated per deploy. Keep it server-side. |
| `S3_ENDPOINT` | Public HTTPS S3 endpoint. |
| `S3_PRIVATE_ENDPOINT` | Private endpoint for services in the same Railway project. |

Use path-style addressing and any region, for example `aws --endpoint-url $S3_ENDPOINT s3 mb s3://my-bucket`.

## Why Deploy RustFS 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 RustFS 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

- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [EMQX | (Just Updated) MQTT Broker for IoT, Dashboard Included, Data Survives Redeploys](https://railway.com/deploy/emqx-or-just-updated-mqtt-broker-for-iot) — MQTT broker for IoT. Dashboard on, data on a volume, public MQTT port

Open this page in a browser: https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p
