Private Composer repositories for Magento extensions

A private Composer repository gives a Magento Open Source team one controlled source for purchased and in-house extensions, so builds repeat without depending on vendor download links.

On this page

Why teams host Magento extensions in a private Composer repository

A private Composer repository holds the approved extension packages your store depends on, so every build, every developer machine and every environment pulls the same versions from a source you control. Without one, a build may depend on a vendor download link that expires, a purchased zip that has been replaced with a newer file under the same name, or a developer's local copy that nobody else has. Any of these can change the code a release ships without a single line of your own code changing.

Magento Open Source itself installs through Composer from repo.magento.com, and that path needs Commerce Marketplace access keys, supplied through prompts, an auth.json file or an environment variable, as described in the Adobe Composer install guide. The core is therefore already fetched from a remote repository. Extensions bought outside that path, and modules your own team writes, need a second, private source of truth in the same dependency graph. Confirm how your team stores the Marketplace keys and who can rotate them, because the keys govern core access as well as extension access.

The case for a private repository grows with the number of people and environments involved. It becomes worth planning when several developers work on the same store, when staging, QA and production must match exactly, when you run purchased extensions whose vendors issue new archives, or when in-house modules are shared across more than one store. Decide early which team owns the repository, who may publish a package and how a version is approved before it reaches production. Ask extension vendors in writing whether they offer Composer-compatible packages and what they do with old versions, since that answer determines how much of the repository you must maintain yourself.

Repository options and when each fits

This table compares the three places Magento extension packages commonly live: a commercial package registry, a self-hosted Composer repository, and a Git or path repository for in-house code. Read each row as a question to put to a vendor or your own team before choosing. The main takeaway is that the option matters less than whether you control the copy of every package your builds depend on.

FactorCommercial package registrySelf-hosted Composer repositoryGit or path repository for in-house code
Who controls the package copyThe vendor or registry operator hosts it, so availability depends on their service and termsYour team stores and serves each package version you have licensed or builtYour Git host holds the source; builds depend on tags or commits you control
Access managementConfirm whether access uses per-developer keys, shared tokens or licence-bound credentials, and how revocation worksYou set authentication, such as HTTP basic auth or token-based access, and manage users yourselfRepository permissions and branch protection in your Git host govern who can publish or change code
Build repeatabilityConfirm that old versions remain downloadable after a vendor changes or removes a releasePinned versions stay in your store, so rebuilds do not depend on a vendor download linkPin to a specific tag or commit; a moving branch reference makes builds non-repeatable
Package signing and integrityAsk whether packages are signed or whether checksums are published in the lock file workflowConfirm which signing or checksum features your artifact manager supports before relying on themCommit hashes give integrity for source, but confirm how release artifacts are signed if you ship them
Retention and deletionAsk how long old versions are kept and whether the vendor can withdraw a package from your accountYou decide retention, but storage growth and backup of the repository become your responsibilityGit history is retained as long as your host keeps it; confirm backup and mirroring policy
Main cost componentsLicence or subscription fees paid to the vendor, recurringHosting, storage, backup and administration by your team or a partner, mostly recurringGit hosting seats and CI runners, recurring; the build work to package code is one-time
Operating effortLow for hosting; you still manage which licences and seats are assignedModerate: upgrades, access reviews, backups and monitoring of the repository serviceLow to moderate, but you must maintain tagging and release discipline
Fits best whenMost of your extensions are purchased and vendors offer a registry with support terms you acceptYou hold many licensed packages or need full control over availability and accessYour team writes custom modules that are not shared outside the organization

Setting up a private repository with checks at each stage

This sequence turns a collection of purchased and in-house Magento extensions into a private Composer repository that produces the same build every time. Each step ends with a check you can run and record, so a failure is caught before it reaches production.

  1. Inventory every extension and its license terms

    Your engineering lead or platform owner lists every extension, module and theme the store uses, including the package name, exact version, vendor, source (Marketplace, vendor download, or in-house), and the license terms that govern redistribution and use. Include transitive dependencies that the store pulls in indirectly. Confirm for each commercial extension whether its license permits hosting a copy in your own repository and who may install it. The step is done when the inventory is a reviewed document with no entry marked unknown.

  2. Decide where the private repository will be hosted

    Your platform team chooses the hosting for the private Composer repository inside infrastructure you control, such as a self-hosted Composer repository service, an artifact manager, or a Git-based approach your organization already runs. The decision covers who can publish, who can read, how packages are backed up, and how the repository is reached from build agents and staging. Record the choice and its access model in the build documentation. The step is done when a test package can be published by an authorized user and installed by a build agent that is not that user.

  3. Store credentials outside the repository

    Your engineers move Commerce Marketplace access keys and private repository tokens out of version control and into an auth.json file kept outside the repository or into environment variables injected by the CI system. Adobe's install documentation describes supplying the keys through prompts, auth.json or an environment variable. Rotate any key that has ever been committed. The check is a secret scan of the repository history and the build logs, with no credential found and no key printed in build output.

  4. Register the repository in composer.json

    Your developers add the private repository to the repositories section of composer.json, set its type and URL, and confirm that package resolution prefers it for in-house and purchased packages. Keep the repository definition in the shared project file so every developer and build agent resolves packages from the same location. The check is a dry run of composer update against an empty lock file in a scratch directory, confirming that each extension resolves to the expected source and that no package falls back to an unexpected public source.

  5. Pin versions and commit composer.lock

    Your team pins each extension to an exact version rather than a loose constraint, runs the resolution, and commits composer.lock to version control. The lock file records the resolved versions, source references and content hashes that later builds depend on. Review the pinned versions against the inventory from the first step so that no extension is missing or duplicated. The step is done when the committed lock file matches the reviewed inventory.

  6. Diff the lock file on every change

    Each merge request that changes dependencies shows a diff of composer.lock, reviewed by a second engineer. The reviewer confirms that only the intended packages changed, that version and source references match the approved change, and that no package was added from an unrecognized repository. Automate the diff in the pipeline so that unexpected changes block the merge. The check is a pipeline job that fails when the lock file changes without a matching change to composer.json.

  7. Run a clean install from an empty vendor directory

    In a staging environment, your build pipeline deletes the vendor directory and runs a clean composer install using only the committed composer.json, composer.lock and injected credentials. The build must complete without manual steps, without copying files from a developer workstation, and without network access to vendor download links that are not in the repository. Record the build output and the installed package list. The step is done when the clean install succeeds on the staging environment and the installed versions match the lock file.

  8. Confirm the same versions reproduce on two build agents

    Your platform engineers run the same clean install on two separate build agents, with the same commit and the same credentials injected from the pipeline. They compare the resolved package list, the package hashes and the checksum of the generated vendor tree. Matching results show the build does not depend on the agent, a cached download or a developer machine. Any mismatch is traced to the source before the build is promoted. The step is done when both agents report identical package versions and hashes for the same commit.

How a build pulls packages from each source

The build starts when a developer commits composer.json and composer.lock to the repository. The CI runner then calls Composer, which reads auth.json for credentials. Core Magento packages come from repo.magento.com using Commerce Marketplace access keys, while purchased and in-house extensions come from the private Composer repository. Check that the lock file pins every package and that credentials are injected by the runner, not stored in the repository.

Package sources, credential injection and trust boundaries in a Magento CI build.

Protecting credentials, packages and the build pipeline

A private Composer repository holds commercial code, credentials and the packages every build depends on. The risks below cover where secrets leak, who can publish, whether packages can be trusted and what the license allows. Review them together, because a weakness in one area often undermines the others.

Keep auth.json out of Git

Magento Open Source installs pull from repo.magento.com using Commerce Marketplace access keys, typically stored in an auth.json file. A committed auth.json exposes those keys to anyone with repository read access, including former contractors and forks. Check that auth.json is in .gitignore, that history has been scanned for keys, and that CI injects credentials at build time from a secrets store. Rotate any key that has ever been committed.

Composer install docs

Replace shared developer credentials

Teams often share one set of Marketplace keys across developers and agencies, which makes revocation disruptive and attribution impossible. Issue keys per person or per build system where the vendor allows it, and record who holds which key. Ask your agency or integrator how they store keys on their own machines and whether those keys are removed when the engagement ends.

Verify package integrity

A package fetched from a URL or a mutable branch can change without a visible version bump. Pin exact versions in composer.lock, commit the lock file, and compare package checksums in CI. Where your repository tooling supports signing, require signed packages before promotion. Confirm with your repository software which integrity checks it enforces by default.

Check redistribution terms

Hosting a purchased extension in your own repository may breach its license if the license limits copying, redistribution or use to named sites. Magento Open Source itself is licensed under OSL-3.0 with AFL 3.0 also included, but third-party extensions carry their own terms. Ask each vendor in writing whether mirroring their package into a private repository is permitted and who may access it.

magento/magento2 repository

Prevent dependency confusion

If a private package shares a name with a public Packagist package, a resolver may fetch the public version instead of yours. Use vendor-prefixed names for in-house modules, configure the repository to restrict which vendors resolve from which source, and review new packages in lock file diffs. Test this with a deliberately conflicting name in a staging build before go-live.

Log publishes and downloads

You need a record of who published a version, who downloaded it and when, both for incident response and for showing a compliance assessor how extension code entered production. Confirm whether your repository product logs publish and download events, how long logs are kept, and whether they can be exported to your SIEM. Check that the build runner's own logs are retained too.

Current version context
2.4.9

Keeping extension versions aligned with each Magento patch

Adobe recommends upgrading Magento Open Source every patch cycle to stay secure and PCI compliant, and its upgrade guide names the number of extensions, customizations, third-party integrations and coding practices as the main drivers of upgrade effort. Every extension you run is a version constraint that has to be re-proven against each new core patch, so the count and age of your extensions decide how much work each patch costs. Before the next patch window, list every purchased and in-house package with its currently installed version and the core versions it claims to support. That inventory is the starting point for deciding which extensions need a new release and which can wait.

A private Composer repository helps because it keeps a retained history of each approved extension version, so a rebuild on a new core patch pulls a known, reviewed package rather than whatever a vendor link serves that week. Build the candidate release in a staging environment first, from the same composer.lock and repository state that production uses, and run the full upgrade there before any production change. The Upgrade Compatibility Tool referenced in Adobe's upgrade guide can be run as a check on the code you have, but it does not replace functional testing of your checkout, payment and ERP flows.

Plan the calendar around Adobe's release schedule. Adobe ships a full patch for the 2.4.x LTS line annually in May, and security patches at least annually for all supported lines. The released versions page lists 2.4.8-p5 and 2.4.9 as released on May 12, 2026, so a store on either line should expect its extension set to be validated against those patch levels. Confirm the exact patch and the support end date for your release line in Adobe's lifecycle policy before scheduling. Ask your extension vendors and your integrator to commit in writing to which core patch levels each version supports, and to how quickly they will publish compatible releases after a core patch ships.

Limits to confirm before you commit to a repository design

A private Composer repository only stays repeatable if the license, the host, the vendor's release model and the distribution you run all allow it. Confirm these five points before you choose a design, because each one can change where packages live and how builds fetch them.

License allows storing the package

Many commercial extension licenses permit installation on your sites but not redistribution. Before you mirror a purchased package into your own repository, read the license terms and confirm in writing that the vendor allows you to host a copy, who may download it, and what happens to that right if your license lapses or transfers. Ask whether the vendor's terms differ for agencies and in-house teams. Keep the license file with the package so the terms travel with it.

Host supports CI authentication

Composer builds in CI need credentials to pull private packages, and the repository host must accept them in a non-interactive way. Confirm that your chosen host supports token-based or deploy-style authentication for Composer, that tokens can be scoped to read-only access, and that CI runners can receive them from a secrets store without writing them into the repository. Test a clean build on an empty runner before you rely on the setup.

How the vendor ships updates

Some vendors publish new versions through a Composer endpoint, others through download links that change per release, and others only through a zip file. Find out which model applies, how often releases ship, how security fixes are announced, and whether older versions stay downloadable after a new release. The answer decides whether your repository can mirror each release reliably or whether someone must re-upload packages by hand on every update.

Mage-OS compatibility

If the team considers Mage-OS, a community distribution built on Magento Open Source, confirm that each extension in the repository works on that distribution as well as on Adobe's edition. Mage-OS describes itself as upstream compatible with Magento 2 extensions, but compatibility is a claim to test per package, not a guarantee. Check the extension's composer.json constraints and run its test suite against the distribution you intend to deploy before you standardize on it.

Mage-OS site

Repository inside your control

A repository that lives on a third-party service can go offline, change pricing or change terms, and it may place copies of your code outside your infrastructure. Decide whether the repository host must run in your cloud account, data center or air-gapped network, and confirm where package archives, logs and access records are stored. Ask the host how backups are taken and how you would restore the repository if it were unavailable during a release.

Questions teams ask before building a private repository

How much effort does it take to set up a private Composer repository for Magento extensions?

Effort depends on how many extensions you host, how many vendors deliver them, and whether packages are purchased, in-house or both. Setup covers choosing the repository tool, defining how each package is versioned and stored, wiring the repository into your Magento build, and proving that a clean build from an empty workspace produces the same code. For a small set of extensions from one vendor, this is a contained task. Ask any partner to break the effort into repository setup, package onboarding per extension, and build pipeline changes, so you can see which part drives the total.

Can our internal team run a private Composer repository alone?

Often yes, if you already run a Magento build pipeline and someone on the team is comfortable with Composer, package metadata and CI secrets. The skills needed are Composer and Magento module packaging, repository hosting in your infrastructure, and a process for reviewing new package versions. Teams without that experience usually underestimate the review and credential work, not the tool setup. Decide whether one or two named engineers will own the repository, who covers when they are unavailable, and whether you need an outside team for the first build only.

What does the work need from our team before it starts?

The work needs a short list of inputs, and missing any of them delays the build. Plan to provide:

  • Licence files and terms for each purchased extension, plus confirmation that your licence allows hosting the package in a private repository
  • Vendor access details, such as the package source and any download credentials, handled through your secrets process
  • Access to your CI system and the Magento build pipeline, with permission to change build steps
  • A named owner who can approve each new extension version

Review licence terms with your legal or procurement team. DeployOpen does not give legal advice on licence terms.

How long does a private repository take to set up?

No timeline figure is supplied for this work, so duration depends on scope: the number of packages, how cleanly each vendor package is structured, how many build environments need the repository, and how quickly licence and credential questions are answered. Ask for the duration in the written scope as a range tied to named deliverables, and ask what would extend it. Delays most often come from licence confirmation and credential access, not from configuring the repository itself.

What recurring work follows after the repository is live?

Recurring work is what makes the repository worth having, and it should be costed separately from setup. The main tasks are approving new versions of each extension, rotating vendor and repository credentials on a schedule, and rebuilding and testing the store after Magento patch releases, since Adobe recommends upgrading every patch cycle to stay secure and PCI compliant. Each rebuild should pass through the same review as a version change. Ask who performs each task, how often credentials rotate, and whether the rebuild runs automatically or waits for a release window.

What drives the cost of this work up or down?

Cost follows the amount of distinct work per package. The main drivers are:

  • Number of extensions and how many are purchased versus built in-house
  • Number of vendors, since each has its own licence, access method and support terms
  • Number of environments that consume the repository, such as staging, QA and production
  • Hosting choice, whether a repository tool in your own infrastructure or a service you already run

Fixed scope costs more to define up front but less to change later. Ask for the quote to list each cost component and say which items are one-time and which recur.

What should we ask for in a written quote for this work?

A written quote should match the fixed scope agreed before work starts. Ask for a list of deliverables, including the repository setup, the number of packages onboarded, build pipeline changes and verification steps. Ask which items are one-time and which recur, such as credential rotation support, version review and patch-cycle rebuilds. Confirm what the client must provide, the acceptance criteria for a clean build, the timeline as a range tied to those deliverables, and what changes would require a revised quote. Also confirm whether any licence review or legal input is included.

How DeployOpen scopes a repository engagement

A repository engagement starts with a written scope, agreed before any work begins, that names what will be hosted, where it will run and who owns each step. DeployOpen plans and implements the repository inside your own infrastructure, whether that is your cloud accounts, your data center or a network with no outside access. The scope usually moves through five areas: an inventory of every extension your store depends on, the repository hosting choice, the CI integration that installs from it, the handling of credentials, and the verification that proves a clean build reproduces the same code. Each area produces a deliverable you can check against your own records, so the engagement ends with evidence rather than a running server alone.

The inventory is the step most often underestimated. For each purchased or in-house package, the scope should record the package name, the version in use, the license terms, the vendor's support window, whether the vendor allows you to host the archive yourself, and which store configuration depends on it. Ask DeployOpen, and any other partner, to show how the inventory maps to the composer.json and composer.lock files in your Magento project. Ask the vendor in writing whether redistribution to your private repository is permitted, because that answer decides whether the archive can be mirrored or must stay behind the vendor's own download.

Credential handling and verification need explicit acceptance criteria in the scope. Confirm where Commerce Marketplace access keys are stored, who can rotate them, and whether build agents receive them through auth.json or an environment variable. The acceptance test should run a clean install from the private repository on an empty build agent, then compare the resulting lock file and package checksums with the approved baseline. Agree in writing who receives the rotation runbook and who signs off on the result, and confirm the reviewing team's standards before the first sprint so that scope changes are priced against a known baseline.

How DeployOpen works on this

DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure, including the Magento Open Source stores that depend on private extensions. For private Composer repositories, we start from written scope and finish with a repository your team can build from without vendor download links.

How we scope

  • Inventory every purchased and in-house extension, its license terms and the Composer package name each one uses.
  • Agree in writing which package sources, access keys and hosting location the repository will use.
  • Engagements are fixed-scope, with deliverables and timelines confirmed before work starts.

How we build

  • Configure a private Composer repository in infrastructure you control, with package versions pinned in composer.lock.
  • Connect Magento Open Source installs to the repository using credentials kept out of version control.
  • Test a clean build from the repository on a staging copy of your store before any production change.

How we hand over

  • Document the repository layout, publishing steps, access roles and the procedure for adding or retiring a package.
  • Provide build scripts and a runbook so your own engineers can reproduce any release.
  • Walk your team through restore steps for a lost or corrupted repository and confirm they can run them.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Review new vendor releases and license changes before they enter your repository, and record the outcome.
  • Confirm with your extension vendors which licenses allow private mirroring before scope is signed.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.