Minio is an object storage server, released under Apache License v2.0, that is compatible with the Amazon S3 cloud storage service. Minio is best suited for storing unstructured data such as photos, videos, log files, backups, and container / VM images. The size of an object can range from a few kilobytes to a maximum of 5TB. Minio Server is light enough to be bundled with an application stack similar to NodeJS, Redis, and MySQL. Minio also provides a client that communicates with the server to store and retrieve objects.
This quickstart guide describes how to quickly install and run Minio Server locally. These are the steps you will follow:
- Open a Firewall Port
- Install and run the Minio Server
- Test Using the Minio Web-based Object Browser
- Identify the Endpoint, Access Key, and Secret Key
- Test using Minio Client
By default, Minio uses port 9000 to listen for incoming connections. If your platform blocks the port by default, you may need to enable access to the port. Use one of the following methods to allow port access:
For hosts with iptables
enabled (RHEL, CentOS, etc), use iptables
to enable all traffic coming into specific ports. The following command allows access to port 9000:
iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
service iptables restart
The following command enables all incoming traffic to ports 9000 through 9010:
iptables -A INPUT -p tcp --dport 9000:9010 -j ACCEPT
service iptables restart
For hosts with ufw
enabled (Debian-based distributions), use ufw
to allow traffic on specific ports. The following command allows access to port 9000:
ufw allow 9000
The following command enables all incoming traffic to ports 9000 through 9010:
ufw allow 9000:9010/tcp
For hosts with firewall-cmd
enabled (CentOS), use firewall-cmd
to allow traffic to specific ports. The following command sequence allows access to port 9000.
This command gets the active zones:
firewall-cmd --get-active-zones
Apply port rules to the relevant zones returned by the previous command. For example, if the zone is public
, use the following command:
firewall-cmd --zone=public --add-port=9000/tcp --permanent
Note: --permanent
ensures the rules are persistent across a start, restart, or reload of the firewall.
Specify --reload
with firewall-cmd
for the changes to take effect:
firewall-cmd --reload
Use one of the following methods to install and run Minio Server locally:
Install the server:
docker pull minio/minio
Run the server on port 9000 and store data in a local folder named /data:
docker run -p 9000:9000 minio/minio server /data
Install the server:
docker pull minio/minio:edge
Run the server on port 9000 and store data in a local folder named /data:
docker run -p 9000:9000 minio/minio:edge server /data
Note: Docker will not display the autogenerated keys unless you start the container with the -it
(interactive TTY) argument. Generally, it is not recommended that you use autogenerated keys with containers. See the Minio Docker Quickstart Guide for more information.
Install the Minio server package using Homebrew:
brew install minio/stable/minio
Run the server on port 9000 and store data in a local folder named /data:
minio server /data
Note: If you previously installed minio
using brew install minio
, it is recommended that you reinstall minio
from the official minio/stable/minio
repository instead.
brew uninstall minio
brew install minio/stable/minio
Platform | URL |
---|---|
Apple macOS | https://dl.minio.io/server/minio/release/darwin-amd64/minio |
Allow all users to read and execute minio
:
chmod 755 minio
Run the server on port 9000 and store data in a local folder named /data:
./minio server /data
Platform | URL |
---|---|
GNU/Linux | https://dl.minio.io/server/minio/release/linux-amd64/minio |
Download the binary and make it into an executable:
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x minio
Run the server on port 9000 and store data in a local folder named /data:
./minio server /data
Platform | URL |
---|---|
Microsoft Windows | https://dl.minio.io/server/minio/release/windows-amd64/minio.exe |
Run the server on port 9000 and store data in a local folder on the D:\Photos:
minio.exe server D:\Photos
Install Minio packages using pkg:
pkg install minio
Configure Minio variables to enable Minio and store data in a local folder named /home/user/Photos:
sysrc minio_enable=yes
sysrc minio_disks=/home/user/Photos
Run the server on the default port (9000):
service minio start
Installing Minio from the source repository on GitHub is only intended for developers and advanced users. If you do not have a working Golang environment, see How to install Golang.
Install Minio Server using Golang:
go get -u github.com/minio/minio
If Minio Server has started successfully, it will display an embedded web-based object browser. Navigate your web browser to http://127.0.0.1:9000 and ensure that the following screen is displayed:
Once the server is running you should see a response similar to this one:
Endpoint: http://192.168.0.15:9000 http://127.0.0.1:9000
AccessKey: 6BRHR38FJ1TWH54QGKO2
SecretKey: 1PiWZf9hJVpjZkbhnfdDdE7SFAem__v0DghNJNdk
Browser Access:
http://192.168.0.15:9000 http://127.0.0.1:9000
Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
$ mc config host add myminio http://192.168.0.15:9000 6BRHR38FJ1TWH54QGKO2 1PiWZf9hJVpjZkbhnfdDdE7SFAem__v0DghNJNdk
...
From the output, identify the endpoint, access key, secret key, browser URLs and ports, and the client command necessary to add the server to the list of hosts accessible by the client. This information will be used when testing with Minio Client.
Minio Client is a command-line tool called mc
that provides UNIX-like commands for interacting with the server (e.g. ls
, cat
, cp
, mirror
, diff
, find
, etc.). mc
supports file systems and Amazon S3-compatible cloud storage services (AWS Signature v2 and v4).
Test mc
with the server using the instructions in the Minio Client Quickstart Guide
- Minio Erasure Code QuickStart Guide
- Use
mc
with Minio Server - Use
aws-cli
with Minio Server - Use
s3cmd
with Minio Server - Use
minio-go
SDK with Minio Server - The Minio documentation website
Follow the instructions in the Minio Contributor's Guide.