Force admin credentials (access and secret key) to be reconfigured every time they change in the secrets: false: accessKey.password: MinIO® Access Key. Ignored if existing secret is provided. Random 10 character alphanumeric string: accessKey.forcePassword: Force users to specify an Access Key: false: secretKey.password: MinIO® Secret Key. This will spit out a long random string. Copy it and paste it in the first following command, and set the second one to whatever you’d like: $ export MINIOSECRETKEY=yourlongrandomstringhere $ export MINIOACCESSKEY=loginname Similarly, let’s go ahead and set the root login the same way. MINIOERASURESETDRIVECOUNT=4 MINIOACCESSKEY= MINIOSECRETKEY= MINIOKMSAUTOENCRYPTION=on MINIOKMSMASTERKEY=my-minio-key: Specifications. Before running any tests, we would like to ensure that the underlying hardware is healthy and can generate and sustain sufficient I/O to make the best use of the MinIO cluster. MinIO Custom Access and Secret Keys using Docker secrets To override MinIO's auto-generated keys, you may pass secret and access keys explicitly by creating access and secret keys as Docker secrets. MinIO server also allows regular strings as access and secret keys.
- Minio Generate Random Access Key Codes
- Minio Generate Random Access Keyword
- Minio Generate Random Access Keyboard
- Minio Generate Random Access Key
- Minio Generate Random Access Key Code
MinIO Client (mc) provides admin
sub-command to perform administrative tasks on your MinIO deployments.
1. Download MinIO Client
Docker Stable
Docker Edge
Homebrew (macOS)
Install mc packages using Homebrew
Binary Download (GNU/Linux)
Platform | Architecture | URL |
---|---|---|
GNU/Linux | 64-bit Intel | https://dl.min.io/client/mc/release/linux-amd64/mc |
64-bit PPC | https://dl.min.io/client/mc/release/linux-ppc64le/mc |
Binary Download (Microsoft Windows)
Platform | Architecture | URL |
---|---|---|
Microsoft Windows | 64-bit Intel | https://dl.min.io/client/mc/release/windows-amd64/mc.exe |
Install from Source
Source installation is intended only for developers and advanced users. mc update
command does not support update notifications for source based installations. Please download official releases from https://min.io/download/#minio-client.
If you do not have a working Golang environment, please follow How to install Golang.
2. Run MinIO Client
GNU/Linux
macOS
Microsoft Windows
3. Add a MinIO Storage Service
MinIO server displays URL, access and secret keys.
Usage
Keys must be supplied by argument or standard input.
is simply a short name to your MinIO service. MinIO end-point, access and secret keys are supplied by your MinIO service. Admin API uses 'S3v4' signature and cannot be changed.
Examples
Keys by argument
Keys by prompt
Keys by pipe
4. Test Your Setup
Example:
Minio Generate Random Access Key Codes
Get MinIO server information for the configured alias minio
5. Everyday Use
You may add shell aliases for info, healing.
6. Global Options
Option [--debug]
Debug option enables debug output to console.
Example: Display verbose debug output for info
command.
Option [--json]
JSON option enables parseable output in JSON lines format.
Example: MinIO server information.
Option [--no-color]
This option disables the color theme. It is useful for dumb terminals.
Option [--quiet]
Quiet option suppress chatty console output.
Option [--config-dir]
Use this option to set a custom config path.
Option [ --insecure]
Skip SSL certificate verification.
7. Commands
Commands |
---|
service - restart and stop all MinIO servers |
update - updates all MinIO servers |
info - display MinIO server information |
user - manage users |
group - manage groups |
policy - manage canned policies |
config - manage server configuration file |
heal - heal disks, buckets and objects on MinIO server |
profile - generate profile data for debugging purposes |
top - provide top like statistics for MinIO |
trace - show http trace for MinIO server |
console - show console logs for MinIO server |
prometheus - manages prometheus config settings |
bucket - manages buckets defined in the MinIO server |
Command update
- updates all MinIO servers
update
command provides a way to update all MinIO servers in a cluster. You can also use a private mirror server with update
command to update your MinIO cluster. This is useful in cases where MinIO is running in an environment that doesn't have Internet access.
Example: Update all MinIO servers.
Steps to update MinIO using a private mirror
For using update
command with private mirror server, you need to mirror the directory structure on https://dl.minio.io/server/minio/release/linux-amd64/
on your private mirror server and then provide:
NOTE:
- An alias pointing to a distributed setup this command will automatically update all MinIO servers in the cluster.
update
is a disruptive operation for your MinIO service, any on-going API operations will be forcibly canceled. So, it should be used only when you are planning MinIO upgrades for your deployment.- It is recommended to perform a restart after
update
successfully completes.
Command service
- restart and stop all MinIO servers
service
command provides a way to restart and stop all MinIO servers.
NOTE:
- An alias pointing to a distributed setup this command will automatically execute the same actions across all servers.
restart
andstop
sub-commands are disruptive operations for your MinIO service, any on-going API operations will be forcibly canceled. So, it should be used only under administrative circumstances. Please use it with caution.
Example: Restart all MinIO servers.
Command info
- Display MinIO server information
info
command displays server information of one or many MinIO servers (under distributed cluster)
Example: Display MinIO server information.
Command policy
- Manage canned policies
policy
command to add, remove, list policies, get info on a policy and to set a policy for a user on MinIO server.
Example: List all canned policies on MinIO.
Example: Add a new policy 'listbucketsonly' on MinIO, with policy from /tmp/listbucketsonly.json.
When this policy is applied on a user, that user can only list the top layer buckets, but nothing else, no prefixes, no objects.
First create the json file, /tmp/listbucketsonly.json, with the following information.
Add the policy as 'listbucketsonly' to the policy database
Example: Remove policy 'listbucketsonly' on MinIO.
Example: Show info on a canned policy, 'writeonly'
Example: Set the canned policy.'writeonly' on a user or group
Command user
- Manage users
user
command to add, remove, enable, disable, list users on MinIO server.
Example: Add a new user 'newuser' on MinIO.
Example: Add a new user 'newuser' on MinIO, using standard input.
Example: Disable a user 'newuser' on MinIO.
Example: Enable a user 'newuser' on MinIO.
Example: Remove user 'newuser' on MinIO.
Example: List all users on MinIO.
Example: Display info of a user
Command group
- Manage groups
group
command to add, remove, info, list, enable, disable groups on MinIO server.
Example: Add a pair of users to a group 'somegroup' on MinIO.
Group is created if it does not exist.
Example: Remove a pair of users from a group 'somegroup' on MinIO.
Example: Remove a group 'somegroup' on MinIO.
Only works if the given group is empty.
Example: Get info on a group 'somegroup' on MinIO.
Example: List all groups on MinIO.
Example: Enable a group 'somegroup' on MinIO.
Example: Disable a group 'somegroup' on MinIO.
Command config
- Manage server configuration
config
command to manage MinIO server configuration.
Example: Get 'etcd' sub-system configuration.
Example: Set specific settings on 'etcd' sub-system.
Example: Get entire server configuration of a MinIO server/cluster.
Example: Set entire server configuration of a MinIO server/cluster.
Command heal
- Heal disks, buckets and objects on MinIO server
Healing is automatic on server side which runs on a continuous basis on a low priority thread, mc admin heal
is deprecated and will be removed in future.
Command profile
- generate profile data for debugging purposes
Start CPU profiling
Command top
- provide top like statistics for MinIO
NOTE: This command is only applicable for a distributed MinIO setup. It is not supported on single node and gateway deployments.
Example: Get a list of the 10 oldest locks on a distributed MinIO cluster, where 'myminio' is the MinIO cluster alias.
Command trace
- Show http trace for MinIO server
trace
command displays server http trace of one or all MinIO servers (under distributed cluster)
Example: Display MinIO server http trace.

Command console
- show console logs for MinIO server
console
command displays server logs of one or all MinIO servers (under distributed cluster)
Example: Display MinIO server http trace.
Command prometheus
- Manages prometheus config settings
generate
command generates the prometheus config (To be pasted in prometheus.yml
)
Example: Generates prometheus config for an .
Command kms
- perform KMS management operations
The kms
command can be used to perform KMS management operations.
The key
sub-command can be used to perform master key management operations.
Example: Display status information for the default master key
Example: Create a new master key at the KMS
Example: Display status information for one particular master key
Command quota
- Set/Get bucket quota
quota
command to set or get bucket quota on MinIO server.
Example: List bucket quota on bucket 'mybucket' on MinIO.
Example: Set a hard bucket quota of 64Mb for bucket 'mybucket' on MinIO.
Example: Reset bucket quota configured for bucket 'mybucket' on MinIO.
Command remote
- configure remote target buckets
remote
command manages remote bucket targets on MinIO server.
Minio Generate Random Access Keyword
Example: Add a new replication target targetbucket
in region us-west-1
on https://minio2:9000
for bucket srcbucket
on MinIO server. foobar
and foo12345
are credentials to target endpoint.
Example: Add a new replication target targetbucket
in region us-west-1
on https://minio2:9000
for bucket srcbucket
on MinIO server. foobar
and foo12345
are credentials to target endpoint. The max bandwidth is metric 2G (210^9). Enable synchronous replication to this target, set healthcheck duration for checking target availability to 100 seconds*
Example: Add a new replication target targetbucket
in region us-west-1
on https://minio2:9000
for bucket srcbucket
on MinIO server. foobar
and foo12345
are credentials to target endpoint. The max bandwidth is IEC 2Gi (22^30)*
Example: Get remote target for replication on bucket 'srcbucket' in MinIO.
Example: List remote target(s) on bucket 'srcbucket' in MinIO.
Example: List remote target(s) on MinIO.
Example: Remove bucket target configured for bucket 'srcbucket' on MinIO with arn arn:minio:replication:us-west-1:1f8712ba-e38f-4429-bcb1-a7bb5aa97447:targetbucket
.
Blobs are a common abstraction for storing unstructured data on Cloud storageservices and accessing them via HTTP. This guide shows how to work withblobs in the Go CDK.
The blob
package supports operations like reading and writing blobs (using standardio
package interfaces), deleting blobs, and listing blobs in a bucket.
Subpackages contain driver implementations of blob for various services,including Cloud and on-prem solutions. You can develop your applicationlocally using fileblob
, then deploy it to multiple Cloud providers withminimal initialization reconfiguration.
Opening a Bucket🔗
The first step in interacting with unstructured storage isto instantiate a portable *blob.Bucket
for your storage service.
The easiest way to do so is to use blob.OpenBucket
and a service-specific URLpointing to the bucket, making sure you “blank import” the driver package tolink it in.
Minio Generate Random Access Keyboard
See Concepts: URLs for general background and the guide below for URL usagefor each supported service.
Alternatively, if you needfine-grained control over the connection settings, you can call the constructorfunction in the driver package directly.
You may find the wire
package useful for managing your initialization codewhen switching between different backing services.
See the guide below for constructor usage for each supported service.
Prefixed Buckets🔗
You can wrap a *blob.Bucket
to always operate on a subfolder of the bucketusing blob.PrefixedBucket
:
Alternatively, you can configure the prefix directly in the blob.OpenBucket
URL:
Using a Bucket🔗
Once you have opened a bucket for the storage provider you want, you canstore and access data from it using the standard Go I/O patterns describedbelow. Other operations like listing and reading metadata are documented in theblob
package documentation.
Writing Data to a Bucket🔗
To write data to a bucket, you create a writer, write data to it, and thenclose the writer. Closing the writer commits the write to the provider,flushing any buffers, and releases any resources used while writing, so youmust always check the error of Close
.
The writer implements io.Writer
, so you can use any functions that takean io.Writer
like io.Copy
or fmt.Fprintln
.

Minio Generate Random Access Key
In some cases, you may want to cancel an in-progress write to avoid the blobbeing created or overwritten. A typical reason for wanting to cancel a writeis encountering an error in the stream your program is copying from. To aborta write, you cancel the Context
you pass to the writer. Again, you mustalways Close
the writer to release the resources, but in this case you canignore the error because the write’s failure is expected.
Reading Data from a Bucket🔗
Once you have written data to a bucket, you can read it back by creating areader. The reader implements io.Reader
, so you can use any functionsthat take an io.Reader
like io.Copy
or io/ioutil.ReadAll
. You mustalways close a reader after using it to avoid leaking resources.
Many storage providers provide efficient random-access to data in buckets. Tostart reading from an arbitrary offset in the blob, use NewRangeReader
.
Deleting a Bucket🔗
You can delete blobs using the Bucket.Delete
method.
Other Usage Samples🔗
Supported Storage Services🔗
Google Cloud Storage🔗
Google Cloud Storage (GCS) URLs in the Go CDK closely resemble the URLsyou would see in the gsutil
CLI.
blob.OpenBucket
will use Application Default Credentials; if you haveauthenticated via gcloud auth login
, it will use those credentials. SeeApplication Default Credentials to learn about authenticationalternatives, including using environment variables.
Full details about acceptable URLs can be found under the API reference forgcsblob.URLOpener
.
GCS Constructor🔗
The gcsblob.OpenBucket
constructor opens a GCS bucket. You must firstcreate a *net/http.Client
that sends requests authorized by Google CloudPlatform credentials. (You can reuse the same client for anyother API that takes in a *gcp.HTTPClient
.) You can find functions in thegocloud.dev/gcp
package to set this up for you.
S3🔗
S3 URLs in the Go CDK closely resemble the URLs you would see in the AWS CLI.You should specify the region
query parameter to ensure your applicationconnects to the correct region.
blob.OpenBucket
will create a default AWS Session with theSharedConfigEnable
option enabled; if you have authenticated with the AWS CLI,it will use those credentials. See AWS Session to learn about authenticationalternatives, including using environment variables.
Full details about acceptable URLs can be found under the API reference fors3blob.URLOpener
.
S3 Constructor🔗
The s3blob.OpenBucket
constructor opens an S3 bucket. You must firstcreate an AWS session with the same region as your bucket:
S3-Compatible Servers🔗
The Go CDK can also interact with S3-compatible storage servers thatrecognize the same REST HTTP endpoints as S3, like Minio, Ceph, orSeaweedFS. You can change the endpoint by changing the Endpoint
fieldon the *aws.Config
you pass to s3blob.OpenBucket
. If you are usingblob.OpenBucket
, you can switch endpoints by using the S3 URL using queryparameters like so:
See aws.ConfigFromURLParams
for more details on supported URL options for S3.
Minio Generate Random Access Key Code
Azure Blob Storage🔗
Azure Blob Storage URLs in the Go CDK allow you to identify Azure Blob Storage containerswhen opening a bucket with blob.OpenBucket
. Go CDK uses the environmentvariables AZURE_STORAGE_ACCOUNT
, AZURE_STORAGE_KEY
, andAZURE_STORAGE_SAS_TOKEN
to configure the credentials. AZURE_STORAGE_ACCOUNT
is required, along with one of the other two.

Full details about acceptable URLs can be found under the API reference forazureblob.URLOpener
.
Azure Blob Constructor🔗
The azureblob.OpenBucket
constructor opens an Azure Blob Storage container.azureblob
operates on Azure Storage Block Blobs. You must first createAzure Storage credentials and then create an Azure Storage pipeline beforeyou can open a container.
Local Storage🔗
The Go CDK provides blob drivers for storing data in memory and on the localfilesystem. These are primarily intended for testing and local development,but may be useful in production scenarios where an NFS mount is used.
Local storage URLs take the form of either mem://
or file:///
URLs.Memory URLs are always mem://
with no other information and always create anew bucket. File URLs convert slashes to the operating system’s native fileseparator, so on Windows, C:foobar
would be written asfile:///C:/foo/bar
.
Local Storage Constructors🔗
You can create an in-memory bucket with memblob.OpenBucket
:
You can use a local filesystem directory with fileblob.OpenBucket
: