AWS S3 API, But Free and On Your Server
MinIO is S3-compatible object storage you can run anywhere. Same API as AWS S3, but free and open-source.
Setup (Docker)
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"
Dashboard at localhost:9001. API at localhost:9000.
Python (boto3 — Same as AWS S3!)
import boto3
s3 = boto3.client("s3",
endpoint_url="http://localhost:9000",
aws_access_key_id="admin",
aws_secret_access_key="password123")
# Create bucket
s3.create_bucket(Bucket="my-files")
# Upload
s3.upload_file("report.pdf", "my-files", "reports/2026/report.pdf")
# Download
s3.download_file("my-files", "reports/2026/report.pdf", "downloaded.pdf")
# List objects
for obj in s3.list_objects_v2(Bucket="my-files")["Contents"]:
print(f"{obj[Key]}: {obj[Size]} bytes")
Same code works with AWS S3 — just change the endpoint_url.
JavaScript
import { S3Client, PutObjectCommand, 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
});
await s3.send(new PutObjectCommand({
Bucket: "my-files",
Key: "hello.txt",
Body: "Hello World"
}));
Real Use Cases
- Development/testing without AWS costs
- On-premises file storage for regulated industries
- Backup target for databases
- Media storage for self-hosted apps
- Data lake for analytics
MinIO vs AWS S3
| Feature | MinIO | AWS S3 |
|---|---|---|
| Cost | $0 (self-hosted) | Pay per GB/request |
| API | S3-compatible | S3 |
| Performance | NVMe-optimized | Variable |
| Data location | Your server | AWS regions |
| Open source | Yes | No |
More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs
Top comments (0)