The conda configuration system has several keys that can be used to set up a mirrored context.
The default setup
conda can serve packages from two main locations:
repo.anaconda.com: this is where
defaultspoints to by default. This base location is hardcoded in the default value of
conda.anaconda.org: this is where conda clients look up community channels like
bioconda. This base location can be configured via
So, when it comes to mirroring these channels, you have to account for those two locations.
default_channels to overwrite the default configuration. For example:
default_channels: - https://my-mirror.com/pkgs/main - https://my-mirror.com/pkgs/r - https://my-mirror.com/pkgs/msys2
Mirror all community channels
channel_alias to point to your mirror. For example:
This will make
conda look for all community channels at
Mirror only some community channels
If you want to mirror only some community channels, you must use
This takes precedence over
channel_alias. For example:
custom_channels: conda-forge: https://my-mirror.com/conda-forge
With this configuration, conda-forge will be looked up at
All other community channels will be looked up at
Feel free to explore all the available options in Conda configuration.