dirio

module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT

README

DirIO - Filesystem-first S3

Objects on the outside. Directories on the inside. A filesystem-native S3-compatible object store.

DirIO Logo

dirio-s3.github.io/dirio — downloads and an overview for non-technical users

DirIO is an S3-compatible object storage server where objects are just files on disk. No chunking, no encoding, no abstraction layers—just directories and files.

Built as a drop-in replacement for MinIO's discontinued single-node filesystem (FS) mode — the old mode where objects were stored as plain files. This is not related to and does not read data from MinIO's current erasure-coded/distributed backend.

Philosophy

  • Objects are files. Buckets are directories. That's it.
  • No database. Metadata lives in simple JSON files.
  • One binary. One data directory. Zero ceremony.
  • Import your existing MinIO data and keep going.

What DirIO Does

  • Serves S3 API requests over HTTP
  • Stores objects as regular files in buckets/
  • Maintains metadata in .metadata/ (JSON files)
  • Imports from MinIO's .minio.sys/ on first boot
  • Runs in a container on your NAS

What DirIO Doesn't Do

  • Distributed storage / clustering
  • Built-in replication
  • Advanced S3 features (yet)
  • Replace production-grade S3 implementations
  • Read MinIO's erasure-coded/distributed backend data (only legacy single-node FS-mode data)

Quick Start

# Build
go build -o dirio-server ./cmd/server

# Run
./dirio-server --data-dir /path/to/data --port 9000

# Test
aws --endpoint-url http://localhost:9000 s3 mb s3://test
aws --endpoint-url http://localhost:9000 s3 cp file.txt s3://test/

See QUICKSTART.md for detailed setup.

Use Cases

  • Homelab NAS storage: Host S3 buckets on your NAS without MinIO overhead
  • Static site assets: Serve website media files via S3 API
  • Backup targets: Use S3-compatible tools with local filesystem storage
  • Development: Test S3 integrations locally with real files

Supported Operations

Category Operations
Objects GET, PUT, HEAD, DELETE, LIST, COPY, Multipart Upload
Buckets CREATE, DELETE, HEAD, LIST, GetLocation, Policy (GET/PUT/DELETE)
Metadata Custom metadata, Object tagging
Advanced Presigned URLs, Range requests

IAM & Authorization

DirIO supports S3 bucket policies and user/group management via the MinIO Admin API:

  • ✅ S3 bucket policies (AWS CLI, boto3, MinIO mc)
  • ✅ User & policy management via mc admin
  • ❌ AWS IAM API (aws iam) — not supported
  • ❌ Terraform AWS provider — requires AWS IAM API

See docs/IAM-ARCHITECTURE.md for details.

MinIO Migration

Only applies to MinIO's legacy single-node filesystem (FS) mode. If your MinIO deployment uses the current erasure-coded/distributed backend (the default since FS mode was removed), its on-disk data is split into shards across drives and DirIO cannot read it. This migration path is for data that predates that change, or an install pinned to a pre-FS-removal release.

Point DirIO at your existing MinIO FS-mode data directory. It will:

  1. Find .minio.sys/
  2. Import users, bucket policies, and object metadata
  3. Write to .metadata/ (your MinIO files stay untouched)
  4. Track import state to detect changes

You can switch back to MinIO anytime. The buckets/ directory is shared.

Contributing & Development

See CONTRIBUTING.md for contribution guidelines and DEVELOPMENT.md for project structure, build setup, and architecture notes.

License

MIT - See LICENSE

Directories

Path Synopsis
api module
cmd
client command
client/internal/dioclient/profile
Package profile manages dio client profiles stored in ~/.dirio/client.yaml.
Package profile manages dio client profiles stored in ~/.dirio/client.yaml.
client/internal/dioclient/render
Package render provides output formatting for dio CLI commands.
Package render provides output formatting for dio CLI commands.
client/internal/dioclient/serverdetect
Package serverdetect probes a remote endpoint to determine whether it is a DirIO server, a MinIO server, or a generic S3-compatible service.
Package serverdetect probes a remote endpoint to determine whether it is a DirIO server, a MinIO server, or a generic S3-compatible service.
server command
common module
console module
internal
compat/minio/http
Package http implements the MinIO Admin API v3 compatibility layer (prefix /minio/admin/v3/).
Package http implements the MinIO Admin API v3 compatibility layer (prefix /minio/admin/v3/).
compat/minio/import
Package minioimport provides read-only data import from MinIO single-node filesystem mode installations.
Package minioimport provides read-only data import from MinIO single-node filesystem mode installations.
config
Package config implements unified configuration handling for dirio.
Package config implements unified configuration handling for dirio.
console
Package console provides the adapter that implements consoleapi.API by calling the DirIO service layer directly (no HTTP round-trips).
Package console provides the adapter that implements consoleapi.API by calling the DirIO service layer directly (no HTTP round-trips).
crypto
Package crypto provides credential encryption/decryption for DirIO.
Package crypto provides credential encryption/decryption for DirIO.
hostname
Package hostname provides best-effort, stable naming helpers intended specifically for configuring mDNS advertisements.
Package hostname provides best-effort, stable naming helpers intended specifically for configuring mDNS advertisements.
http/api/iam
Package iam is reserved for native DirIO IAM HTTP handlers.
Package iam is reserved for native DirIO IAM HTTP handlers.
http/auth
AWS Signature Version 4 implementation for HTTP request authentication.
AWS Signature Version 4 implementation for HTTP request authentication.
http/copysource
Package copysource parses the S3 X-Amz-Copy-Source header value shared by CopyObject, UploadPartCopy, and the policy engine's authorization check (which needs the source bucket/key before the handler runs).
Package copysource parses the S3 X-Amz-Copy-Source header value shared by CopyObject, UploadPartCopy, and the policy engine's authorization check (which needs the source bucket/key before the handler runs).
http/urlbuilder
Package urlbuilder wraps teapot-router's urlbuilder.Builder to add virtual-hosted-style URL generation.
Package urlbuilder wraps teapot-router's urlbuilder.Builder to add virtual-hosted-style URL generation.
persistence/path
Package path provides filesystem abstraction and security for DirIO.
Package path provides filesystem abstraction and security for DirIO.
policy
Package policy provides the policy evaluation engine for S3 authorization.
Package policy provides the policy evaluation engine for S3 authorization.
service/group/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
service/observation
Package observation provides policy simulation and effective-permission evaluation.
Package observation provides policy simulation and effective-permission evaluation.
service/policy/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
service/serviceaccount/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
service/user/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
startup
Package startup encapsulates the pre-server initialisation sequence that is shared between the serve and init commands.
Package startup encapsulates the pre-server initialisation sequence that is shared between the serve and init commands.
testutil
Package testutil provides a shared test server and helpers used across all dirio test suites (integration, admin, console).
Package testutil provides a shared test server and helpers used across all dirio test suites (integration, admin, console).
sdk module
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL