MinIO is a high-performance, S3-compatible object storage server designed to run on commodity hardware. It supports the full Amazon S3 API, making it a drop-in replacement for cloud object storage in private and hybrid environments. On RHEL 8, MinIO runs as a single binary with minimal dependencies, and its systemd integration makes it straightforward to manage as a production service. This tutorial covers downloading and configuring MinIO, setting up a systemd service, configuring the firewall, and accessing the storage using both the mc command-line client and S3-compatible tools.
Prerequisites
- A RHEL 8 server with at least 4 GB RAM and a dedicated disk or directory for object storage
- Root or sudo access
- Ports 9000 (API) and 9001 (console) available and not in use by other services
- Outbound internet access to download the MinIO binary and
mcclient, or a local mirror - An XFS or ext4 filesystem for the data directory (avoid using the root filesystem in production)
Step 1 — Download the MinIO Binary and Create the Service Account
Download the MinIO server binary directly from the official MinIO release endpoint and install it to /usr/local/bin. Create a dedicated system user and group for the service, then create the data directory with appropriate ownership. Running MinIO as a non-root user limits the blast radius if the service is compromised.
curl -Lo /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x /usr/local/bin/minio
useradd -r -s /sbin/nologin minio-user
mkdir -p /data/minio
chown minio-user:minio-user /data/minio
chmod 750 /data/minio
Step 2 — Create the MinIO Environment File
MinIO reads its configuration from an environment file. Create /etc/default/minio with the root credentials, data volume path, and optional settings. Use a strong password for MINIO_ROOT_PASSWORD — it must be at least 8 characters. The MINIO_VOLUMES variable defines where MinIO stores objects.
cat > /etc/default/minio << 'EOF'
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=ChangeMe!Str0ng
MINIO_VOLUMES=/data/minio
MINIO_OPTS="--address :9000 --console-address :9001"
EOF
chmod 640 /etc/default/minio
Step 3 — Create the systemd Service Unit
Create a systemd unit file for MinIO so it starts automatically at boot and restarts on failure. The unit reads credentials from the environment file created in the previous step, keeping secrets out of the unit file itself.
cat > /etc/systemd/system/minio.service << 'EOF'
[Unit]
Description=MinIO Object Storage
Documentation=https://docs.min.io
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
Step 4 — Configure the Firewall
Open port 9000 for the MinIO S3 API and port 9001 for the web-based management console. Apply the rules permanently and reload firewalld.
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --permanent --add-port=9001/tcp
firewall-cmd --reload
firewall-cmd --list-ports
# Verify MinIO is listening:
ss -tlnp | grep -E '9000|9001'
Step 5 — Install the mc Client and Manage Buckets
The mc (MinIO Client) tool provides a command-line interface for managing buckets and objects. Download it, configure an alias pointing to your local MinIO instance, then create a bucket and upload a test file. The alias stores the endpoint URL and credentials securely in the client configuration.
curl -Lo /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x /usr/local/bin/mc
mc alias set local http://127.0.0.1:9000 minioadmin 'ChangeMe!Str0ng'
mc mb local/my-bucket
echo "Hello MinIO" > /tmp/test.txt
mc cp /tmp/test.txt local/my-bucket/
mc ls local/my-bucket
Step 6 — Access MinIO with S3-Compatible Tools
MinIO implements the Amazon S3 API, so tools like s3cmd and the Python boto3 library work without modification. Install s3cmd, configure it to point to your MinIO endpoint, and list your buckets. For Python scripts, use boto3 with the endpoint_url parameter pointing to your MinIO server.
dnf install -y python3-pip
pip3 install s3cmd boto3
# Configure s3cmd (non-interactive):
s3cmd --configure --access_key=minioadmin --secret_key='ChangeMe!Str0ng'
--host=127.0.0.1:9000 --host-bucket='127.0.0.1:9000/%(bucket)s'
--no-ssl --dump-config > ~/.s3cfg
s3cmd ls
# Quick boto3 connectivity test:
python3 -c "
import boto3
s3 = boto3.client('s3', endpoint_url='http://127.0.0.1:9000',
aws_access_key_id='minioadmin', aws_secret_access_key='ChangeMe!Str0ng')
print([b['Name'] for b in s3.list_buckets()['Buckets']])
"
Conclusion
You have installed and configured MinIO as an S3-compatible object storage service on RHEL 8, secured it behind a dedicated system user, and set it up to start automatically via systemd. The web console is accessible at http://your-server-ip:9001, and the S3 API endpoint at port 9000 is compatible with any tool or library that supports Amazon S3. For production deployments, consider placing MinIO behind a reverse proxy with TLS and configuring multiple drives or nodes for erasure coding.
Next steps: How to Enable TLS for MinIO on RHEL 8, How to Deploy MinIO in Distributed Mode on RHEL 8, and How to Back Up MinIO Data with mc Mirror.