MinIO is an S3-compatible object storage server you can run anywhere — laptop, server, or Kubernetes. Same AWS S3 API, zero cloud cost.
Setup
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"
Use with AWS SDK
import { S3Client, PutObjectCommand, GetObjectCommand, ListObjectsV2Command } from '@aws-sdk/client-s3';
const s3 = new S3Client({
endpoint: 'http://localhost:9000',
region: 'us-east-1',
credentials: { accessKeyId: 'admin', secretAccessKey: 'password123' },
forcePathStyle: true
});
// Upload
await s3.send(new PutObjectCommand({
Bucket: 'my-bucket',
Key: 'photos/cat.jpg',
Body: fileBuffer,
ContentType: 'image/jpeg'
}));
// Download
const { Body } = await s3.send(new GetObjectCommand({
Bucket: 'my-bucket',
Key: 'photos/cat.jpg'
}));
// List objects
const { Contents } = await s3.send(new ListObjectsV2Command({
Bucket: 'my-bucket',
Prefix: 'photos/'
}));
Presigned URLs
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
const uploadUrl = await getSignedUrl(s3, new PutObjectCommand({
Bucket: 'uploads',
Key: `user-${userId}/${filename}`
}), { expiresIn: 3600 });
// Give this URL to the client for direct upload
Event Notifications
# Webhook on new uploads
mc event add myminio/my-bucket arn:minio:sqs::1:webhook \
--event put --suffix .jpg
Why This Matters
- S3 compatible: All AWS S3 tools and SDKs work unchanged
- Self-hosted: No cloud bills, no data leaving your network
- Fast: Designed for high-performance workloads
- Kubernetes native: Operator for production clusters
Need custom storage solutions or data pipeline tools? I build developer tools. Check out my web scraping actors on Apify or reach out at spinov001@gmail.com for custom solutions.
Top comments (0)