MinIO is a high-performance, S3-compatible object storage server designed for cloud-native workloads and on-premises deployments. It provides the same API as Amazon S3, allowing applications built for AWS to connect to a self-hosted storage backend without code changes. On RHEL 9, MinIO runs as a single binary managed by systemd, making it straightforward to install and operate. This tutorial covers downloading and installing the MinIO server, configuring it as a service, opening firewall ports, and using the mc client to manage buckets and objects.
Prerequisites
- RHEL 9 server with at least 2 GB RAM and a dedicated data directory
- Root or sudo access
- Internet access to download the MinIO binaries, or pre-downloaded binaries
- Firewall access to be configured for ports 9000 (API) and 9001 (Console)
- A dedicated disk or directory for object storage (separate from the OS is recommended)
Step 1 — Download and Install the MinIO Server Binary
Download the latest MinIO server binary directly from the official release endpoint and install it to /usr/local/bin:
wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio
chmod +x /usr/local/bin/minio
# Verify the installation
minio --version
Create a dedicated system user and data directory. Running MinIO as a non-root user is a security best practice:
useradd -r -s /sbin/nologin minio-user
mkdir -p /data/minio
chown -R minio-user:minio-user /data/minio
Step 2 — Create the MinIO Environment File
MinIO reads its configuration from an environment file. Create /etc/default/minio with the required variables. Choose a strong password for MINIO_ROOT_PASSWORD (minimum 8 characters):
cat > /etc/default/minio << 'EOF'
# MinIO root credentials
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=ChangeMe_StrongPassword123!
# Volume/data directory
MINIO_VOLUMES=/data/minio
# Optional: bind address
MINIO_OPTS="--console-address :9001"
EOF
# Secure the file
chmod 600 /etc/default/minio
Step 3 — Create and Enable the Systemd Service
Create a systemd unit file that launches MinIO using the environment variables defined above:
cat > /etc/systemd/system/minio.service << 'EOF'
[Unit]
Description=MinIO Object Storage
Documentation=https://docs.min.io
Wants=network-online.target
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
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now minio
systemctl status minio
Check the journal logs if the service fails to start:
journalctl -u minio -n 50 --no-pager
Step 4 — Open Firewall Ports
Allow external access to the MinIO S3 API on port 9000 and the web console on port 9001:
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --permanent --add-port=9001/tcp
firewall-cmd --reload
# Verify the rules
firewall-cmd --list-ports
Access the MinIO web console at http://<server-ip>:9001 and log in with the credentials set in /etc/default/minio.
Step 5 — Install the mc CLI Client and Configure an Alias
The MinIO Client (mc) provides a command-line interface for managing buckets, objects, and policies. Install it and configure an alias pointing to your MinIO server:
wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc
chmod +x /usr/local/bin/mc
# Configure an alias for your MinIO server
mc alias set myminio http://localhost:9000 minioadmin ChangeMe_StrongPassword123!
# Test the connection
mc admin info myminio
Step 6 — Create Buckets and Manage Objects
Use mc to create buckets, upload objects, and retrieve them. Buckets are the top-level containers for objects in S3-compatible storage:
# Create a new bucket
mc mb myminio/mybucket
# List all buckets
mc ls myminio
# Upload a file
echo "Hello, MinIO!" > /tmp/testfile.txt
mc cp /tmp/testfile.txt myminio/mybucket/
# List objects in the bucket
mc ls myminio/mybucket
# Download the file
mc cp myminio/mybucket/testfile.txt /tmp/downloaded.txt
cat /tmp/downloaded.txt
# Remove a file from the bucket
mc rm myminio/mybucket/testfile.txt
Conclusion
You have installed MinIO on RHEL 9 as a systemd-managed service providing S3-compatible object storage, secured the credentials in an environment file, and used the mc CLI to create buckets and manage objects. MinIO’s S3 API compatibility means any application using AWS SDK or s3cmd can point to your server without modification, making it an excellent on-premises alternative for backup storage, application artifacts, and media files. For production use, consider enabling TLS with a certificate in /etc/default/minio and configuring distributed mode across multiple nodes for redundancy.
Next steps: How to Set Up iSCSI Storage on RHEL 9, How to Configure GlusterFS Distributed Storage on RHEL 9, and How to Set Up a Ceph Storage Cluster on RHEL 9.