Whether you are setting up a single developer machine, an air-gapped build cluster, or a global enterprise artifact store, understanding remotes transforms Conan from a simple package fetcher into a strategic tool for dependency governance.
Use conan config install to distribute a pre-configured remotes.json to all developer machines. Pattern 3: The "Vendor Override" (Pinning specific libraries) Sometimes you need a patched version of a popular library (e.g., openssl with a custom patch). You want Conan to find your patched version first , but still get all other packages from Conan Center. conan add remote
# Remove the default remote entirely conan remote remove conancenter conan remote add secure-mirror https://internal.airgap/conan Whether you are setting up a single developer
# 1. Add your internal remote as primary conan remote add company https://artifactory.internal/ --insert 0 conan remote add conancenter https://center.conan.io You want Conan to find your patched version
**Now, use the --remote flag in conan create or conan upload to send only your patched library to custom-vendor . All other libraries remain on Conan Center. conan add remote is part of a larger ecosystem of remote management commands. Here's how they fit together:
conan remote list While the basic command works, real-world scenarios require the additional flags. Let's break down the most important ones. 1. --insert and --position : Controlling Priority Conan searches remotes in the order they are listed . The first remote containing a matching recipe wins. This is a frequent source of hidden bugs (e.g., an outdated internal package being found before a newer one on Conan Center).
When you install a package, Conan first checks your internal remote. If missing (a cache miss), it falls back to Conan Center. You can then upload the package to your internal remote for future builds. Pattern 2: The "Isolated" Network (Air-Gapped) For secure environments with no internet access, you cannot have Conan Center at all.