Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Know it before you install
Buckets hold objects (files) with keys (paths). Clients use the S3 API with an access key and secret key. With 4+ drives MinIO uses erasure coding, so data survives lost drives; a single drive is fine for labs and small backup targets.
| Item | Value |
|---|---|
| Server | minio (one binary) |
| Client | mc (MinIO Client — works with any S3 service) |
| Config | /etc/default/minio (environment file for the service) |
| Data | for example /srv/minio/data (XFS recommended) |
| Ports | 9000 (S3 API), 9001 (web console) |
| TLS | certificates in /etc/minio/certs/ (public.crt, private.key) |
Notitie
In 2025 MinIO changed its free community edition a lot: the web console lost most admin features, and pre-built community binaries and images stopped being published (source only), with the project later in maintenance mode. Check the current status before you choose it for new production work. Alternatives for S3-compatible storage: Ceph RGW, Garage, SeaweedFS, or your cloud's object storage. The mc commands and S3 ideas below work with all of them.
Install the server (RHEL and Ubuntu)
Get a minio server binary for your platform (official downloads where available, or build it from source with Go: go install github.com/minio/minio@latest), then install it with a service user:
install -m 0755 minio /usr/local/bin/minio
useradd --system --no-create-home --shell /sbin/nologin minio-user
mkdir -p /srv/minio/data /etc/minio/certs
chown -R minio-user: /srv/minio /etc/minio
minio --versionInstall the client mc from dl.min.io (client/mc/release/linux-amd64/mc) or from source, as /usr/local/bin/mc. (On some systems mc is Midnight Commander — then name it mcli.)
First configuration: service, credentials, TLS
MINIO_VOLUMES="/srv/minio/data"
MINIO_OPTS="--address :9000 --console-address :9001 --certs-dir /etc/minio/certs"
MINIO_ROOT_USER="minio-admin"
MINIO_ROOT_PASSWORD="a-very-long-random-root-password"
MINIO_SERVER_URL="https://s3.example.com:9000"[Unit]
Description=MinIO object storage
After=network-online.target
[Service]
User=minio-user
Group=minio-user
EnvironmentFile=/etc/default/minio
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
Restart=always
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.targetPut the certificate for s3.example.com in /etc/minio/certs/public.crt and the key in private.key (owner minio-user, key mode 600). Then:
chmod 600 /etc/default/minio
systemctl daemon-reload
systemctl enable --now minio
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/16" port port="9000-9001" protocol="tcp" accept'
firewall-cmd --reload
curl -s https://s3.example.com:9000/minio/health/live -o /dev/null -w '%{http_code}\n'
200| Setting | Why |
|---|---|
| Long root user/password | The root account can do everything — use it only to create admins and users. |
--certs-dir with a real certificate | S3 clients need HTTPS; access keys travel in every request. |
MINIO_SERVER_URL | Correct links (presigned URLs) behind a DNS name. |
| Data on its own disk (XFS) | Performance and no full root file system. |
Buckets, users and policies with mc
mc alias set s3 https://s3.example.com:9000 minio-admin 'a-very-long-random-root-password'
mc admin info s3
mc mb s3/backups
mc version enable s3/backups
mc ilm rule add --expire-days 90 --noncurrent-expire-days 30 s3/backups
mc retention set --default GOVERNANCE 30d s3/backupsA user for one backup tool, with rights only on its bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
"Resource": ["arn:aws:s3:::backups", "arn:aws:s3:::backups/*"]
}
]
}mc admin policy create s3 backup-writer backup-writer.json
mc admin user add s3 restic-web1 'another-long-secret'
mc admin policy attach s3 backup-writer --user restic-web1
mc ls s3/backups
mc cp backup.tar.gz s3/backups/web1/
mc mirror --overwrite /srv/exports s3/backups/exports
mc share download --expire 2h s3/backups/web1/backup.tar.gz| Bucket setting | Why |
|---|---|
| Versioning | Deleted or overwritten objects can be restored. |
Lifecycle (ilm) | Old versions and old backups are removed automatically. |
| Retention / object lock | Backups can not be deleted for N days — protection against ransomware (object lock must be enabled when the bucket is created: mc mb --with-lock). |
Real uses at work:
- Backup target for restic, Velero, database dumps and Proxmox/VM backups.
- Storage for Loki, Tempo, Harbor and other tools that want "S3".
- A local S3 for labs and CI (test your app's S3 code without the cloud).
Make it safe
Security checklist:
- HTTPS only; strong root credentials; root used only for admin tasks.
- One user (or service account) per app, with a policy for its bucket only.
- Versioning + object lock for backup buckets (ransomware protection).
- Ports 9000/9001 only from client networks; console not public.
- Monitor disk usage and health (
/minio/health/live, Prometheus metrics); keep a second copy of important backups elsewhere (3-2-1 rule). - Follow security updates — check the edition and update status regularly.
Update and remove
Replace the binary and restart (systemctl restart minio), or mc admin update s3 where supported. Back up the configuration (mc admin config export s3) and your bucket policies first.
Fix common problems
| Problem | Cause | Fix |
|---|---|---|
Access Denied for a user | The policy does not cover the bucket or action. | mc admin user info s3 USER; fix the policy resources (bucket and bucket/*). |
Clients: x509: certificate signed by unknown authority | Self-signed or internal CA. | Use a trusted certificate, or add the CA to the client trust store. |
SignatureDoesNotMatch | Wrong secret key, wrong time on the client, or a proxy changed the request. | Check keys; sync time (chrony); proxy must pass Host unchanged. |
Service does not start: permission denied on the data folder | Owner is not minio-user. | chown -R minio-user: /srv/minio. |
| Disk fills although objects were deleted | Versioning keeps old versions. | Lifecycle rule --noncurrent-expire-days. |
mc opens Midnight Commander | Name clash. | Install the MinIO client as mcli. |
Next steps
- Quick how-tos: Store files with the S3 API.
- Command page: mc.
- At work: MinIO — S3 object storage, The 3-2-1 backup rule.
- What writes to it: restic, Velero, Loki. The cloud version: AWS CLI.
1Why turn on versioning and object lock for a backup bucket?
So deleted or encrypted backups (ransomware) can be restored, and locked backups can not be deleted for a time.
2A user's policy lists only arn:aws:s3:::backups. Why can it not upload?
Object actions need arn:aws:s3:::backups/* too.