
MinIO is an open-source, high-performance object storage server that offers S3-compatible API for managing and sharing files as objects. It uses a server and console-based architecture, providing multiple access methods, including a web interface, the mc command-line tool, and other S3-compatible clients such as S3 Browser, Cyberduck, and s3cmd.
This article explains how to deploy MinIO on Ubuntu 24.04 to share and manage files on your server. You will install and configure the MinIO server using a Single Node Single Drive (SNSD) architecture, and configure MinIO to use a Block Storage device for storing objects.
Before you begin, you need to:
minio.example.com./mnt/minio-data.MinIO is not available in the default Ubuntu APT repositories. To install MinIO, you need to manually download the official debian package (.deb) from the MinIO website and install it using the dpkg package manager.
Download the latest MinIO Debian package from the release page.
The above command downloads the MinIO .deb release package and saves it as minio.deb. To check the latest version, visit the official releases page.
Install the downloaded MinIO package using the dpkg command.
View the installed MinIO version.
Your output should be similar to the one below:
MinIO uses the minio command to run and manage the application server. It supports multiple options to define the listening port, storage volumes, and default administrator user details on your server. These options do not persist after the session ends unless configured as expected. Follow the steps below to configure MinIO with the required options and enable it to start automatically at boot.
Create a new MinIO configuration file to define the required MinIO options.
Add the following configurations to the file.
Replace minio_admin with your administrator username and strong-password with the administrator password (which must be at least 8 characters long).
Save and close the file.
This configuration ensures that MinIO runs on the API port 9000 and the console web interface port 9001. It sets the storage path to /mnt/minio-data, where you can mount a block device with a high storage. Storing data on a separate block device is the recommended way to handle large amounts of data, as it ensures greater durability. If you encounter server issues, your data remains safe on a different drive.
Create a new minio-user without login privileges on the server.
The MinIO system service runs under the minio-user and minio-user group. You need to create this user and assign the privileges to access the necessary directories for MinIO to function as expected.
Grant the user and group ownership privileges on your data storage directory /mnt/minio-data to the minio-user.
Enable the MinIO system service so that it starts automatically when your server boots.
Start the MinIO system service.
View the status of the MinIO service and verify that it is in a running state.
Your output should be similar to the one below:
By default, MinIO listens for API connections on port 9000 and web console access on port 9001. To securely run and expose MinIO, you can set up a domain name and configure it to run on secure ports, such as HTTPS port 443. Using Let's Encrypt, you can generate trusted SSL certificates to enable HTTPS connections and secure access to the API using S3 client tools. Follow the steps below to generate SSL certificates and configure MinIO to run securely on your domain.
MinIO supports HTTP connections by default when the --certs-dir option is not passed. When configured, MinIO uses your SSL certificate public.crt file and the private key private.key for secure communication. Follow the steps below to generate Let's Encrypt certificates and enable secure connections for MinIO.
Allow the HTTP port 80 through the default firewall to allow Let's Encrypt domain validation.
Install the Certbot Let's Encrypt client.
Request a new SSL certificate for your domain.
Replace minio.example.com and hello@example.com with your actual domain and email address. When successful, you will receive a message stating "Successfully received certificate."
Test that Certbot will auto-renew your SSL certificate when it expires.
This command performs a dummy SSL certificate renewal to simulate the process without making any actual changes.
Create a new directory to store the SSL certificate files for MinIO to use, such as /opt/minio-certs.
Copy your SSL certificate and private key to the /opt/minio-certs directory.
Grant the minio-user full privileges to the /opt/minio-certs directory.
Check the path of MinIO binary.
Your output should be similar to the one below:
To enable SSL and bind MinIO to the HTTPS port 443, which is a privileged port under 1024, you must grant additional permissions.
This allows MinIO to bind to port 443 for secure HTTPS connections.
Open your MinIO configuration file to apply the SSL certificate settings.
Replace the MinIO console address port :9001 with the HTTPS port 443.
Add the --certs-dir /opt/minio-certs option to your MINIO_OPTS directive.
Add a new MINIO_DOMAIN with your domain URL at the end of your configuration file.
Save and close the file.
Your modified MinIO configuration should look like the one below:
Restart MinIO service to apply your configuration changes.
Check the status of MinIO service.
Allow connections to the HTTPS port 443 through the firewall.
Allow S3 connections to the MinIO API port 9000.
Reload the firewall to apply the changes.
View the firewall status.
Make sure the status is active and all required rules (such as ports 80, 443, and 9000) are listed and applied.
Open your web browser and navigate to your MinIO domain using the following URL.
Verify that the MinIO web interface displays in your web browser. Then, log in to the MinIO console using the administrator credentials defined in the /etc/default/minio configuration file.
minio_adminstrong-password
After you have logged in, click Buckets from the main navigation menu to begin setting up a new object storage bucket.
Click Create a Bucket to proceed with creating a new bucket. Enter your desired bucket name in the Bucket Name field. For example, vultr-test.
Bucket Name Convention Rules:
Enable additional bucket features.
After configuring your options, click Create Bucket to create the MinIO Object Storage bucket.
After the bucket is created, confirm it appears in your Buckets list. Click the bucket name to view and configure its properties.
To upload files to the bucket, navigate to Object Browser in the main navigation menu.
Select the newly created bucket to open the object browser. Then, click Upload and choose Upload File from the options to upload new files from your device.
Verify that your upload is complete and the new file is available in your bucket. To share the file, click it and select Share to generate an encrypted URL of downloading the file.
Set the desired expiration for the link and click the copy icon to share the link for downloading the file.
S3 client applications offer a secure method to upload and manage object storage files. The MinIO API runs on port 9000 and accepts S3 connections on your server to create and manage files. Follow the steps below to use an S3 client application such as S3 Browser to establish a connection and upload files on your server.
Navigate to Access Keys in the MinIO console interface to create new authentication keys.
Click Create access key to generate new access and secret keys.
Set your desired expiry date and name. Then, click Create to apply the new keys on your server.
Copy the generated keys or click Download for Import to save the keys to a file on your device.
Download and install an S3 Browser application on your device.
Open the S3 Browser application on your device and click Add new account within the Accounts menu.
In the Add New Account window, enter the following details:
Your configuration should look like below:
Click Save Changes to save the new S3 storage account and establish a connection with your MinIO server.
Verify that your MinIO buckets display in the S3 Browser application. Then, click any bucket to view the available objects.
S3cmd is a command-line tool used for managing data in an S3-compatible storage service like MinIO. It allows you to perform various tasks such as listing, creating, and removing buckets, also uploading and downloading objects. Follow the steps below to use s3cmd to interact with your MinIO server.
Install s3cmd CLI utility on your system.
Ubuntu/Debian:
Update the APT server package index.
Install the s3cmd CLI package.
RHEL/RockyLinux:
Update the DNF server package index.
Install the s3cmd CLI package.
macOS (using Homebrew):
Update the BREW server package index.
Install the s3cmd CLI package.
After installing s3cmd, you need to configure the AccessKeys to connect to your MinIO server.
Follow the prompts to enter the following details.
minio.example.com:9000).minio.example.com:9000.After you’ve entered all the details, the settings will appear as follows for verification.
Press Y to test the connection and ensure everything is set up as expected.
To list all the available buckets on your MinIO server.
This command will display a list of all buckets currently available on your MinIO server.
Your output should be similar to the one below:
To create a new bucket, use the following command.
Replace my-new-bucket with your desired bucket name.
View the list of available buckets again and verify that the new bucket exists.
Your output should be similar to the one below:
To upload a file to your bucket, use the following command.
Your output should be similar to the one below:
To view the list of objects present in a MinIO bucket, use the following command.
Your output should be similar to the one below:
Remove the already present test file in the directory.
To download a file from your MinIO bucket.
Your output should be similar to the one below:
To delete a file (object) from your bucket, use the following command.
Your output should be similar to the one below:
To delete a bucket from your MinIO server, use the following command.
Your output should be similar to the one below:
View the list of available buckets again and verify that the bucket is deleted.
Your output should be similar to the one below:
You have deployed MinIO on your Ubuntu 24.04 server using a Single Node Single Drive (SNSD) architecture backed by a mounted block storage device. With MinIO configured as a system service and secured using Let's Encrypt SSL certificates, your object storage server is now ready for production use. You can manage and share files through the secure web interface, command-line tools like s3cmd, and desktop applications such as S3 Browser. For further configuration options and additional details, please visit the official MinIO documentation.
0 Comments
Be the first to comment and share your perspective with the community.