minio/minio
Getting started
This page covers building MinIO from source, running it locally, and connecting to it. It pulls together the practical bits scattered across README.md, CONTRIBUTING.md, Makefile, and the various docs/* folders.
Prerequisites
- Go 1.24+.
go.moddeclaresgo 1.24.0and the toolchain pins togo1.24.8. Earlier versions will not compile. - Make (tested with GNU make).
- A POSIX shell,
git,curl. Manymake test-*targets shell out to scripts underbuildscripts/anddocs/. - For the race-instrumented build (
make install-race) you also need a working C toolchain becauseCGO_ENABLED=1is set. - For Docker workflows: any Docker engine that understands
Dockerfilesyntax.
Build the binary
git clone https://github.com/minio/minio
cd minio
make buildmake build runs buildscripts/checkdeps.sh first to verify the Go toolchain, then buildscripts/gen-ldflags.go to compute the version stamp, then a go build -tags kqueue -trimpath invocation that drops the minio binary in the repo root. To install into $GOPATH/bin, run make install. To cross-compile for many platforms, run make crosscompile (see buildscripts/cross-compile.sh).
To install the latest released module without cloning:
go install github.com/minio/minio@latestRun a single-node server
./minio server /tmp/minioThat starts MinIO with default root credentials minioadmin:minioadmin listening on :9000 and exposing the embedded console on a random port (set --console-address :9001 to pin it). See cmd/server-main.go for every flag and matching environment variable (MINIO_ADDRESS, MINIO_CONSOLE_ADDRESS, MINIO_ROOT_USER, MINIO_ROOT_PASSWORD, ...).
Open http://127.0.0.1:9000 in a browser to use the embedded MinIO Console (provided by the github.com/minio/console dependency).
Run a distributed cluster
The classic example from cmd/server-main.go's help text:
./minio server http://node{1...4}.example.com/mnt/export{1...4}You must run the same command on every node, with the same set of endpoints. The ellipsis pattern {1...N} is expanded by cmd/endpoint-ellipses.go into one erasure set per group of drives. Server pools are separated with a space:
./minio server http://node{1...16}.example.com/mnt/export{1...32} \
http://node{17...64}.example.com/mnt/export{1...64}For more topology guidance see docs/distributed/ and docs/multi-tenancy/.
Connect with mc
mc is the official MinIO Client. It is the easiest way to drive the server.
mc alias set local http://localhost:9000 minioadmin minioadmin
mc admin info local
mc mb local/data
mc cp ~/Downloads/myfile local/data/
mc ls local/data/mc admin is also the entry point for IAM, replication, lifecycle, KMS, and healing administration. The HTTP routes mc admin calls live under /minio/admin/v3 and are defined in cmd/admin-router.go.
Run unit tests
make testmake test chains verifiers (lint + check-gen), build, then go test -v -tags kqueue,dev ./... with MINIO_API_REQUESTS_MAX=10000 and CGO_ENABLED=0. The build tags kqueue and dev enable the cross-platform poller and developer-only assertions.
For race-instrumented unit tests:
make test-race # invokes buildscripts/race.shRun integration tests
The Makefile defines many shell-driven integration suites. Each one boots one or more minio servers, drives mc against them, and asserts behaviour. Useful entry points:
| Target | What it covers |
|---|---|
make test-iam |
IAM with external IDP and etcd backends |
make test-replication |
Two- and three-site bucket replication |
make test-site-replication-* |
Cluster-to-cluster replication with LDAP / OIDC / native IDP |
make test-decom |
Pool decommission flow (with and without encryption) |
make test-versioning |
Bucket versioning end-to-end |
make test-ilm |
Lifecycle expiration, transition, replication interplay |
make verify, make verify-healing |
Multi-mode healing and replacing-disks scenarios |
The shell harness scripts live in docs/distributed/, docs/bucket/replication/, docs/site-replication/, and buildscripts/.
Build and run a Docker image
make build # produce ./minio
docker build -t myminio:minio .
docker run -p 9000:9000 -p 9001:9001 myminio:minio server /tmp/minio --console-address :9001Variants:
Dockerfile— community build (consumes the local./miniobinary).Dockerfile.releaseandDockerfile.release.old_cpu— official multi-arch images.Dockerfile.hotfix— used by themake hotfixMakefile target to ship one-off patched binaries.Dockerfile.scratch— minimal "from scratch" image for embedding.
Helm and Kubernetes
helm install --namespace minio --create-namespace minio ./helm/minioThe chart is community-maintained; see helm/minio/ for values and helm-releases/ for the historical chart bundles. For production Kubernetes, README.md recommends the MinIO Operator instead of the bare chart.
What to read next
- Patterns and conventions for the project's coding style and error idioms.
- Testing for the harness deeply, plus how to run subset tests fast.
- Configuration reference for every environment variable the server reads.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.