Deploy MinIO self-hosted S3-compatible object storage on Ubuntu with Docker — any S3 SDK works, multi-tenant, erasure coding.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/minio/minio-ubuntu.sh
chmod +x minio-ubuntu.sh
sudo bash minio-ubuntu.sh
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/minio/minio-ubuntu.sh
chmod +x minio-ubuntu.sh
The script installs Docker if needed, then deploys MinIO with console and API endpoints.
sudo bash minio-ubuntu.sh
Open browser and navigate to the MinIO console:
http://<your-server-ip>:9001
Log in with your admin credentials, create your first bucket, then generate access keys for your applications to use the S3 API.
# Via CLI using mc (MinIO Client)
docker exec -it minio mc alias set local http://localhost:9000 admin password
docker exec -it minio mc mb local/mybucket
docker exec -it minio mc ls local
| Port | Purpose |
|---|---|
| 9000 | S3 API |
| 9001 | MinIO Console |
MinIO is a high-performance, S3-compatible object storage server designed for private cloud infrastructure. It handles unstructured data such as images, videos, backups, and log files at massive scale, providing the same API as Amazon S3 so any S3-compatible application works without modification.
MinIO gives you S3-compatible object storage on your own hardware — no AWS bill, no data leaving your infrastructure. Any application that speaks S3 (Backblaze B2, AWS SDK, boto3, aws-sdk-js) works with MinIO without code changes. Use it as the storage backend for Kopia, Restic, Nextcloud, or any app that needs file storage — and pay for hardware once instead of per-GB forever.
Port 9000 for the S3 API and port 9001 for the management console. Both should be behind HTTPS via Nginx Proxy Manager. The S3 API (9000) needs to be accessible to your applications; the console (9001) can be restricted to admin IPs.
Direct alternatives: Ceph (distributed, extremely powerful, extremely complex), Garage (lightweight S3, Rust-based), SeaweedFS (high performance). Cloud: AWS S3 (the original), Backblaze B2 (S3-compatible, cheap), Cloudflare R2 (no egress fees). MinIO wins for self-hosted S3 compatibility with great tooling and active development.
Don't use MinIO if you need distributed storage across 10+ nodes with complex failure domains — Ceph is more appropriate. And if you're already in AWS and egress costs are acceptable, native S3 has better reliability guarantees than self-hosted.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Yes — MinIO passes the S3 compatibility test suite. Any SDK or tool that works with AWS S3 (boto3, aws-sdk, aws CLI, Terraform S3 provider) works with MinIO by changing the endpoint URL. Some S3 features added after 2020 may lag, but core operations are 100% compatible.
Yes — both Kopia and Restic support S3-compatible backends. Point them at your MinIO endpoint with your access key and secret. This is one of the most popular MinIO use cases for self-hosters.
Erasure coding splits objects into data and parity shards across multiple drives, allowing recovery from drive failures. It requires at least 4 drives. For a single-disk homelab, you don't need it — use regular volumes and back up to a second location instead.
Run MinIO with multiple nodes listed in `MINIO_VOLUMES` (e.g., `http://minio{1...4}/data`). All nodes must have network access to each other. Distributed mode enables erasure coding and high availability.
Yes — set a bucket policy to allow anonymous `s3:GetObject` access. In the console: Buckets → your bucket → Access Policy → Custom → paste the public read policy JSON. Be careful with what you make public.
Install mc: `curl -O https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc`. Set alias: `mc alias set myminio http://your-minio:9000 ACCESS_KEY SECRET_KEY`. Then: `mc ls myminio`, `mc cp file.txt myminio/mybucket/`.
Yes — enable versioning per bucket from the console or via the S3 API. Versioning preserves every version of every object, enabling point-in-time recovery. Note: versioning significantly increases storage usage.
Run `docker compose pull && docker compose up -d`. MinIO is generally backward-compatible. For major version upgrades, check the MinIO release notes for any required migration steps. Always back up your data volume first.