mc admin config

Description

The mc admin config command manages configuration settings for the AIStor Server.

Settings defined by environment variables on the server override settings defined with this command. The commands that read configuration show environment variables in their output, but you cannot change them from the client.

Examples

Change a configuration setting

The following command sets the region name for the deployment with the alias myaistor:

mc admin config set myaistor region name=us-west-1

See mc alias for more information on aliases.

Review the current value of a setting

The following command displays the current compression settings:

mc admin config get myaistor compression

Back up and restore the configuration

The following commands write the current configuration to a file, then apply that file to the deployment:

mc admin config export myaistor > config.txt
mc admin config import myaistor < config.txt

The file covers the server settings that mc admin config manages. It does not cover users, policies, or bucket metadata, and it cannot restore settings the server takes from environment variables. See What the export does not contain.

Two behaviors matter before you use these commands:

  • The export holds credentials in plain text, so protect the file.
  • The import replaces the whole configuration, so a partial file resets everything it omits.

Syntax

mc admin config has the following syntax:

mc admin config COMMAND [ARGUMENTS]

mc admin config supports the following commands:

Referring to a subsystem

get, set, and reset identify a setting by its subsystem and, optionally, by one or more keys within that subsystem.

You can write a subsystem with underscores or with dots. log_api_webhook and log api webhook refer to the same subsystem.

Some subsystems support named targets. Append the target name after a colon, as in notify_mqtt:name1.

For the list of subsystems and the keys each one accepts, see Settings Overview.

mc admin config set

Sets a configuration key on the MinIO AIStor deployment. Configurations defined by environment variables override configurations defined by this command.

mc admin config set has the following syntax:

mc admin config set ALIAS [SUBSYSTEM [KEY=VALUE ...]] \
                          [--env]                     \
                          [--tree, -v]

The command behaves differently depending on how many arguments you pass:

Arguments Result
ALIAS Lists the available subsystems.
ALIAS SUBSYSTEM Describes the keys the subsystem accepts.
ALIAS SUBSYSTEM KEY=VALUE Sets the specified keys.

Some settings do not take effect until you restart the deployment. The command tells you when a restart is required.

Most subsystems reject a key they do not recognize, and the deployment fails to start until you remove it. Notification targets, object lambda targets, and logging targets are the exception: the server prints a message about the unknown key on its console and starts anyway, ignoring that key. Check the server console after you change a target’s configuration.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to modify, such as region or notify_webhook. See Referring to a subsystem.

KEY=VALUE

Optional

One or more settings to apply, each written as KEY=VALUE. Separate multiple settings with spaces.

--env

Optional

Describes the settings as environment variables instead of as configuration keys.

This parameter affects only the descriptive output the command produces when you do not name a key to change. It has no effect on the change itself.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config get

Gets a configuration key on the MinIO AIStor deployment created using mc admin config set.

mc admin config get has the following syntax:

mc admin config get ALIAS [SUBSYSTEM ...] \
                          [--string]      \
                          [--tree, -v]

Pass the alias on its own to list the available subsystems.

The output includes settings that come from environment variables on the server. You cannot change those from the client.

get leaves out the values it treats as secrets, such as webhook authentication tokens, notification target passwords, LDAP bind passwords, and OpenID client secrets. Use export when you need those values.

Not every credential counts as a secret here. mc admin config get ALIAS subnet prints the SUBNET license and its API key in full, so protect that output the way you protect an export.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to display, such as compression or notify_webhook. See Referring to a subsystem.

--string

Optional

Prints the raw configuration string on a single line, without the per-key descriptions that the command otherwise includes.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config reset

Resets config to defaults. Configurations defined in environment variables are not affected.

mc admin config reset has the following syntax:

mc admin config reset ALIAS [SUBSYSTEM [KEY ...]] \
                            [--env]               \
                            [--tree, -v]

Pass the alias on its own to list the available subsystems. Naming a subsystem without a key resets every key in that subsystem.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to reset, such as compression or notify_mqtt:name1. See Referring to a subsystem.

KEY

Optional

One or more keys within the subsystem to reset. Separate multiple keys with spaces.

--env

Optional

Describes the settings as environment variables instead of as configuration keys.

This parameter affects only the descriptive output the command produces when you do not name a key to change. It has no effect on the change itself.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config history

Lists the history of changes made to configuration keys by mc admin config.

Configurations defined by environment variables do not show.

mc admin config history has the following syntax:

mc admin config history ALIAS \
                        [--count, -n int] \
                        [--clear, -c]

Each entry has a restore ID. Pass that ID to restore to roll the configuration back to that point.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

--count

Alias: -n

Optional

The number of entries to list, most recent first. Defaults to 10.

--clear

Alias: -c

Optional

Deletes the entire configuration history.

Clearing the history does not change the current configuration, but it does remove the restore IDs that restore depends on.

mc admin config restore

Roll back changes to configuration keys to a previous point in history.

Does not affect configurations defined by environment variables.

mc admin config restore has the following syntax:

mc admin config restore ALIAS RESTOREID

restore always advises restarting the deployment. The deployment saves the restored configuration without applying it, so the settings take effect only after the restart. This differs from set, which applies many settings immediately and asks for a restart only when one is needed.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

RESTOREID

Required

The restore ID of the configuration to roll back to. Use history to list the available IDs.

mc admin config export

Writes the complete server configuration of a deployment to standard output as plain text.

mc admin config export has the following syntax:

mc admin config export ALIAS

Redirect the output to a file to keep a copy:

mc admin config export myaistor > config.txt

The account that runs the command needs the admin:ConfigUpdate permission. There is no read-only permission for configuration, so any account that can export the configuration can also change it.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

What the export contains

The export covers the subsystems the deployment holds configuration for, not only the subsystems you changed. Each line holds one subsystem and every key that subsystem defines, including keys still set to their default value. A subsystem the deployment has no configuration for at all does not appear: a deployment that uses neither directory service exports no identity_ldap or identity_openid line.

The export reports the configuration the deployment has loaded. A change that asks for a restart is stored right away but does not appear in the export until the deployment restarts.

The output uses four kinds of lines:

Line Meaning
SUBSYSTEM KEY=VALUE ... An active subsystem and its current settings.
SUBSYSTEM:TARGET KEY=VALUE ... One named target of a subsystem, such as a single webhook endpoint.
# SUBSYSTEM KEY=VALUE ... A subsystem that is turned off. The deployment records the values but does not apply them.
# MINIO_VARIABLE=VALUE An environment variable set on the server, listed above the subsystem it configures.

The following sample shows each kind of line. Actual output is much longer and lists every key:

site name=production-cluster region=us-west-1
callhome frequency=24h
notify_webhook:acct1 endpoint=https://webhook.example.net auth_token=AUTH_TOKEN
# MINIO_COMPRESSION_ENABLE=on
# MINIO_COMPRESSION_EXTENSIONS=.txt,.log
# compression enable=off allow_encryption=off extensions=.txt,.log,.csv,.json,.tar,.xml,.bin

Environment variables are a record only. import skips every commented line, so it never applies them. A subsystem that an environment variable turns on still appears as a commented, inactive line, because an environment variable does not change the stored configuration. In the sample above, the environment variable enables compression on the server, and the compression configuration line stays commented out.

The export contains secrets in plain text

export writes every value in full, including the secrets that get leaves out, such as webhook authentication tokens. Depending on what the deployment configures, the file can also hold notification target passwords, database connection strings, and client certificates and keys.

The file holds the SUBNET license key when the deployment keeps its license in the configuration, which is where mc license update puts it. A deployment that reads its license from the MINIO_LICENSE environment variable exports subnet license= empty.

Protect the export file
An export is a credential file. Write it to a location only administrators can read, encrypt it at rest, and delete working copies when you finish with them. Anyone who reads the file gains the credentials the deployment uses to reach its webhooks, directories, and databases.

What the export does not contain

The export covers server settings only. Back up the following separately:

mc admin config import

Replaces the server configuration of a deployment with a file in the format export produces.

mc admin config import has the following syntax:

mc admin config import ALIAS

The command reads from standard input. Redirect a file into the command to apply it:

mc admin config import myaistor < config.txt

The account that runs the command needs the admin:ConfigUpdate permission.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

Import replaces the whole configuration

import is a replacement, not a merge. The deployment builds a configuration from the defaults, applies only the lines in the file, and saves the result. Every setting the file omits returns to its default value:

  • A subsystem with no line in the file returns to its defaults.
  • A named target with no line in the file is deleted.
  • A commented line has no effect, so a subsystem the export commented out returns to its defaults.

Import a complete export, not a fragment. To change a few settings and leave the rest alone, use set instead.

The license is the one setting the deployment refuses to drop this way. See A licensed deployment rejects a file that drops the license.

Review an export before you import it elsewhere
An export from one deployment carries that deployment’s identity and connections, including its site name, region, notification targets, and, when the configuration holds it, the SUBNET license key. Importing it into a second deployment copies those values into that deployment’s configuration. Change the values you do not want to carry over before you import the file, rather than deleting their lines.

A licensed deployment rejects a file that drops the license

A licensed deployment refuses any file that would leave it without a license:

Unable to set server config: license cannot be removed once installed.

The deployment saves nothing and records no history entry. It refuses the file whether the subnet line carries an empty license value or the file has no subnet line at all.

This catches a deployment that reads its license from the MINIO_LICENSE environment variable. That deployment exports subnet license= empty, so its own export does not import back into it. Either add the license to the file before you import it, or install the license into the configuration with mc license update so that later exports carry it.

How the deployment reads the file

The deployment validates the file as a whole before it saves anything:

  • Blank lines and lines that start with # are skipped, including the environment variables that export records. Set those on the server itself.
  • One unusable line rejects the entire file. The deployment names the line, saves nothing, and keeps the configuration it already has.
  • A successful import adds an entry to the configuration history.

Restart the deployment to apply an import

import always advises restarting the deployment. The deployment saves the imported configuration without applying it, so the settings take effect only after the restart. Until the restart, get and export still report the running configuration rather than the imported one. This differs from set, which applies many settings immediately and asks for a restart only when one is needed.

Configuration settings

For a list of available configuration settings, see Settings Overview.