2020-03-24 14:51:06 -07:00
# MinIO Multi-Tenant Deployment Guide [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Docker Pulls](https://img.shields.io/docker/pulls/minio/minio.svg?maxAge=604800)](https://hub.docker.com/r/minio/minio/)
2017-05-08 19:22:34 -07:00
2018-11-27 18:03:07 -08:00
This topic provides commands to set up different configurations of hosts, nodes, and drives. The examples provided here can be used as a starting point for other configurations.
2017-05-08 19:22:34 -07:00
2020-08-04 08:15:37 -07:00
1. [Standalone Deployment ](#standalone-deployment )
2. [Distributed Deployment ](#distributed-deployment )
2018-11-27 18:03:07 -08:00
3. [Cloud Scale Deployment ](#cloud-scale-deployment )
2022-02-11 16:51:25 -08:00
## 1. Standalone Deployment
2018-11-27 18:03:07 -08:00
2020-08-04 08:15:37 -07:00
To host multiple tenants on a single machine, run one MinIO Server per tenant with a dedicated HTTPS port, configuration, and data directory.
2018-11-27 18:03:07 -08:00
### 1.1 Host Multiple Tenants on a Single Drive
Use the following commands to host 3 tenants on a single drive:
2017-05-08 19:22:34 -07:00
```sh
2019-01-02 10:05:16 -08:00
minio server --address :9001 /data/tenant1
minio server --address :9002 /data/tenant2
minio server --address :9003 /data/tenant3
2017-05-08 19:22:34 -07:00
```
2017-06-29 11:41:21 -07:00
![Example-1 ](https://github.com/minio/minio/blob/master/docs/screenshots/Example-1.jpg?raw=true )
2017-05-08 19:22:34 -07:00
2018-11-27 18:03:07 -08:00
### 1.2 Host Multiple Tenants on Multiple Drives (Erasure Code)
Use the following commands to host 3 tenants on multiple drives:
2017-05-08 19:22:34 -07:00
```sh
2020-08-04 08:15:37 -07:00
minio server --address :9001 /disk{1...4}/data/tenant1
minio server --address :9002 /disk{1...4}/data/tenant2
minio server --address :9003 /disk{1...4}/data/tenant3
2017-05-08 19:22:34 -07:00
```
2018-11-27 18:03:07 -08:00
2017-06-29 11:41:21 -07:00
![Example-2 ](https://github.com/minio/minio/blob/master/docs/screenshots/Example-2.jpg?raw=true )
2017-05-08 19:22:34 -07:00
2022-02-11 16:51:25 -08:00
## 2. Distributed Deployment
2017-05-08 19:22:34 -07:00
2020-08-04 08:15:37 -07:00
To host multiple tenants in a distributed environment, run several distributed MinIO Server instances concurrently.
2017-05-08 19:22:34 -07:00
2018-11-27 18:03:07 -08:00
### 2.1 Host Multiple Tenants on Multiple Drives (Erasure Code)
Use the following commands to host 3 tenants on a 4-node distributed configuration:
2017-05-08 19:22:34 -07:00
```sh
2021-01-05 10:22:57 -08:00
export MINIO_ROOT_USER=< TENANT1_ACCESS_KEY >
export MINIO_ROOT_PASSWORD=< TENANT1_SECRET_KEY >
2020-08-04 08:15:37 -07:00
minio server --address :9001 http://192.168.10.1{1...4}/data/tenant1
2017-05-08 19:22:34 -07:00
2021-01-05 10:22:57 -08:00
export MINIO_ROOT_USER=< TENANT2_ACCESS_KEY >
export MINIO_ROOT_PASSWORD=< TENANT2_SECRET_KEY >
2020-08-04 08:15:37 -07:00
minio server --address :9002 http://192.168.10.1{1...4}/data/tenant2
2017-05-08 19:22:34 -07:00
2021-01-05 10:22:57 -08:00
export MINIO_ROOT_USER=< TENANT3_ACCESS_KEY >
export MINIO_ROOT_PASSWORD=< TENANT3_SECRET_KEY >
2020-08-04 08:15:37 -07:00
minio server --address :9003 http://192.168.10.1{1...4}/data/tenant3
2017-05-08 19:22:34 -07:00
```
2020-08-04 08:15:37 -07:00
**Note:** Execute the commands on all 4 nodes.
2018-09-10 17:14:40 -07:00
2018-11-27 18:03:07 -08:00
![Example-3 ](https://github.com/minio/minio/blob/master/docs/screenshots/Example-3.jpg?raw=true )
2018-09-10 17:14:40 -07:00
2021-05-17 08:45:22 -07:00
**Note**: On distributed systems, root credentials are recommend to be defined by exporting the `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` environment variables. If no value is set MinIO setup will assume `minioadmin/minioadmin` as default credentials. If a domain is required, it must be specified by defining and exporting the `MINIO_DOMAIN` environment variable.
2017-05-08 19:22:34 -07:00
2022-02-11 16:51:25 -08:00
## Cloud Scale Deployment
2017-05-08 19:22:34 -07:00
2022-09-28 23:28:45 -05:00
A container orchestration platform (e.g. Kubernetes) is recommended for large-scale, multi-tenant MinIO deployments. See the [MinIO Deployment Quickstart Guide ](https://min.io/docs/minio/container/index.html#quickstart-for-linux ) to get started with MinIO on orchestration platforms.