Host S3 Compatible Storage on your Synology NAS with MinIO!
Is object storage something that you can only make use of to store backups and other files as needed when you use cloud storage? No, actually it isn’t. You can host your own cloud-like S3 storage on-premises at your home or wherever using free and open-source object storage. How? Check out the information below. I am going to step you guys through installing readily available object storage on your Synology NAS so you can use it to store files, backups, or anything else that can take advantage of S3 storage servers.
Table of contents
What is S3 storage?
When you think of S3 storage, you automatically think of Amazon Web Services (AWS) as they are the ones that developed and released the Simple Storage Service (S3). However, Amazon not only hosts its S3 solution, but they have released the specification of S3 so that other storage systems and solutions can use the same S3 API.
This allows tools and other solutions that were originally developed for Amazon S3 storage can work with S3 “compatible” storage. Vendors can offer similar S3 storage that is scalable and is the similar object storage ones can use in Amazon S3.
S3-compatible storage works well for organizations with hybrid cloud setups and data migration needs for distributed storage architectures.
Below is a high-level overview of the architecture of S3 compatible storage:
MinIO S3 compatible object storage
In case you have not heard about it before, MinIO is an open-source S3-compatible object storage solution that allows you to have S3 storage wherever you want to run it! Pretty cool. you can run this on-premises or in the cloud, or as we will see below, even on something like a Synology NAS device.
MinIO has a focus on simplicity, speed, and also reliability. It is capable of scaling up to petabytes of data for things like data lakes and other large storage of analytics data. You also have access to things like erasure coding, data protection , bitrot detection and data integrity services. Encryption is also built into the solution. It features the same API compatibility of the S3 API but allows you to use it in a self-managed and hosted way.
You can learn more about MinIO here: MinIO | S3 Compatible Storage for AI.
Install MinIO on your Synology NAS for S3 compatible object storage
Many folks that run home labs or just home networks in general have a NAS device used for storing files and other types of data. Did you know that you can run MinIO on your Synology NAS? Really on any NAS that supports running Docker containers as we can install MinIO using Docker.
Let’s walk through the steps. First login to your Synology and open Container Manager. Then search for minio.
When you click the minio container, you will be asked to choose the container. Here I am selecting the latest tag.
Now we have the latest image downloaded, but haven’t created the container yet. Let’s do that next.
Now we navigate to Container > Create. Then we select the image we want to use, minio, and name the container, then you can set resource limitations if you want and also enable auto-restart which I am doing here.
On the port settings, we add ports 9000 for API access which is important, and 9090 for web console access. On the volume settings, create a folder under your docker folder on your Synology volume and you can call this minio or whatever you like. Then map this to /data. Make sure access is read/write.
You can remove the default environment variables.
Add the following environment variables:
MINIO_ROOT_USER
MINIO_ROOT_PASSWORD
Below, I have set these in my configuration as an example.
Set the networking as you want in your environment. For most, you will want to choose bridge networking. Set the execution command to the following:
minio server /data --console-address ":9090"
On the summary screen, verify everything and then click Done.
Now, we see our minio container running. Make sure you don’t see the container crash or boot loop.
After the container is stable, browse out to your Synology IP or hostname and port 9090. You should see the following console login screen. Login with the root user and password you created in the environment variables.
Now we can do the similar things we would do in Amazon S3, create buckets and Access Keys.
Here you can see I am creating a new bucket called backups and the features you can enable, such as versioning, object locking (immutability) and quotas.
Access keys are familiar to most. You will create an Access key and a Secret key, synonomous with a username and password.
Wrapping up
As you can see, you don’t have to have Amazon S3 cloud storage to have an S3-compatible object storage that you host locally. Having S3-compatible storage around is a great tool as many solutions have built-in connectivity and interoperability with Amazon S3 or “S3 compatible” storage, like MinIO. MinIO is a great solution that you can download and use for free on your own hardware, like a Synology NAS or any other NAS device that allows running Docker containers.