
Introduction
MinIO is a high-performance, distributed object storage system designed to work with unstructured data, such as photos, videos, and log files. Installing MinIO locally provides a test environment for developers and data engineers to validate configurations, experiment with features, and manage object storage without relying on external resources. Local installations are invaluable for testing and development purposes, allowing for offline work and more control over the environment.
This guide will walk you through installing MinIO on your local machine using Docker and language-specific installation tools. With clear instructions, this setup guide should help you quickly implement MinIO and verify that it’s correctly installed.
Step 1: Docker Installation for MinIO
Docker is often the most straightforward approach for setting up MinIO, as it allows you to run it in a contained environment that is both scalable and isolated.
Ensure Docker is Installed: Confirm Docker is available on your machine by running:
docker --version
Pull the MinIO Docker Image: Fetch the latest MinIO image from Docker Hub:
docker pull minio/minio
Run MinIO in a Docker Container: Start MinIO using the following command, specifying a directory on your local machine for storage:
docker run -p 9000:9000 -p 9001:9001 --name minio \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=password" \
-v /path/to/data:/data \
minio/minio server /data --console-address ":9001"
Verify Installation: After running the command, visit http://localhost:9000
in your browser and log in using the credentials specified (admin
and password
).
Tip: To manage MinIO via Docker, you can use basic commands like docker start minio
and docker stop minio
.
Step 2: Language-Specific Installation Methods
If you prefer integrating MinIO SDKs directly within your development environment, there are language-specific installation options to consider.
Python (Using pip)
Install the MinIO SDK: Use pip to install the MinIO Python client:
pip install minio
Example of Usage
from minio import Minio
client = Minio(
"localhost:9000",
access_key="admin",
secret_key="password",
secure=False
)
# Create a bucket
client.make_bucket("my-bucket")
print("Bucket 'my-bucket' created.")
Verification: Run the script to check if the bucket is created successfully.
Node.js (Using npm)
Install the MinIO SDK
npm install minio
Example of Usage
const Minio = require('minio');
const client = new Minio.Client({
endPoint: 'localhost',
port: 9000,
useSSL: false,
accessKey: 'admin',
secretKey: 'password'
});
// Create a bucket
client.makeBucket('my-bucket', 'us-east-1', function(err) {
if (err) return console.log('Error creating bucket.', err);
console.log('Bucket "my-bucket" created successfully.');
});
Verification: Run this JavaScript code to verify the bucket’s creation.
Ruby (Using gem)
Install the MinIO SDK
gem install minio-ruby
Example of Usage
require 'minio'
client = Minio::Client.new(
end_point: 'localhost:9000',
access_key: 'admin',
secret_key: 'password',
secure: false
)
# Create a bucket
client.make_bucket('my-bucket')
puts 'Bucket "my-bucket" created successfully.'
Verification: Run the Ruby script to confirm that the bucket is created on your local MinIO server.
Java (Using Maven)
Add MinIO Dependency: For Maven projects, add the following dependency to your pom.xml
:
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.3.0</version>
</dependency>
Example of Usage
import io.minio.MinioClient;
import io.minio.errors.MinioException;
public class MinIOExample {
public static void main(String[] args) {
try {
MinioClient minioClient = new MinioClient.Builder()
.endpoint("http://localhost:9000")
.credentials("admin", "password")
.build();
// Create a bucket
minioClient.makeBucket("my-bucket");
System.out.println("Bucket 'my-bucket' created successfully.");
} catch (MinioException e) {
System.err.println("Error: " + e);
}
}
}
Verification: Compile and run the Java code to confirm your setup.
Summary: Managing and Verifying Your MinIO Installation
Once installed, managing MinIO locally is straightforward:
- Accessing the Console: Open your browser and navigate to
http://localhost:9000
. MinIO’s web console offers a user-friendly interface for managing your storage. - Command-Line Management: For containerized installations, Docker commands (
docker start
,docker stop
, etc.) offer full control over the MinIO instance. - SDK Verification: With each language SDK, creating a sample bucket provides confirmation that your MinIO setup is functioning correctly. For additional functionality, explore MinIO’s extensive SDK documentation to further integrate it into your projects.
With MinIO locally set up, you can now test configurations, prototype storage solutions, and prepare for production deployments, all within a controlled environment. This guide has aimed to equip you with the essentials to get started—happy coding!
Last Releases
- Bugfix ReleaseWhat’s Changed Correct spelling by @shtripat in #21225 update minio/kms-go/kms SDK by @aead in #21233 Fix nil dereference in adding service account by @taran-p in #21235 Use go mod tool… Read more: Bugfix Release
- Bugfix ReleaseWhat’s Changed move to go1.24 by @harshavardhana in #21114 Fix buffered streams missing final entries by @klauspost in #21122 typo: fix error msg for decoding XL headers by @wooffie in… Read more: Bugfix Release
- Bugfix ReleaseWhat’s Changed decom: Ignore orphan delete markers in verification stage by @vadmeste in #21106 ilm: Expect objects with only free versions when scanning by @krisis in #21112 Full Changelog: RELEASE.2025-04-03T14-56-28Z…RELEASE.2025-04-08T15-41-24Z… Read more: Bugfix Release