How to Install MinIO Object Storage on Ubuntu 24.04

Object storage is a data storage method where units of data are stored as separate objects. Unlike traditional file systems that use directory hierarchies or block storage systems that store data in fixed blocks, object storage keeps data in a single repository that can be directly accessed via a unique ID. Each object consists of the data itself, metadata, and a unique identifier. The main advantages of object storage include high scalability, the ability to store large amounts of unstructured data, and easier accessibility and management through application programming interfaces (APIs).

Object storage is ideal for storing large amounts of unstructured data, such as multimedia files (photos, videos), backups and archives, IoT sensor data, and web or mobile application data. Examples of object storage applications include storing backup files in cloud services, hosting media content, and storing large datasets for big data analysis or machine learning.

One popular implementation of Object Storage is MinIO. This open-source solution offers functionality similar to commercial cloud storage services like Amazon S3, but with greater control and flexibility. MinIO can be installed and run on various platforms, including Ubuntu. This tutorial will cover the step-by-step process of installing and configuring MinIO Object Storage on Ubuntu 24.04.

MinIO Deployment Topologies

There are three types of topologies in MinIO deployment:

  1. Single-Node Single-Drive (SNSD or “Standalone”): This is the simplest topology among all MinIO deployments. In this mode, MinIO is installed on a single node (server) and uses one drive (disk) to store data.
  2. Single-Node Multi-Drive (SNMD or “Standalone Multi-Drive”): In this topology, MinIO is installed on a single node but uses multiple drives (disks) to store data.
  3. Multi-Node Multi-Drive (MNMD or “Distributed”): This is the most complex topology among the three mentioned. In this mode, MinIO is installed on multiple nodes, and each node has multiple drives.

Tutorial Environment

In this tutorial, the following setup is used:

  • VPS: Vultr, 1 CPU, 1 GB RAM
  • Block Storage: 100GB
  • Operating System: Ubuntu 24.04
  • Subdomains: minio-console.aminlabs.my.id and minio-s3.aminlabs.my.id
  • SSL: Cloudflare
  • Topology: Single-Node Single-Drive

Note: Sign up here to get a $100 free credit from Vultr.

Steps to Install MinIO Server

The installation of the MinIO Server is divided into four parts: mount block storage, install MinIO server package, configure Nginx reverse proxy, and testing.

1. Mount Block Storage

Run the update and upgrade commands on Ubuntu:

For MinIO storage, a separate disk is prepared. In this tutorial, we use a Vultr cloud server and a 100GB block storage as an additional disk for MinIO.

Display block devices:

In the output above, there is a device vdb that will be partitioned, formatted, and mounted.

Partition vdb, then format vdb1 with the XFS filesystem:

Verify the results of the above commands; vdb1 should be present:

Create a directory minio-storage to serve as the mount point for the vdb1 partition:

Mount vdb1 to /mnt/minio-storage:

Verify the results of the above command:

The result shows that vdb1 is successfully mounted at /mnt/minio-storage:

Open the fstab configuration file:

Add a configuration line for auto-mounting vdb1:

2. Install MinIO Server

Download and install MinIO Server:

Check the latest version at min.io/download.

Create a minio-user and change the ownership of the minio-storage directory:

Create the minio configuration file:

Add the following configuration:

  • MINIO_VOLUMES: lokasi penyimpanan data MinIO
  • MINIO_OPTS: --address :9000 merupakan alamat dan port layanan MinIO akan listening, sedangkan --console-address :9001 untuk web console administrasi MinIO
  • MINIO_ROOT_USER: username untuk akun root MinIO
  • MINIO_ROOT_PASSWORD: password untuk akun root MinIO

Open ports 9000 and 9001 if the UFW firewall is active:

Start the MinIO service and display its status:

3. Nginx Reverse Proxy

Install Nginx:

Location of the SSL certificate and private key files for the subdomain in use:

Create an Nginx server block configuration file for the reverse proxy of the minio-console subdomain, which is the MinIO administration web interface:

Add the following configuration, adjusting the subdomain and port used:

Create an Nginx server block configuration file for the reverse proxy of the minio-s3 subdomain, which provides API access:

Add the following configuration, adjusting the subdomain and port used:

Restart and display the status of the MinIO service:

Open ports 80 and 443:

4. Testing

Test the installation results by accessing the web console at https://minio-console.aminlabs.my.id, and log in using the root username and password configured earlier in the /etc/default/minio file. Try creating a bucket, uploading a file, and creating a user.

For the second test, access the MinIO API via a client application. Install the MinIO Client (mcli) DEB package:

For the latest version and other operating systems, check min.io/download.

Connect to the MinIO server:

Display all objects in the myminio server and mydata bucket:

For more detailed information and instructions, refer to the official MinIO documentation at min.io/docs.

If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!

Donate via PayPal: https://paypal.me/musaamin

Leave a Reply

Your email address will not be published. Required fields are marked *