DEV Community

Tomas Scott
Tomas Scott

Posted on

2

A Detailed MinIO Tutorial: How to Set Up MinIO in 3 Minutes

As a developer, you've probably been there: the product manager comes up with another new feature. Users need to upload avatars, products need high-res images, and daily system logs and backups have to be stored somewhere... Faced with all these files of different shapes and sizes, where do you end up shoving them?

Just dump them on the application server's disk? It might seem convenient at first, but as your project scales, you'll find it's a recipe for disaster. The server disk will inevitably get maxed out, syncing files across multiple servers is a nightmare, and the overall management is a complete mess.

This is when the more seasoned devs know: "It's time for Object Storage!" And yes, services like AWS S3 are the gold standard—professional, stable, and scalable. But there's a catch. Connecting directly to S3 during development and testing incurs costs, and the cross-ocean network latency can have you waiting for an eternity.

And that’s where MinIO comes to the rescue.

Image description

What is MinIO?

Think of it as your own personal, self-hosted S3 that you can install right on your machine. It's open-source, high-performance, and fully API-compatible with S3. This means you can develop and test your code locally with MinIO, and then switch to a production S3 environment with almost no code changes. Sounds perfect, right?

That's what I thought, too.

"Expectation vs. Reality": My Manual MinIO Deployment Saga 🤯

"It's just a binary written in Go, how hard can it be? The official docs look simple enough!" — That was my initial, naive thought. Reality, however, quickly gave me a rude awakening.

Hurdle #1: The Choice and The Launch

First, I had a choice to make: run the binary directly, or go the more professional route with Docker? For the sake of a clean, isolated environment and easier future migrations, I chose Docker.

Alright, docker pull minio/minio. The image was small and downloaded quickly. But then I was confronted with a docker run command long enough to wrap around the globe.

docker run -p 9000:9000 -p 9001:9001 \
  -v /mydata/minio:/data \
  --name minio-server \
  -e "MINIO_ROOT_USER=your-access-key" \
  -e "MINIO_ROOT_PASSWORD=your-secret-key" \
  minio/minio server /data --console-address ":9001"
Enter fullscreen mode Exit fullscreen mode

Wait, ports 9000 and 9001... which one was the API and which was the web console again? I had to go back and check the docs. And that -v for volume mounting? That's a massive pitfall! If you forget to mount it, or get the path wrong, the moment you delete that container, all the data you painstakingly uploaded will vanish into thin air. Poof. Gone without a trace.

Hurdle #2: Configuration Hell

See those two environment variables, MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, in the command above?

God knows if I typo'd the password or simply forgot to set it the first time. The result was me staring at the login screen, scratching my head in frustration, unable to get into that damned console. I had to delete the container, clear the data, and start all over. A precious afternoon, gone just like that.

Hurdle #3: Network and Access

After much difficulty, I finally got it running. But a new problem emerged. I couldn't just keep using localhost:9001, right? I wanted to use a cooler local domain, like minio.test.

Okay, so that meant setting up a reverse proxy with Nginx or Caddy. Another round of fiddling with configuration files.

But the nightmare was just beginning. To make my local environment more realistic, I wanted to add HTTPS.

That's when I really poked the hornet's nest. First, I had to figure out how to generate local SSL certificates (using something like mkcert). Then, it was back to the Nginx config to add a whole bunch of SSL directives I'd never even heard of. ssl_certificate, ssl_certificate_key, ssl_protocols...

By the end of it all, looking at a screen full of config files and terminal errors, I couldn't help but ask myself a soul-searching question: "I just want to store a file locally. Why does it feel like I'm being forced to learn architecture, plumbing, network security, and interior design?"

"A Light at the End of the Tunnel": Discovering the Developer's Godsend, ServBay

Just when I was about to give up and crawl back into the arms of AWS S3, ServBay arrived like a knight in shining armor.
ServBay had an update. It added MinIO. I was saved.

ServBay isn't just a MAMP or XAMPP alternative; it's an integrated local web development environment designed for developers, packed with different versions of Python, Java, Go, PHP, Node.js, MariaDB, PostgreSQL, plus common services like Redis, Caddy, and Nginx.

From there on, everything was smooth sailing. The thing I struggled with all afternoon, I could now do with a few clicks in under a minute.

How to Install MinIO

Installing MinIO with ServBay is as simple as this:

  1. Open the ServBay dashboard.
  2. Click on "Packages" on the left, find "Object Storage," which is MinIO, and just click Download.

Image description

That's it. No, really. It's that simple.

It was the perfect antidote to my earlier frustrations. Let's compare them point by point:

  • Goodbye, Command Line and Parameters: No more monster docker run commands, no need to memorize complex arguments. Just a few mouse clicks, like installing any other app.
  • Crystal-Clear Configuration: After a successful installation, you can access MinIO directly from the ServBay dashboard. The default username and password are listed clearly, ready to be copied anytime. No more typos or forgotten credentials.

Image description

Image description

  • Network and SSL? Fully Automated! This was the cherry on top. ServBay handled everything for me automatically. A local SSL certificate was already configured! I didn't have to do a thing. After installation, I could immediately access it via https://minio.servbay.host, complete with that reassuring little lock icon in the browser's address bar. It felt like magic!

Image description

Conclusion: Focus on Coding, Not Configuration

Looking back, MinIO itself is an excellent tool. That's beyond doubt. But the initial complexity of a manual setup creates an unnecessary barrier to entry for many developers like me who just want to get it up and running quickly.

As developers, our most valuable assets are our time and energy. That time should be spent on business logic, polishing product features, and creating core value—not struggling again and again in the quagmire of setting up development environments.

The greatest value of integrated tools like ServBay is that they eliminate these barriers. They let us skip the tedious, repetitive, and error-prone "setup" work and get straight to a "turnkey" experience.

So, if you've ever been driven up the wall by local environment configuration—whether for MinIO or anything else—I strongly recommend you give ServBay a try. It might just help you rediscover the joy of pure coding.

Give your time back to your code. Leave the hassle to the tools.

I ❤️ building dashboards for my customers

I ❤️ building dashboards for my customers

Said nobody, ever. Embeddable's dashboard toolkit is built to save dev time. It loads fast, looks native and doesn't suck like an embedded BI tool.

Get early access

Top comments (0)

Secure Your IaC Pipelines

Secure Your IaC Pipelines

Join IaCConf on August 27 for a virtual event that dives into the security and governance challenges of managing infrastructure as code at scale.

Register Now

👋 Kindness is contagious

Take a moment to explore this thoughtful article, beloved by the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A heartfelt "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay