Build Your Own S3-Compatible Object Storage with MinIO on Ubuntu 24.04

MinIO logo

Introduction

While storing data in public cloud object storage is relatively inexpensive, data transfer, cross-region traffic, and internet egress charges can become a massive burden as workloads grow. With the rise of AI datasets, LLM training, RAG pipelines, and Kubernetes clusters in 2026, many organizations are moving their large datasets back to private infrastructure.

The solution? Self-hosted Object Storage.

By running MinIO on a dedicated server, you get full Amazon S3-compatible API support for the vast majority of applications—without the unpredictable egress fees.

In this guide, we will walk you through deploying a secure MinIO server on Ubuntu 24.04 that provides a solid foundation for production deployments.

Prerequisites

Before starting, ensure you have:

  • A Linux storage server running Ubuntu 24.04
  • sudo privileges
  • A registered domain name (optional, but recommended for production HTTPS).

Update the system first:

1
Bash sudo apt update && sudo apt upgrade -y

Step 1: Download and Install MinIO

MinIO is shipped as a single binary, making installation simple. Download the latest 64-bit Linux executable:

2
Bash wget https://dl.min.io/server/minio/release/linux-amd64/minio

Make the downloaded file executable and move it to your system’s binaries directory:

3
Bash chmod +x minio sudo mv minio /usr/local/bin/

Step 2: Create a Secure User and Directory

Running services as the root user is a major security risk. We will create a dedicated system user with no login privileges, along with a directory for your data..

4
Bash sudo groupadd -r minio-user sudo useradd -r -s /usr/sbin/nologin -g minio-user minio-user

Create the data directory (e.g., /mnt/data) and set the correct permissions:.

5
Bash sudo mkdir -p /mnt/data sudo chown -R minio-user:minio-user /mnt/data sudo chmod 750 /mnt/data

Step 3: Configure the UFW Firewall

MinIO uses port 9000 for the S3-compatible API and port 9001 for the Web Console. If you are using UFW (Uncomplicated Firewall), allow these ports before starting the service:

6
Bash sudo ufw allow 9000/tcp sudo ufw allow 9001/tcp sudo ufw reload

Step 4: Create the Systemd Service

To manage MinIO like a standard background service, create a systemd configuration file:

7
Bash sudo nano /etc/systemd/system/minio.service

Paste the following configuration. Security Warning: Replace the MINIO_ROOT_PASSWORD with a long, random password generated by a password manager. Do not use default or weak passwords!

8
Ini, TOML [Unit] Description=MinIO High Performance Object Storage Documentation=https://docs.min.io Wants=network-online.target After=network-online.target [Service] User=minio-user Group=minio-user WorkingDirectory=/mnt/data # Environment Variables for easy configuration Environment="MINIO_VOLUMES=/mnt/data" Environment="MINIO_OPTS=--console-address :9001" Environment="MINIO_ROOT_USER=admin" Environment="MINIO_ROOT_PASSWORD=ReplaceWithYourSecurePassword!" ExecStart=/usr/local/bin/minio server $MINIO_VOLUMES $MINIO_OPTS Restart=always RestartSec=5 # Security restrictions CapabilityBoundingSet=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE NoNewPrivileges=true [Install] WantedBy=multi-user.target

Save and exit (Ctrl+O, Enter, Ctrl+X).

Step 5: Start and Verify the Service

Reload systemd to detect the new service, then start and enable MinIO to launch on boot:.

9
Bash sudo systemctl daemon-reload sudo systemctl start minio sudo systemctl enable minio

Check if the service is running without errors:

10
Bash sudo systemctl status minio

To confirm that MinIO is actively listening on the correct ports (9000 and 9001), run:

11
Bash sudo ss -tulpn | grep minio

Step 6: Access the MinIO Console & Set Policies

Open your web browser and navigate to:

12
Bash http://YOUR_SERVER_IP:900
  • Log in with your configured Root User and Password.
  • Go to Buckets -> Create a Bucket.
  • Access Control: By default, buckets are Private. In the console, you can configure Anonymous Rules (if you want public read access for assets) or generate Access Keys (for your applications to connect securely).

Step 7: Install the MinIO Client (mc)

For command-line management, the MinIO Client (mc) is an essential tool. It functions as a modern alternative to UNIX commands like ls, cat, and cp.

Install it using:

13
Bash wget https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/

Connect mc to your new local MinIO server:

14
Bash mc alias set local_s3 http://127.0.0.1:9000 admin ReplaceWithYourSecurePassword!

Now you can list your buckets or create a new one directly from the terminal:

15
Bash mc ls local_s3 mc mb local_s3/my-new-bucket

Production and Security Best Practices

If you are using this MinIO setup for production data, please implement the following:

  • Enable HTTPS (SSL): Never send API requests in plain text over the public internet. Use a reverse proxy like Nginx, Caddy, or Traefik with a free Let's Encrypt SSL certificate to route traffic securely to ports 9000 and 9001.
  • Remember, MinIO is Not a Backup: If your server's single hard drive fails, your data dies.
  • High Availability: For enterprise workloads, consider deploying MinIO in a distributed cluster across multiple drives (RAID) or multiple servers to ensure fault tolerance and data redundancy.

Conclusion

You have successfully deployed a powerful, self-hosted S3 alternative on Ubuntu 24.04. By stepping away from the public cloud, you now have complete control over your private cloud storage architecture.

Need hardware that can keep up with massive datasets?

Whether you are hosting heavy AI training data, Kubernetes volumes, or large-scale backups, check out servers99 for high-performance, unmetered NVMe Dedicated Servers built to handle heavy I/O without the cloud shock.


📚 Read Next: Storage Related Guides & Tutorials

👉 Build Your Own S3-Compatible Object Storage with MinIO

FAQ

MinIO is an open-source, high-performance object storage server that provides an Amazon S3-compatible API. It is widely used for storing application data, backups, AI and machine learning datasets, Kubernetes storage, media files, and other unstructured data in private or hybrid cloud environments.
Yes. MinIO provides an Amazon S3-compatible API, allowing most applications, SDKs, and tools designed for Amazon S3 to work with little or no modification. This makes MinIO an excellent choice for organizations building private object storage infrastructure.
Yes. MinIO can be deployed in production when it is properly configured with HTTPS, secure authentication, regular backups, and appropriate storage redundancy. For enterprise deployments, distributed MinIO clusters are recommended to improve availability and fault tolerance.
Self-hosting object storage with MinIO gives you complete control over your infrastructure, data, and costs. It helps eliminate unpredictable internet egress charges while delivering consistent performance for AI workloads, Kubernetes clusters, backups, media storage, and other data-intensive applications.
For the best performance, deploy MinIO on a dedicated server with fast NVMe SSD storage, sufficient RAM, multi-core processors, and a high-bandwidth network connection. For production environments, RAID or distributed MinIO deployments across multiple servers are recommended for improved reliability and high availability.