Do you want to setup your private S3 compatible Object storage server?. Minio is a lightweight object storage server compatible with Amazon S3 cloud storage service. Minio is written in Go and licensed under Apache License v2.0.

minio s3 object storage server

Object storage is best suited for storing unstructured data such as videos, photos, log files, container images, VM images, and backups. Each size of an object can range from a few KBs to a maximum of 5TB.

How to Install Minio Object Storage Server on Linux

Minio object storage server can be installed from a binary file or by running it in a container. I won’t do container installation because it is not an ideal way of setting up a storage server.

Step 1: Download Minio

Download Minio binary.

chmod +x minio
sudo mv minio /usr/local/bin/

You can query package details using version option.

$ minio  version
Version: 2019-01-23T23:18:58Z
Release-Tag: RELEASE.2019-01-23T23-18-58Z
Commit-ID: bd25f31100f44646cffae99dfec23179366593e2

Step 2: Prepare Object Storage disk

After Minio is downloaded, let’s prepare a block device that we’ll use to store objects. The path used can just be a directory inside your file system root.

For convenience and reliability, I’m using a secondary disk in my server.

# lsblk  | grep sdb
sdb 8:16 0 10G 0 disk

I’ll create a new partition and mount this disk to /data directory.

sudo parted -s -a optimal -- /dev/sdb mklabel gpt
sudo parted -s -a optimal -- /dev/sdb mkpart primary 0% 100%
sudo parted -s -- /dev/sdb align-check optimal 1
sudo mkfs.ext4 /dev/sdb1
echo "/dev/sdb1 /data ext4 defaults 0 0" | sudo tee -a /etc/fstab
sudo mkdir /data
sudo mount -a

Confirm disk mount

$ df -h | grep /data
/dev/sdb1 9.8G 37M 9.3G 1% /data

Step 3: Start Minio service

You have three options of starting a Minio Server.

  • From command line – interactive session
  • Using Systemd
  • Using Sysvinit / Upstart

Managing Minio Service with systemd

For guys running a system with systemd init system, create a user and group for running Minio service.

sudo groupadd --system minio
sudo useradd -s /sbin/nologin --system -g minio minio

Give minio user ownership for the /data directory.

sudo chown -R minio:minio /data/

Create systemd service unit file for Minio.

sudo vim /etc/systemd/system/minio.service

Add below contents to the file.



ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"

ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES

# Let systemd restart this service always

# Specifies the maximum file descriptor number that can be opened by this process

# Disable timeout logic and wait until process is stopped


Create Minio environment file /etc/default/minio

sudo mkdir -p /etc/default/

cat <<EOF | sudo tee /etc/default/minio
# Volume to be used for Minio server.
# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :9000"
# Access Key of the server.
# Secret key of the server.

MINIO_ACCESS_KEY: Access key of minimum 3 characters in length.

MINIO_SECRET_KEY: Secret key of minimum 8 characters in length.

Reload systemd and start minio service

sudo systemctl daemon-reload
sudo systemctl start minio

A check on status should show running.

setup minio object storage server 01

You can also set the service to start on boot.

sudo systemctl enable minio

Step 4: Configure Firewall

If you have an active firewall service, allow port 9000.

For UFW, use:

sudo ufw allow 9000

For firewalld, use:

sudo firewall-cmd --zone=public --add-port=9000/tcp --permanent
sudo firewall-cmd --reload

Step 5: Access Minio Web interface

Now that we have installed Minio, started the service and configured firewall, we can visit the web dashboard URL to finish login and create the first test bucket.

Visit the URL http://[serverip|localhost]:9000 from your browser and login with the configured Access and Secret key.

setup minio object storage server 02

On logging, you should get to an object web interface which looks similar to below.

setup minio object storage server 03

You can create a test bucket from the UI by clicking on the “+” button at the right bottom corner.

setup minio object storage server 04

Provide bucket name and press enter key.

setup minio object storage server 05

Step 6: Test Minio with mc client

mc provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. Download mc to your Linux.

chmod +x mc
sudo mv mc /usr/local/bin
mc --help

Setup autocompletion

sudo wget
sudo mv bash_autocomplete /etc/bash_completion.d/mc
source /etc/bash_completion.d/mc

And enjoy tab completion feature.

$ mc <TAB>

Configure mc for Minio:



mc config host add minio BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12 --api S3v4

Sample output:

setup minio object storage server 06

Follow the complete guide on Use mc with Minio Server to get started with mc.

You can also explore further like using AWS CLI, s3cmd e.t.c.

See How to Install and Use AWS CLI on Linux – Ubuntu / Debian / CentOS


Minio Documentation

Also check:

How to Install Ceph Storage Cluster on Ubuntu 18.04 LTS

Setup GlusterFS Storage With Heketi on CentOS 8 / CentOS 7


  • How can I setup Object storage server on Linux
  • S3 Object storage server setup on Ubuntu / Debian / CentOS
  • Minio Object Storage server
  • Setup S3 Compatible Object Storage Server with Minio

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here