While mamba currently relies on conda configuration, libmamba and downstream projects such as micromamba or rhumba rely on a pure C++ implementation.


For mamba configuration, please refer to conda documentation

The configuration is parsed/read from multiple sources types:

  • rc file: a file using YAML syntax

  • environment variable: a key/value pair set prior to mamba execution

  • CLI: a parsed argument/option from a CLI interface

  • API: a value set programmatically by a program relying on mamba

The precedence order between those sources is:



rc file stands historically for run commands which could also translate to runtime configuration. It’s a convenient way to persist configuration on the filesystem and use it as default.

Precedence resolution#

Depending on its type, the resolution of a configuration value between multiple sources is:

  • scalar (boolean, string): value from highest precedence source

  • sequence (list): appended from highest precedence source to lowest


Running micromamba install xtensor -c my-channel with 3 sources of configuration:

  • channels and always_yes set from rc file located at ~/.mambarc

  • channels set from CLI using -c option

  • always_yes set from environment variable using MAMBA_ALWAYS_YES env var

$ cat ~/.mambarc
  - conda-forge
always_yes: false

The resulting configuration written using YAML syntax is:

$ micromamba config list --sources
  - my-channel  # 'CLI'
  - conda-forge  # '~/.mambarc'
always_yes: true  # 'MAMBA_ALWAYS_YES' > '~/.mambarc'

Multiple rc files#

A user may have multiple rc files located at different places on their machine.

It’s a convenient way for configuration to apply in given scopes:

  • system wide: all users

  • root prefix: all environments sharing the same root prefix

  • current user

  • target prefix: a specific target prefix | environment

  • a single use

Alternatively, ones could also pass one or more rc files to use from the CLI. Other sources are then ignored.

RC files have their own precedence order and use the same resolution process as other configuration sources:

// on_unix
// on_win

{ root_prefix }/.condarc
{ root_prefix }/condarc
{ root_prefix }/condarc.d
{ root_prefix }/.mambarc
{ target_prefix }/.condarc
{ target_prefix }/condarc
{ target_prefix }/condarc.d
{ target_prefix }/.mambarc