mc alias set

Sets a user or service alias.

NOTE By default, the API server uses https:// for URLS. To make https:// work, run:
cp /opt/mapr/conf/ca/chain-ca.pem to the user's ~/.mc/certs/CAs/ directory



  --path value                  bucket path lookup supported by the server. Valid options are '[auto, on, off]' (default: "auto")
  --api value                   API signature. Valid options are '[S3v4, S3v2]'
  --config-dir value, -C value  path to configuration folder (default: "/root/.mc")
  --quiet, -q                   disable progress bar display
  --no-color                    disable color theme
  --json                        enable JSON lines formatted output
  --debug                       enable debug output
  --insecure                    disable SSL certificate verification
  --help, -h                    show help


Parameters Description

The name to associate to the user or service.

The specified string cannot match any existing host aliases. Use the alias list command to view the current host aliases before adding a new host.

This parameter is mandatory.

URL The URL for the Object Store endpoint.

This parameter is mandatory.

ACCESSKEY The access key for authenticating to the Object Store service. The ACCESSKEY must correspond to a user or role on the Object Store service.

This parameter is mandatory.

SECRETKEY The corresponding secret for the specified ACCESSKEY.
path Use DNS or path style URL for bucket lookups. The valid value is one of:
  • on: use path style URL for bucket lookup
  • off: Use DNS for bucket lookup
  • auto: Allow the command to automatically determine the appropriate style to use.

Default: auto

api The Amazon S3 signature version to use when connecting to the Object Store service. The valid value is one of:
  • s3v2: use path style URL for bucket lookup
  • s3v4

Default: s3v4

config-dir The path to the configuration folder.

Default: /root/.mc

quiet Disables progress bar display.
no-color Disables color in the output.
json Enables JSON formatted output.
debug Enables output for debugging.
insecure Disables SSL verification.
help Shows this help.


  1. Alias a user with access key A7363534 and secret key S42525252 to the finance service endpoint:
    /opt/mapr/bin/mc alias set finuser A7363534 S42525252 -json
  2. Add the Object Store service under the salesobject alias, to use DNS style bucket lookup:
    mc alias set salesobject https://localhost:9000 minio minio123 --api "s3v4" --path "off" -json