Mirroring is the process of copying the contents of an external repository locally, ensuring users have fast and reliable access to its packages. When you run a mirror, it populates your channel with packages from the mirror’s source. Anaconda recommends that channels contain only one mirror each to prevent conflicts between package sources.

For more information on channels, see Channels and subchannels.

Mirroring is restricted to users whose role provides write or manage permissions for Channel Mirrors and/or Subchannel Mirrors categories.

Allowlist the following URLs before attempting to mirror:

  • https://repo.anaconda.com/
  • https://repo.anaconda.cloud/
  • https://anaconda.org/
  • https://anaconda.com/
  • https://api.anaconda.cloud/
  • https://conda.anaconda.org/
  • https://pypi.org/
  • https://files.pythonhosted.org/
  • https://cran.r-project.org/ (optional - for CRAN R users)

Creating a mirror

When creating a mirror, the recommended workflow is:

  1. Select a channel you want to contain your mirror.

  2. Freeze your channel.

  3. Open the Manage dropdown and select Create Mirror.

  4. Complete the Create mirror form. Configuration options differ based on the type of mirror you are creating:

    1

    Mirror Name

    Enter a name for your mirror. Anaconda recommends you name your mirror something descriptive for your end users.

    2

    Mirroring Mode

    Choose whether you want your mirror to be active or passive.

    Active Mirroring: Downloads packages from the source channel immediately to your local server.

    Some repository channels require a large amount of storage (for example, Anaconda’s public repository is 700GB, conda-forge is 3TB, and PyPI is 10TB), and as a rule, the larger the mirror, the longer the wait time for it to complete.

    Passive Mirroring: Creates a metadata file listing all packages on the mirrored server. Packages are downloaded when users request them via conda install <PKG_NAME>.

    Anaconda recommends establishing your mirrors as passive. Active mirrors take longer to complete than passive mirrors, but regardless of which mirroring mode you choose, the available packages are the same.

    3

    External Source URL

    Enter the URL of the conda channel to mirror.

    Anaconda recommends creating mirrors for the following channels:

    • https://repo.anaconda.cloud/pkgs/main
    • https://repo.anaconda.cloud/pkgs/r
    • https://repo.anaconda.cloud/pkgs/msys2

    If your external source channel is another Package Security Manager channel, you must use the format https://<URL>/api/repo/<CHANNEL_NAME>.


    If your external source channel is another Package Security Manager channel that contains CRAN R packages, you must use the format https://<URL>/api/repo/<CHANNEL_NAME>/cran.


    If your external source channel is a channel from Package Security Manager (Cloud), you must use the format https://repo.anaconda.cloud/repo/t/<TOKEN>/<ORG_ID>/<CHANNEL_NAME>.

    4

    Mirror Type

    Select Conda as the mirror type. This ensures that only conda packages (.conda, .tar.bz2) will be mirrored from the external source channel. Packages in the source channel that are not conda packages are not mirrored.

    5

    Mirroring Frequency

    Set the frequency you want your mirror to run and update your packages. The default value instructs the mirror to update at midnight on the first day of every month.

    Custom frequencies use cron expressions to determine when they run.

    Mirroring large repositories can take several hours. Anaconda recommends against setting a frequency greater than Daily to avoid collisions between currently running and updating mirrors.

    6

    Run Now

    Select this checkbox to start your mirror when you click Save & Run. If the Run Now box is not checked, your changes are saved, and the mirror runs the next time its frequency configuration instructs it to do so.

    7

    Assign Mirror Policy

    Toggle between using the policy that is applied to the channel or selecting a policy to apply to the mirror. For more information about policies, see Policies.

    You cannot apply a policy to a mirror if it is already applied to the channel.


    Mirror policies override channel policies.

    8

    View Applied Policy

    View details of the policy applied to the mirror.

    9

    Cancel/Save & Run

    Select Cancel at any time to quit your mirror form completion and discard any set parameters. Select Save & Run to start your mirror.

  5. Allow the mirror time to complete.

  6. Unfreeze your channel.

    For more information on freezing and unfreezing a channel, see Freezing/Unfreezing Channels.

Managing mirrors

Select All Mirrors from the left-hand navigation to view mirrors globally for all users.

This view is only available to users whose role provides Manage permissions for the mirror attribute. This value must be assigned in Keycloak.

Use the search box to locate a mirror by name. Click a column header to sort mirrors by Type, Mode, Mirroring Status, or Last Updated.

Mirror actions

Use the icons in the Actions column to manage your mirrors:

Mirror actions can also be performed from a channel’s Mirrors tab.

Edit mirror

Edit a mirror’s configurations.

You cannot edit the mode of an established mirror.

Stop running mirror

Stop an in-progress mirror.

It can take up to 10 minutes for a mirror to fully stop. A mirror in the process of stopping will display Stopping as its mirroring status. Once it is complete, it will display Stopped as its status. Stopping a mirror does not discard the progress the mirror has made, and some packages may appear in your channel’s Packages tab.

Restart Mirror

Restart a stopped mirror.

Restarted mirrors run from the beginning of the mirroring process, not from where you stopped the run.

See details

View information about how many packages were filtered from the source, reasons for their exclusion, and whether packages were mirrored passively or actively.

Delete mirror

Delete a mirror.

Download Dependency Report

Download a dependency report (if available).

A dependency report is a detailed list of all the software packages required for your specified packages to function correctly. It includes both direct dependencies (packages your specified packages require to run) and indirect dependencies (packages the dependencies require to run). A package dependency report can help you identify exactly which packages are necessary for your channel to be able to create a working environment using conda.

Dependency reports are only available for mirrors that have policies with specific configurations applied:

  • You must set package rules to allow packages by their names using MatchSpec protocol—a syntax for specifying package names and versions in conda
  • You must select the Include dependencies checkbox.