Skip to Content

Self-Host MinIO: S3-Compatible Object Storage in 15 Minutes

Self-Host MinIO: S3-Compatible Object Storage in 15 Minutes

Tired of unpredictable AWS S3 bills? Want full control over your data? MinIO gives you Amazon S3-compatible object storage that you own, run, and scale — on your own hardware or VPS.

What Problem Does MinIO Solve?

Object storage is the backbone of modern applications. Whether you're storing backups, media files, ML datasets, or application assets, you need a reliable, scalable storage layer. The default choice is AWS S3, but that comes with:

  • Unpredictable egress fees
  • Vendor lock-in
  • Compliance concerns (where is your data?)
  • Limited control over performance and availability

MinIO is a high-performance, S3-compatible object storage server written in Go. It's designed for private cloud, hybrid cloud, and edge deployments. If you can run Docker, you can run MinIO.

Why Self-Host MinIO?

  • Full data sovereignty: Your data stays on your infrastructure
  • Predictable costs: No per-GB egress charges or API call fees
  • S3-compatible: Works with existing S3 SDKs, CLI tools, and applications
  • High performance: Written in Go, designed for speed
  • Scalable: Start with one node, grow to a distributed cluster

Prerequisites

  • A VPS or server with Docker and Docker Compose installed
  • Minimum 1 CPU, 2GB RAM, 20GB storage (more for production workloads)
  • A domain or subdomain pointed to your server (optional but recommended)
  • Basic familiarity with Docker Compose

Step 1: Create the Docker Compose File

Create a directory for MinIO and a docker-compose.yml file:

mkdir -p ~/minio && cd ~/minio
cat > docker-compose.yml << 'EOF'
version: '3.8'

services:
  minio:
    image: minio/minio:latest
    container_name: minio
    restart: unless-stopped
    ports:
      - "9000:9000"
      - "9001:9001"
    environment:
      MINIO_ROOT_USER: admin
      MINIO_ROOT_PASSWORD: changeme-strong-password
    volumes:
      - ./data:/data
    command: server /data --console-address ":9001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
EOF

Important: Replace changeme-strong-password with a strong, unique password. This is your admin credentials.

Step 2: Start MinIO

Launch the container:

docker compose up -d

Check that it's running:

docker compose ps
# Should show minio as "healthy"

Step 3: Access the MinIO Console

MinIO exposes two endpoints:

  • API (S3): http://your-server-ip:9000 — for applications and CLI
  • Web Console: http://your-server-ip:9001 — for browser-based management

Open http://your-server-ip:9001 in your browser and log in with:

  • Username: admin
  • Password: changeme-strong-password (or whatever you set)

Step 4: Create a Bucket

From the web console:

  1. Click Buckets in the left sidebar
  2. Click Create Bucket
  3. Enter a name (e.g., my-app-backups)
  4. Click Create Bucket

You now have an S3-compatible bucket ready for use.

Step 5: Configure the MinIO Client (mc)

The MinIO Client (mc) is the S3-compatible CLI for managing your storage. Install it:

# Linux
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
  --create-dirs -o ~/.minio-bin/mc
chmod +x ~/.minio-bin/mc
export PATH=$PATH:~/.minio-bin/mc

# macOS (with Homebrew)
brew install minio-mc

Add your MinIO server as an alias:

mc alias set myminio http://your-server-ip:9000 admin changeme-strong-password

List your buckets:

mc ls myminio

Step 6: Upload and Download Files

Upload a file:

mc cp myfile.zip myminio/my-app-backups/

Download a file:

mc cp myminio/my-app-backups/myfile.zip ./

List bucket contents:

mc ls myminio/my-app-backups/

Step 7: Integrate with Your Applications

MinIO is fully S3-compatible. Use these settings in your apps:

AWS_ACCESS_KEY_ID=admin
AWS_SECRET_ACCESS_KEY=changeme-strong-password
AWS_ENDPOINT_URL_S3=http://your-server-ip:9000
AWS_REGION=us-east-1
S3_BUCKET_NAME=my-app-backups

Popular tools that work with MinIO:

  • rclone (backup/sync)
  • Restic, Borgmatic (backup tools)
  • Nextcloud (external storage)
  • GitLab CI (artifact storage)
  • Any app using AWS S3 SDKs

Verification Steps

  1. MinIO console loads at http://your-server-ip:9001
  2. You can log in with your credentials
  3. You created a bucket successfully
  4. mc ls myminio lists your bucket
  5. File upload and download work via mc cp

Production Hardening (Do This Before Going Live)

  • Reverse proxy with HTTPS: Put MinIO behind Traefik or Nginx with SSL
  • Strong credentials: Use long, random passwords for root and service accounts
  • Firewall rules: Restrict port 9000/9001 to trusted IPs if possible
  • Backups: MinIO stores data locally — back up ./data or use bucket replication
  • Distributed mode: For HA, run MinIO in distributed mode across multiple nodes

Next Steps


Self-hosting isn't just about saving money — it's about owning your stack. MinIO gives you enterprise-grade object storage without the enterprise-grade bill. Deploy it today and stop renting your data.

Self-Host Ollama: Run Local LLMs on Your Own Server in 15 Minutes