No description
  • Go 97.2%
  • Shell 2.4%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stefan Bethke e11595fbab
All checks were successful
CI / test (push) Successful in 2m31s
CI / version (push) Successful in 3s
Docs / build-and-deploy (push) Successful in 17s
CI / cross-build (amd64, freebsd) (push) Successful in 1m18s
CI / docker (push) Has been skipped
CI / cross-build (amd64, linux) (push) Successful in 1m18s
CI / cross-build (arm64, darwin) (push) Successful in 1m20s
CI / cross-build (arm64, freebsd) (push) Successful in 1m19s
CI / cross-build (arm64, linux) (push) Successful in 1m18s
Use upload-package action for docker (#1)
Also optimize the build.

Reviewed-on: #1
2026-10-18 11:39:04 +00:00
.forgejo/workflows Use upload-package action for docker (#1) 2026-10-18 11:39:04 +00:00
cmd/minis3 Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
docker Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
docs Support GetBucketLocation and GetBucketVersioning 2026-10-09 12:39:58 +00:00
examples Add Debian packages for Linux amd64 and arm64 2026-10-09 11:34:23 +00:00
internal Support GetBucketLocation and GetBucketVersioning 2026-10-09 12:39:58 +00:00
packaging/debian Streamline workflows, create releases, rename deb to mini-s3 2026-10-09 11:55:56 +00:00
test/integration Support GetBucketLocation and GetBucketVersioning 2026-10-09 12:39:58 +00:00
.gitignore Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
go.mod Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
go.sum Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
mkdocs.yml docs: fix repo link and nested code fences in mkdocs 2026-08-19 17:30:34 +02:00
PROMPT.md Implement Mini S3: a filesystem-backed S3-compatible server 2026-08-19 16:59:39 +02:00
README.md Add Debian packages for Linux amd64 and arm64 2026-10-09 11:34:23 +00:00
SPEC.md Support plain HTTP for deployment behind a reverse proxy 2026-08-19 17:45:54 +02:00

Mini S3

A simple, filesystem-backed server implementing a subset of the S3 REST API, in pure Go. See SPEC.md for the original specification and docs/ for full documentation.

Features

  • SigV4-authenticated S3 REST API subset (see docs/api.md for exactly what's implemented), including multipart uploads and the S3-Express-style CreateSession/RenameObject operations
  • Objects stored directly on the filesystem, one directory per bucket
  • TOML configuration with general.include file merging and full environment-variable overrides (see docs/configuration.md)
  • SIGHUP config/cert/log reload, SIGTERM graceful shutdown
  • Prometheus metrics (see docs/metrics.md)
  • Pure Go, no CGO; builds for Linux amd64/arm64, macOS arm64, and FreeBSD amd64/arm64

Quick start

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem \
  -days 365 -nodes -subj "/CN=localhost"

cp examples/minis3.toml my.toml
# edit my.toml: point network.tls at cert.pem/key.pem, set a real
# access_key_id/secret_access_key, and a bucket path to store objects in

go run ./cmd/minis3 --config my.toml

Then, from another terminal:

aws --endpoint-url https://localhost:443 --no-verify-ssl s3api put-object \
  --bucket example --key hello.txt --body my.toml

See docker/ for a containerized example.

Building

go build ./cmd/minis3

Testing

go test ./...                      # unit tests
go test ./test/integration/...     # integration tests, driven by the real aws-sdk-go-v2 client
go vet ./...

Repository layout

cmd/minis3/          entrypoint: flags, signals, wiring
internal/config/      TOML config loading, include-merging, env overrides
internal/logging/      slog setup, reopenable log file (SIGHUP rotation)
internal/auth/         SigV4 verification, aws-chunked decoding, sessions
internal/storage/       filesystem-backed object storage (os.Root-confined)
internal/s3api/         HTTP routing, XML request/response handling
internal/metrics/       Prometheus metrics
internal/server/        TLS listeners, hot reload, graceful shutdown
test/integration/       end-to-end tests against a real S3 client
docs/                    MkDocs documentation source
docker/                  Dockerfile and docker-compose example
packaging/debian/        Debian package build script, systemd unit, maintainer scripts
.forgejo/workflows/      CI, release, and docs-publishing workflows
examples/                sample configuration and systemd unit