Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

MinIO Server (minio)

The minio command line executable starts either the MinIO Object Storage process or the MinIO Gateway process.

MinIO Server

The minio server command starts the MinIO server process:

minio server /mnt/disk{1...4}

For examples of deploying minio server on a bare metal environment, see Installation.

For examples of deploying minio server on a Kubernetes environment, see Kubernetes documentation.

Configuration Settings

The minio server process stores its configuration in the storage backend directory. You can modify configuration options using the mc admin config command.

Syntax

Starts the minio server process.

The command has the following syntax:

minio server [FLAGS] HOSTNAME/DIRECTORIES [HOSTNAME/DIRECTORIES..]

The command accepts the following arguments:

HOSTNAME

The hostname of a minio server process.

For standalone deployments, this field is optional. You can start a standalone server process with only the DIRECTORIES argument.

For distributed deployments, specify the hostname of each minio server in the deployment. The group of minio server processes represent a single Server Pool.

HOSTNAME supports MinIO expansion notation {x...y} to denote a sequential series of hostnames. MinIO requires sequential hostnames to identify each minio server process in the set.

For example, https://minio{1...4}.example.net expands to:

  • https://minio1.example.net

  • https://minio2.example.net

  • https://minio3.example.net

  • https://minio4.example.net

You must run the minio server command with the same combination of HOSTNAME and DIRECTORIES on each host in the Server Pool.

Each additional HOSTNAME/DIRECTORIES pair denotes an additional Server Set for the purpose of horizontal expansion of the MinIO deployment. For more information on Server Pools, see Server Pool.

DIRECTORIES

The directories or drives the minio server process uses as the storage backend.

DIRECTORIES supports MinIO expansion notation {x...y} to denote a sequential series of folders or drives. For example, /mnt/disk{1...4} expands to:

  • /mnt/disk1

  • /mnt/disk2

  • /mnt/disk3

  • /mnt/disk4

The DIRECTORIES path(s) must be empty when first starting the minio process.

The minio server process requires at least 4 drives or directories to enable erasure coding.

Important

MinIO recommends locally-attached drives, where the DIRECTORIES path points to each disk on the host machine. MinIO recommends against using network-attached storage, as network latency reduces performance of those drives compared to locally-attached storage.

For development or evaluation, you can specify multiple logical directories or partitions on a single physical volume to enable erasure coding on the deployment.

For production environments, MinIO does not recommend using multiple logical directories or partitions on a single physical disk. While MinIO supports those configurations, the potential cost savings come at the risk of decreased reliability.

--address

Optional Binds the minio server process to a specific network address and port number. Specify the address and port as ADDRESS:PORT, where ADDRESS is an IP address or hostname and PORT is a valid and open port on the host system.

To change the port number for all IP addresses or hostnames configured on the host machine, specify :PORT where PORT is a valid and open port on the host.

If omitted, minio binds to port 9000 on all configured IP addresses or hostnames on the host machine.

--certs-dir, ---S

Optional Specifies the path to the folder containing certificates the minio process uses for configuring TLS/SSL connectivity.

Omit to use the default directory paths:

  • Linux/OSX: ${HOME}/.minio/certs

  • Windows: %%USERPROFILE%%\.minio\certs.

See MinIO Transport Layer Security for more information on TLS/SSL connectivity.

--quiet

Optional Disables startup information.

--anonymous

Optional Hides sensitive information from logging.

--json

Optional Outputs server logs and startup information in JSON format.

MinIO Gateway

Syntax

Starts the MinIO Gateway process.

The command has the following syntax:

minio gateway [FLAGS] SUBCOMMAND [ARGUMENTS]

minio gateway supports the following flags:

--address

Optional Binds the MinIO Gateway to a specific network address and port number. Specify the address and port as ADDRESS:PORT, where ADDRESS is an IP address or hostname and PORT is a valid and open port on the host system.

To change the port number for all IP addresses or hostnames configured on the host machine, specify :PORT where PORT is a valid and open port on the host.

--certs-dir, ---S

Optional Specifies the path to the folder containing certificates the MinIO Gateway process uses for configuring TLS/SSL connectivity.

Omit to use the default directory paths:

  • Linux/OSX: ${HOME}/.minio/certs

  • Windows: %%USERPROFILE%%\.minio\certs.

See MinIO Transport Layer Security for more information on TLS/SSL connectivity.

--quiet

Optional Disables startup information.

--anonymous

Optional Hides sensitive information from logging.

--json

Optional Outputs server logs and startup information in JSON format.

minio gateway supports the following subcommands:

minio gateway nas

Creates a MinIO Gateway process configured for Network-Attached Storage (NAS).

minio gateway azure

Creates a MinIO Gateway process configured for Microsoft Azure Blob Storage.

minio gateway s3

Creates a MinIO Gateway process configured for Amazon Simple Storage Service (S3).

minio gateway hdfs

Creates a MinIO Gateway process configured for Hadoop Distributed File System (HDFS).

minio gateway gcs

Creates a MinIO Gateway process configured for Google Cloud Storage.

Environment Variables

The minio server and minio gateway processes can use the following environment variables when creating its configuration settings:

Root Credentials

MINIO_ACCESS_KEY

The access key for the root user.

Warning

If MINIO_ACCESS_KEY is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ACCESS_KEY value for all environments.

MINIO_SECRET_KEY

The secret key for the root user.

Warning

If MINIO_SECRET_KEY is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ACCESS_KEY value for all environments.

MINIO_ACCESS_KEY_OLD

Used for rotating the root user access key.

Restart the minio server process with all of the following environment variables to rotate the root credentials:

The minio server process automatically detects and re-encrypts the server configuration with the new credentials. After the process restarts successfully, you can restart it without MINIO_ACCESS_KEY_OLD.

MINIO_SECRET_KEY_OLD

Used for rotating the root user secret key.

Restart the minio server process with all of the following environment variables to rotate the root credentials:

The minio server process automatically detects and re-encrypts the server configuration with the new credentials. After the process restarts successfully, you can restart it without MINIO_SECRET_KEY_OLD.

Storage Class

These environment variables configure the parity to use for objects written to the MinIO cluster.

MinIO Storage Classes are distinct from AWS Storage Classes, where the latter refers to the specific storage tier on which to store a given object.

MINIO_STORAGE_CLASS_STANDARD

The number of parity blocks to create for objects with the standard (default) storage class. MinIO uses the EC:N notation to refer to the number of parity blocks (N). This environment variable only applies to deployments with Erasure Coding enabled.

Defaults to 4.

MINIO_STORAGE_CLASS_REDUCED

The number of parity blocks to create for objects with the reduced redundancy storage class. MinIO uses the EC:N notation to refer to the number of parity blocks (N). This environment variable only applies to deployments with Erasure Coding enabled.

Defaults to 2.

MINIO_STORAGE_CLASS_COMMENT

Adds a comment to the storage class settings.