When it comes to cloud storage, AWS S3 is often the first thing that comes to mind. However, for projects requiring data sovereignty and cost control, setting up your own infrastructure can be much more sensible. That's where MinIO comes in. MinIO is a high-performance object storage server fully compatible with the AWS S3 API. You can run it on your own VDS in minutes and leverage all the features of S3 on your local hardware.
Why MinIO?
The main reasons to choose MinIO include its open-source nature, high speed, and S3 compatibility. Especially on 10 Gbps or faster network connections, you can achieve read/write speeds of several gigabytes per second. Additionally, MinIO integrates seamlessly with modern platforms like Kubernetes and Docker.
Pre-Installation Requirements
- A VDS with at least 2 cores (4 cores recommended)
- 4 GB RAM (8 GB ideal)
- SSD or NVMe disk for storage
- An operating system such as Ubuntu 22.04 LTS or Rocky Linux 9
- Open ports: 9000 (API) and 9001 (console)
Step-by-Step MinIO Installation
1. Download the MinIO Binary
First, download the latest version of MinIO and make it executable. Run these commands in the terminal:
wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio sudo mv minio /usr/local/bin/2. Create a Data Directory
Create a directory to store objects. For example:
sudo mkdir -p /data/objects3. Start MinIO
You can start MinIO with the following command. Here, set the admin username and password with MINIO_ROOT_USER and MINIO_ROOT_PASSWORD:
export MINIO_ROOT_USER=admin export MINIO_ROOT_PASSWORD=supersecret123 minio server /data/objects --console-address ":9001"You can now access the console at http://server-ip:9001 and the S3 API at http://server-ip:9000.
Running as a Persistent Service with Systemd
To have MinIO start automatically on boot, create a systemd service:
sudo nano /etc/systemd/system/minio.serviceAdd the following lines:
[Unit] Description=MinIO Documentation=https://docs.min.io Wants=network-online.target After=network-online.target [Service] User=minio-user Group=minio-user EnvironmentFile=-/etc/default/minio ExecStart=/usr/local/bin/minio server /data/objects Restart=always [Install] WantedBy=multi-user.targetThen create the user and start the service:
sudo useradd -r minio-user -s /sbin/nologin sudo chown minio-user:minio-user /data/objects sudo systemctl daemon-reload sudo systemctl enable minio sudo systemctl start minioSecurity and Performance Tips
- Use HTTPS: Secure the console and API with a Let's Encrypt certificate.
- Backups: Regularly back up your data to another MinIO server using the mc mirror command.
- Disk Repair: MinIO is resilient to disk failures with erasure coding. In an 8-disk setup, you can lose up to 4 disks without data loss.
- Performance Testing: Measure your read/write speeds with the mc admin speedtest command. On a 10GbE network, you can reach up to 5 GB/s.
Conclusion: Own Your S3
With MinIO, you gain all the benefits of AWS S3 on your VDS while keeping your data fully under control. It's an excellent solution for big data, backup, and media storage scenarios. Easy to set up, low cost, and scalable. Give it a try today and see the difference.