Skip to content
STACK IT FAST

RustFS

Curated OSSClassicS3-Compatible Object Storage20+ people

Audited from github.com/rustfs/rustfs

RustFS is an open-source, S3-compatible distributed object storage system written in Rust, with erasure-coded storage, healing, IAM, KMS-backed encryption, replication and a web console, licensed under Apache-2.0.

Language
Rust
Hosting
Docker
License
Apache-2.0
Running for
2 years
Team
20+ people

Why this architecture

RustFS splits a MinIO-style object store into dozens of single-purpose Rust crates behind one binary, keeps extra protocols behind cargo features, and moves inter-node traffic to gRPC, so storage, healing and IAM evolve separately.

Tech stack by layer

9 technologies · audited Sep 25, 2026
Frontend & UI
  • Web consoleManagement console served next to the S3 API; docker-compose.yml exposes it on port 9001 with RUSTFS_CONSOLE_ENABLE.
Backend & APIs
  • RustThe whole server is a Cargo workspace of single-purpose crates compiled into the rustfs and rustfs-cli binaries.
  • TokioAsync runtime used across the storage, metadata, audit and common crates (rt-multi-thread, fs, sync).
  • gRPCtonic in crates/common carries inter-node traffic; message definitions live in crates/protos.
  • S3Primary API: buckets, versioning, object lock, S3 Select, replication and lifecycle, tracked in an S3 compatibility matrix.
Data & Persistence
  • Erasure coding (Reed-Solomon)crates/ecstore stores objects across erasure sets with redundancy; crates/heal repairs sets and objects.
  • KMS (Vault / AWS KMS)Server-side encryption keys come from Vault (KV2 or Transit) or AWS KMS in production; local backends are for testing.
Infrastructure & Deploy
  • DockerRelease image downloads the musl release binary for amd64/arm64; Dockerfile.source builds from source.
  • HelmKubernetes chart under helm/rustfs, packaged by the helm-package.yml workflow.
  • Nixflake.nix and nix/rustfs-module.nix provide a reproducible build and a NixOS module.
  • OpenTelemetryThe server exports telemetry to an OTLP collector via RUSTFS_OBS_ENDPOINT; crates/obs holds the observability code.
  • GitHub ActionsDozens of workflows cover CI, S3 conformance tests, MinIO interop, fault tolerance, fuzzing and Docker builds.
Tooling, Testing & Ops
  • libFuzzerfuzz/ targets (bucket validation, archive extraction, local metadata, policy ingress) run via cargo-fuzz.

RustFS architecture diagram

Open SVG
RustFS architecture diagramS3 clients → rustfs server (S3 API); Web console → rustfs server (admin API); FTPS / WebDAV / Swift → rustfs server (protocols); rustfs server → IAM & policy (authorize); rustfs server → Erasure-coded store (put / get); Erasure-coded store → Erasure sets (shards); Scanner & heal → Erasure sets (repair); Replication → Other nodes (replicate); rustfs server → KMS (SSE keys); rustfs server → Other nodes (internode)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGEEXTERNALS3 clientsAWS SDKs · CLIWeb consoleport 9001FTPS / WebDAV / Swiftcargo featuresrustfs serverRust · TokioIAM & policycrates/iam · policyErasure-coded storecrates/ecstoreScanner & healcrates/healReplicationbucket · siteErasure setslocal drivesKMSVault · AWS KMSOther nodesgRPC (tonic)authorizeS3 APIadmin APIprotocolsput / getshardsrepairreplicateSSE keysinternode
How the main components of RustFS connect, drawn from the audited repository.
Diagram as text
  • S3 clients (AWS SDKs · CLI) → rustfs server (Rust · Tokio): S3 API
  • Web console (port 9001) → rustfs server (Rust · Tokio): admin API
  • FTPS / WebDAV / Swift (cargo features) → rustfs server (Rust · Tokio): protocols
  • rustfs server (Rust · Tokio) → IAM & policy (crates/iam · policy): authorize
  • rustfs server (Rust · Tokio) → Erasure-coded store (crates/ecstore): put / get
  • Erasure-coded store (crates/ecstore) → Erasure sets (local drives): shards
  • Scanner & heal (crates/heal) → Erasure sets (local drives): repair
  • Replication (bucket · site) → Other nodes (gRPC (tonic)): replicate
  • rustfs server (Rust · Tokio) → KMS (Vault · AWS KMS): SSE keys
  • rustfs server (Rust · Tokio) → Other nodes (gRPC (tonic)): internode

Key architectural decisions

6 decisions
  1. 01

    Dozens of single-purpose crates behind one rustfs binary

    The root Cargo.toml workspace lists crates such as ecstore, heal, iam, kms, lock, notify, policy, replication and scanner, each with one job, while rustfs/Cargo.toml builds the rustfs server and rustfs-cli binaries on top of them.

  2. 02

    Erasure-coded storage with a separate healing and scanner layer

    crates/ecstore is described as the erasure coding storage backend "with redundancy", and crates/heal handles erasure set and object healing, with crates/scanner and bitrot protection finding what needs repair instead of relying on RAID.

  3. 03

    Protocols beyond S3 are cargo features

    rustfs/Cargo.toml enables ftps, webdav and gcs by default; the README marks the OpenStack Swift API and SFTP as opt-in features (--features swift, --features sftp), so the default build carries only what most deployments use.

  4. 04

    Nodes talk gRPC over tonic, with shared protobuf definitions

    crates/common depends on tonic with gzip and deflate compression, crates/protos holds the message definitions, and scripts such as run_internode_grpc_ab_bench.sh benchmark the inter-node transport.

  5. 05

    MinIO interoperability is tested, but on-disk compatibility is gated

    A minio-interop.yml workflow checks coexistence with MinIO, while reading MinIO-written disks is behind the rio-v2 feature and outside the default build, per the README; objects MinIO encrypted are not readable.

  6. 06

    Verification is part of the repository, not an afterthought

    fuzz/ ships libFuzzer targets, .github/workflows runs S3 conformance (e2e-s3tests.yml), fault-tolerance matrices, heal, replication and upgrade tests, and deny.toml gates dependencies with cargo-deny.

How RustFS is built

How RustFS is structured

RustFS is one Cargo workspace. The root Cargo.toml lists the rustfs package plus a long set of crates under crates/, each with a narrow job: ecstore (erasure coding storage), heal (erasure set and object healing), iam, policy, kms, lock (distributed locking), notify, audit, replication, scanner, lifecycle, filemeta, s3select-api and s3select-query, madmin (admin API), obs (observability) and more. rustfs/Cargo.toml turns them into two binaries, rustfs (the server) and rustfs-cli.

The repository also carries its own architecture material: ARCHITECTURE.md, docs/architecture, docs/operations and docs/postmortems. Agent instruction files sit at the root (AGENTS.md, CLAUDE.md) and inside crates/AGENTS.md and .github/copilot-instructions.md, and scripts/check_layer_dependencies.sh enforces the dependency direction between crates.

Frontend

There is no separate frontend project in the tree. The management console is served by the server itself: docker-compose.yml sets RUSTFS_CONSOLE_ENABLE=true and maps port 9001 for the console next to port 9000 for the S3 API, and rustfs/static holds the assets the binary serves.

Backend & APIs

The server runs on Tokio, which appears across crates/common, crates/ecstore, crates/filemeta and crates/audit. The main surface is the S3 API. The README's feature table marks upload and download, versioning, object lock (WORM), server-side encryption, lifecycle management and tiering, S3 Select, bucket and site replication, quotas, event notifications, audit logging, OIDC/SSO and multi-tenancy as available, with S3 Tables (an Iceberg REST catalog) in preview.

Other protocols are cargo features in rustfs/Cargo.toml: ftps, webdav and gcs are on by default, while the OpenStack Swift API (with Keystone authentication via crates/keystone) and SFTP are opt-in (--features swift, --features sftp). Between nodes, crates/common uses tonic (gRPC) with gzip and deflate compression, crates/protos holds the message definitions, and scripts/install-protoc.sh and scripts/install-flatc.sh install the code generators.

Data & persistence

Objects go through crates/ecstore, whose manifest describes it as the erasure coding storage backend "providing efficient data storage and retrieval with redundancy". Damage is found by the scanner (crates/scanner) and bitrot protection, and repaired by crates/heal. crates/filemeta manages per-object metadata, and crates/object-data-cache keeps a long-term cache of object bodies.

Encryption keys come from crates/kms. Per the README, Vault (KV2 or Transit) and AWS KMS are the production backends, while the Local and Static backends are for development and testing. Reading disks written by MinIO is gated behind the rio-v2 feature, and objects MinIO encrypted are not readable.

Build, test & deploy

The production Dockerfile does not compile: it downloads the musl release binary for amd64 or arm64 from GitHub releases. Dockerfile.source builds from source, Dockerfile.glibc targets glibc, and docker-compose.yml wires the server to an OpenTelemetry collector through RUSTFS_OBS_ENDPOINT. flake.nix and nix/rustfs-module.nix provide a Nix build and NixOS module, and helm/rustfs is the Helm chart.

Testing is extensive. .github/workflows includes ci.yml, e2e-s3tests.yml (S3 conformance), minio-interop.yml, e2e-distributed.yml, fault-tolerance, heal, replication, KMS, tiering and upgrade suites, oidc-keycloak.yml for SSO, and fuzz.yml. fuzz/ defines libFuzzer targets for bucket validation, archive extraction, local metadata and policy ingress, and deny.toml configures cargo-deny.

Self-hosting notes

The quickest start is docker-compose.yml: four volumes (RUSTFS_VOLUMES=/data/rustfs{0..3}), the S3 API on 9000 and the console on 9001. The compose file warns that the default rustfsadmin credentials are public and must be overridden via RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY before exposing the listener, and it runs as user 10001. For clusters, use the Helm chart; for encryption at rest, configure Vault or AWS KMS rather than the local backends.

What to copy (and what not to)

Copy the crate layout: giving healing, locking, IAM, KMS and replication their own crates, with a script that checks layer dependencies, keeps a large storage server reviewable. The feature-flag approach to protocols is also worth copying, since it keeps the default binary smaller than a build that includes every protocol.

Be careful with the operational surface. The workspace is large and the test matrix is heavy, so contributing requires the same CI discipline. Features such as S3 Tables and MinIO on-disk compatibility are marked preview, so check the compatibility matrices in docs/architecture before relying on them.

Sources & repo audit

Audited
Sep 25, 2026
Commit
edcc81a
License
Apache-2.0

Independent analysis of repository at github.com/rustfs/rustfs. Spotted an inaccuracy? Use the claim form to request a correction.

Maintainer? Add the architecture badge to your README
architecture: stackitfast
[![Architecture on STACK IT FAST](https://stackitfast.com/badge/rustfs.svg)](https://stackitfast.com/project/rustfs)
Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with RustFS's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 61 lines · 7.4 KB
# MISSION: Scaffold "RustFS" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **RustFS**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: RustFS
- **What It Does**: RustFS is an open-source, S3-compatible distributed object storage system written in Rust, with erasure-coded storage, healing, IAM, KMS-backed encryption, replication and a web console, licensed under Apache-2.0.
- **Domain & Category**: S3-Compatible Object Storage
- **Production Scale**: 20+ people
- **Development Mode**: CLASSIC
- **Architectural Rationale**: RustFS splits a MinIO-style object store into dozens of single-purpose Rust crates behind one binary, keeps extra protocols behind cargo features, and moves inter-node traffic to gRPC, so storage, healing and IAM evolve separately.
- **Live Website Reference**: https://rustfs.com
- **Source Repository**: https://github.com/rustfs/rustfs
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: Rust, Tokio, gRPC, S3, Docker, Kubernetes, Helm, OpenTelemetry, Nix
- **Primary Language(s)**: Rust, Shell, Python
- **License of the reference repo**: Apache-2.0
- **Frontend**: Web console — Management console served next to the S3 API; docker-compose.yml exposes it on port 9001 with RUSTFS_CONSOLE_ENABLE.
- **Backend & APIs**: Rust — The whole server is a Cargo workspace of single-purpose crates compiled into the rustfs and rustfs-cli binaries.; Tokio — Async runtime used across the storage, metadata, audit and common crates (rt-multi-thread, fs, sync).; gRPC — tonic in crates/common carries inter-node traffic; message definitions live in crates/protos.; S3 — Primary API: buckets, versioning, object lock, S3 Select, replication and lifecycle, tracked in an S3 compatibility matrix.
- **Data & persistence**: Erasure coding (Reed-Solomon) — crates/ecstore stores objects across erasure sets with redundancy; crates/heal repairs sets and objects.; KMS (Vault / AWS KMS) — Server-side encryption keys come from Vault (KV2 or Transit) or AWS KMS in production; local backends are for testing.
- **Infrastructure & deploy**: Docker — Release image downloads the musl release binary for amd64/arm64; Dockerfile.source builds from source.; Helm — Kubernetes chart under helm/rustfs, packaged by the helm-package.yml workflow.; Nix — flake.nix and nix/rustfs-module.nix provide a reproducible build and a NixOS module.; OpenTelemetry — The server exports telemetry to an OTLP collector via RUSTFS_OBS_ENDPOINT; crates/obs holds the observability code.; GitHub Actions — Dozens of workflows cover CI, S3 conformance tests, MinIO interop, fault tolerance, fuzzing and Docker builds.
- **Tooling, testing & ops**: libFuzzer — fuzz/ targets (bucket validation, archive extraction, local metadata, policy ingress) run via cargo-fuzz.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/rustfs/rustfs @ edcc81a)
1. **Dozens of single-purpose crates behind one rustfs binary**: The root Cargo.toml workspace lists crates such as ecstore, heal, iam, kms, lock, notify, policy, replication and scanner, each with one job, while rustfs/Cargo.toml builds the rustfs server and rustfs-cli binaries on top of them.
2. **Erasure-coded storage with a separate healing and scanner layer**: crates/ecstore is described as the erasure coding storage backend "with redundancy", and crates/heal handles erasure set and object healing, with crates/scanner and bitrot protection finding what needs repair instead of relying on RAID.
3. **Protocols beyond S3 are cargo features**: rustfs/Cargo.toml enables ftps, webdav and gcs by default; the README marks the OpenStack Swift API and SFTP as opt-in features (--features swift, --features sftp), so the default build carries only what most deployments use.
4. **Nodes talk gRPC over tonic, with shared protobuf definitions**: crates/common depends on tonic with gzip and deflate compression, crates/protos holds the message definitions, and scripts such as run_internode_grpc_ab_bench.sh benchmark the inter-node transport.
5. **MinIO interoperability is tested, but on-disk compatibility is gated**: A minio-interop.yml workflow checks coexistence with MinIO, while reading MinIO-written disks is behind the rio-v2 feature and outside the default build, per the README; objects MinIO encrypted are not readable.
6. **Verification is part of the repository, not an afterthought**: fuzz/ ships libFuzzer targets, .github/workflows runs S3 conformance (e2e-s3tests.yml), fault-tolerance matrices, heal, replication and upgrade tests, and deny.toml gates dependencies with cargo-deny.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Isolate interactive UI state to leaf components. Keep core pages lightweight and performant.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (Erasure coding (Reed-Solomon), KMS (Vault / AWS KMS)): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a s3-compatible object storage project?

Copied 2 times · 1 of 1 reported launches succeeded (100%)

Frequently asked about RustFS

What is RustFS built with?

RustFS is written in Rust as a Cargo workspace of single-purpose crates (erasure-coded storage, healing, IAM, KMS, replication, locking) on the Tokio runtime, with nodes talking gRPC through tonic. It ships as a single rustfs binary with a web console, Docker images, a Helm chart and a Nix flake.

Is RustFS compatible with MinIO?

It speaks the S3 API and a minio-interop.yml workflow tests coexistence with MinIO. Reading MinIO-written disks directly is a preview behind the rio-v2 feature, outside the default build, and objects that MinIO encrypted cannot be read by RustFS.

Can I self-host RustFS?

Yes. The repository ships a release Dockerfile, a docker-compose.yml that exposes the S3 API on port 9000 and the console on 9001, a Helm chart under helm/rustfs and a NixOS module in nix/rustfs-module.nix.

What license does RustFS use?

RustFS is licensed under Apache-2.0, a permissive license, which the README contrasts with AGPL-licensed object stores. Garage and MinIO, by comparison, are AGPL-3.0.

How does RustFS protect data against disk failures?

Objects are written across erasure sets by the ecstore crate, a scanner and bitrot protection detect damage, and the heal crate repairs erasure sets and objects; bucket and site replication add copies across clusters.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md