Skip to content
Deploy MinIO with Docker (AWS S3 Alternative)

Deploy MinIO with Docker (AWS S3 Alternative)

MinIO is a high-performance object storage system that is fully compatible with the Amazon S3 API.
It allows developers to run their own storage service locally or on a server without relying on cloud providers.

In this tutorial, you will learn how to deploy MinIO using Docker, access its web console, and start using it as a simple object storage service.


What is MinIO?

MinIO is an open-source object storage server designed for modern cloud-native applications.

Instead of storing files in traditional folders, MinIO stores data as objects inside buckets, similar to how Amazon S3 works.

Key advantages of MinIO:

  • Compatible with AWS S3 API
  • Lightweight and fast
  • Easy to deploy locally
  • Suitable for development and testing environments
  • Works well with Docker and Kubernetes

Because of these advantages, MinIO is often used as a local alternative to AWS S3 during application development.


Prerequisites

Before starting, make sure the following tools are installed:

  • Docker
  • Basic command line knowledge
  • Internet connection to pull Docker images

You can verify Docker installation with:

docker --version

Running MinIO Using Docker

The simplest way to run MinIO is using a Docker container.

Run the following command:

docker run -p 9000:9000 -p 9001:9001 \
  -e MINIO_ROOT_USER=admin \
  -e MINIO_ROOT_PASSWORD=password123 \
  minio/minio server /data --console-address ":9001"

Explanation:

  • 9000 → API port used by applications
  • 9001 → Web console port
  • MINIO_ROOT_USER → admin username
  • MINIO_ROOT_PASSWORD → admin password
  • /data → storage directory inside the container

This command pulls the MinIO image and starts the server.


Running MinIO with Docker Compose

For a more structured setup, you can use Docker Compose.

Create a file called:

docker-compose.yml

Add the following configuration:

version: "3"

services:
  minio:
    image: minio/minio
    container_name: minio-container
    restart: unless-stopped
    environment:
      MINIO_ROOT_USER: admin
      MINIO_ROOT_PASSWORD: password123
    ports:
      - "9000:9000"
      - "9001:9001"
    volumes:
      - ./data:/data
    command: server /data --console-address ":9001"

Start the service:

docker-compose up -d

Docker will now run MinIO in the background.


Accessing the MinIO Console

Once the container is running, open your browser and go to:

http://localhost:9001

Login using the credentials defined earlier:

Username: admin
Password: password123

You will see the MinIO web dashboard, where you can manage buckets and files.


Creating Your First Bucket

In object storage, a bucket is similar to a folder used to store objects.

Steps:

  1. Open the MinIO Console
  2. Click Create Bucket
  3. Enter a bucket name
  4. Click Create

You can now start uploading files to the bucket.


Uploading Files

To upload files:

  1. Open your bucket
  2. Click Upload
  3. Select the file from your computer
  4. Confirm upload

MinIO will store the file as an object inside the bucket.


Using MinIO Client (CLI)

MinIO also provides a command line client called mc.

Install it:

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

Configure connection to your MinIO server:

mc alias set local http://127.0.0.1:9000 admin password123

Test the connection:

mc admin info local

You can now manage buckets and objects directly from the terminal.


Basic Bucket Commands

Create a bucket:

mc mb local/mybucket

List buckets:

mc ls local

Upload files:

mc cp file.txt local/mybucket

When to Use MinIO

MinIO is commonly used for:

  • Local development environments
  • Testing S3-compatible applications
  • Backup storage systems
  • Self-hosted cloud storage
  • Data pipelines and analytics systems

Because it implements the S3 API, applications written for AWS S3 can easily switch to MinIO.


Conclusion

MinIO is a powerful yet lightweight object storage solution that can be deployed quickly using Docker.
It provides S3 compatibility, high performance, and a simple interface that makes it ideal for development and testing.

By running MinIO locally, developers can experiment with cloud storage workflows without relying on external cloud services.


Last updated on