I’ve recently become interested in hosting my own local S3 API compatible object storage server at home.
So tonight I set about setting up Minio.
Minio is an object storage server that is S3 API compatible. This means I’ll be able to use my working knowledge of the Amazon S3 API and tools, but to interact with my own, locally hosted storage service running on a Raspberry Pi.
I had heard about Zenko before (an S3 API compatible object storage server) but was searching around for something really lightweight that I could easily run on ARM architecture – i.e. my Raspberry Pi model 3 I have sitting on my desk right now. In doing so, Minio was the first that I found that could easily be compiled to run on the Raspberry Pi.
The goal right now is to have a local object storage service that is compatible with S3 APIs that I can use for home use. This has a bunch of cool use cases, and the ones I am specifically interested in right now are:
- Being able to write scripts that interact with S3, but test them locally with Minio before even having to think about deploying them to the cloud. A local object storage API is going to be free and fast. Plus it’s great knowing that you’re fully in control of your own data.
- Setting up a publically exposable object storage service that I can target with serverless functions that I plan to be running on demand in the cloud to do processing and then output artifacts to my home object storage service.
The second use case above is what I intend on doing to send ffmpeg processed video to. Basically I want to be able to process video from online services using something like AWS Lambda (probably using ffmpeg bundled in with the function) and output the resulting files to my home storage system.
The object storage service will receive these output files from Lambda and I’ll have a cronjob or rsync setup to then sync the objects placed into my storage bucket(s) to my home Plex media share.
This means I’ll be able to remotely queue up stuff to watch via a simple interface I’ll expose (or a message queue of some sort) to be processed by Lambda, and by the time I’m home everything will be ready to watch in Plex.
Normally I would be more interesting in running the Docker image for Minio, but at home I want something that is really cheap to run, and so compiling Minio for Raspberry Pi makes total sense to me here, as this device is super cheap to level powered on 24/7 as opposed to running something beefier that would instead run as a Docker host or lightweight Kubernetes home cluster.
Here’s the quick start up guide to get it running on Raspberry Pi
You’ll basically download Go, extract it, set it up on your path, then use it to compile Minio’s source code into an ARM compatible binary that you can run on your pi.
wget //dl.google.com/go/go1.10.3.linux-armv6l.tar.gz sudo tar -C /usr/local -xzf go1.10.3.linux-armv6l.tar.gz export PATH=$PATH:/usr/local/go/bin # put into ~/.profile source .profile go get -u github.com/minio/minio mkdir ~/minio-data cd go/bin ./minio server ~/minio-data/
And you’re up and running! It’s that simple to get going quickly.
Running interactively you’ll get a default access and secret key in the terminal, so head on over to the Web UI / interface to check things out: //your-raspberry-pi-ip-or-hostname:9000/minio/
Enter your credentials to login.
Of course at this stage you can also start using your S3 API compatible command line tools to start working with your new object storage server too.