17 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Quickstart for Containers
minio
This procedure deploys a Single-Node Single-Drive <minio-installation-comparison>
MinIO server onto Docker or Podman for early development
and evaluation of MinIO Object Storage and its S3-compatible API
layer.
For instructions on deploying to production environments, see deploy-minio-distributed.
Prerequisites
- Podman or Docker installed.
- Read, write, and delete access to the folder or drive used for the persistent volume.
Procedure
- Start the container - Select a container type to view instructions to create the container. Instructions are available for either GNU/Linux and MacOS or for Windows. - Podman (Rootfull or Rootless) - These steps work for both rootfull and rootless containers. - GNU/Linux or MacOS - mkdir -p ~/minio/data podman run \ -p 9000:9000 \ -p 9001:9001 \ -v ~/minio/data:/data \ -e "MINIO_ROOT_USER=ROOTNAME" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - podman runstarts the container. The process is attached to the terminal session and ends when exiting the terminal.
- -pbinds a local port to a container port.
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data mirrors to the local path- ~/minio/data, allowing it to persist between container restarts. You can set any file path to which the user has read, write, and delete permissions to use.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 - Windows - podman run \ -p 9000:9000 \ -p 9001:9001 \ -v D:\minio\data:/data \ -e "MINIO_ROOT_USER=ROOTNAME" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - podman runstarts the container.
- -pbinds a local port to a container port.
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data mirrors to the local path- D:\minio\data, allowing it to persist between container restarts. You can set any file path to which the user has read, write, and delete permissions to use.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 - Docker (Rootfull) - GNU/Linux or MacOS - mkdir -p ~/minio/data docker run \ -p 9000:9000 \ -p 9001:9001 \ --name minio \ -v ~/minio/data:/data \ -e "MINIO_ROOT_USER=ROOTNAME" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - mkdircreates a new local directory at- ~/minio/datain your home directory.
- docker runstarts the MinIO container.
- -pbinds a local port to a container port.
- -namecreates a name for the container.
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data mirrors to the local path- ~/minio/data, allowing it to persist between container restarts. You can replace- ~/minio/datawith another local file location to which the user has read, write, and delete access.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 - Windows - docker run \ -p 9000:9000 \ -p 9001:9001 \ --name minio1 \ -v D:\minio\data:/data \ -e "MINIO_ROOT_USER=ROOTUSER" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - docker runstarts the MinIO container.
- -pbinds a local port to a container port.
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data mirrors to the local path- D:\minio\data, allowing it to persist between container restarts. You can replace- D:\minio\datawith another local file location to which the user has read, write, and delete access.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 - Docker (Rootless) - GNU/Linux or MacOS - mkdir -p ${HOME}/minio/data docker run \ -p 9000:9000 \ -p 9001:9001 \ --user $(id -u):$(id -g) \ --name minio1 \ -e "MINIO_ROOT_USER=ROOTUSER" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ -v ${HOME}/minio/data:/data \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - mkdircreates a new local directory at- ~/minio/datain your home directory.
- docker runstarts the MinIO container.
- -pbinds a local port to a container port.
- -usersets the username for the container to the policies for the current user and user group.
- -namecreates a name for the container.
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data actually writes to the local path- ~/minio/datawhere it can persist between container restarts. You can replace- ${HOME}/minio/datawith another location in the user's home directory to which the user has read, write, and delete access.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 - Windows - Prerequisite: - Windows Group Managed Service Account already defined.
 - docker run \ -p 9000:9000 \ -p 9001:9001 \ --name minio1 \ --security-opt "credentialspec=file://path/to/file.json" -e "MINIO_ROOT_USER=ROOTUSER" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ -v D:\data:/data \ quay.io/minio/minio server /data --console-address ":9001"- The example above works this way: - docker runstarts the MinIO container.
- -pbinds a local port to a container port.
- -namecreates a name for the container.
- --security-optgrants access to the container via a- credentialspecfile for a Group Managed Service Account (gMSA)
- -vsets a file path as a persistent volume location for the container to use. When MinIO writes data to- /data, that data actually writes to the local path- D:\datawhere it can persist between container restarts. You can replace- D:\datawith another local file location to which the user has read, write, and delete access.
- -esets the environment variables- MINIO_ROOT_USERand- MINIO_ROOT_PASSWORD, respectively. These set the- root user credentials <minio-users-root>. Change the example values to use for your container.
 
- Connect your Browser to the MinIO Server - Access the - minio-consoleby going to a browser and going to- http://127.0.0.1:9000or one of the Console addresses specified in the- minio servercommand's output. For example,- Console: http://192.0.2.10:9001 http://127.0.0.1:9001in the example output indicates two possible addresses to use for connecting to the Console.- While port - 9000is used for connecting to the API, MinIO automatically redirects browser access to the MinIO Console.- Log in to the Console with the credentials you defined in the - MINIO_ROOT_USERand- MINIO_ROOT_PASSWORDenvironment variables.- You can use the MinIO Console for general administration tasks like Identity and Access Management, Metrics and Log Monitoring, or Server Configuration. Each MinIO server includes its own embedded MinIO Console. - For more information, see the - minio-consoledocumentation.
- (Optional) Install the MinIO Client - The - MinIO Client <minio-client>allows you to work with your MinIO volume from the commandline.- Select your operating system for instructions. - GNU/Linux - The - MinIO Client <minio-client>allows you to work with your MinIO server from the commandline.- Download the - mcclient and install it to a location on your system- PATHsuch as- /usr/local/bin. You can alternatively run the binary from the download location.- wget https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/mc- Use - mc alias setto create a new alias associated to your local deployment. You can run- mccommands against this alias:- mc alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD} mc admin info local- Replace - {MINIO_ROOT_USER}and- {MINIO_ROOT_PASSWORD}with the credentials you defined for the container with the- -eflags.- The - mc alias settakes four arguments:- The name of the alias
- The hostname or IP address and port of the MinIO server
- The Access Key for a MinIO user <minio-users>
- The Secret Key for a MinIO user <minio-users>
 - For additional details about this command, see - alias.- MacOS - The - MinIO Client <minio-client>allows you to work with your MinIO volume from the commandline.- Homebrew - Run the following command to install the latest stable MinIO Client package using Homebrew. - brew install minio/stable/mc- Binary (arm64) - Run the following commands to install the latest stable MinIO Client package using a binary package for Apple chips. - curl -O https://dl.min.io/client/mc/release/darwin-arm64/mc chmod +x mc sudo mv mc /usr/local/bin/mc- Binary (amd64) - Run the following commands to install the latest stable MinIO Client package using a binary package for Intel chips. - curl -O https://dl.min.io/client/mc/release/darwin-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/mc- Use - mc alias setto quickly authenticate and connect to the MinIO deployment.- mc alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD} mc admin info local- Replace - {MINIO_ROOT_USER}and- {MINIO_ROOT_PASSWORD}with the credentials you defined for the container with the- -eflags.- The - mc alias settakes four arguments:- The name of the alias
- The hostname or IP address and port of the MinIO server
- The Access Key for a MinIO user <minio-users>
- The Secret Key for a MinIO user <minio-users>
 - For additional details about this command, see - alias.- Windows - Download the standalone MinIO server for Windows from the following link: - https://dl.min.io/client/mc/release/windows-amd64/mc.exe - Double click on the file to run it. Or, run the following in the Command Prompt or PowerShell. - \path\to\mc.exe --help- Use - mc alias setto quickly authenticate and connect to the MinIO deployment.- mc.exe alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD} mc.exe admin info local- Replace - {MINIO_ROOT_USER}and- {MINIO_ROOT_PASSWORD}with the credentials you defined for the container with the- -eflags.- The - mc alias settakes four arguments:- The name of the alias
- The hostname or IP address and port of the MinIO server
- The Access Key for a MinIO user <minio-users>
- The Secret Key for a MinIO user <minio-users>
 - For additional details about this command, see - alias.
section-next-steps
Next Steps
- Connect your applications to MinIO <minio-drivers>
- Configure Object Retention <minio-object-retention>
- Configure Security <minio-authentication-and-identity-management>
- Deploy MinIO in a Distributed Environment <deploy-minio-distributed>

