Why 21YunBox Pricing Contact Log in
Talk to an expert Test your site in China

Does Homebrew Work in China? Data Residency, ICP & Cross-Border Rules

Homebrew's public formulae are open source, so reachability is not the real question. The residency and supply-chain question is your private tap — internal tooling, install logic and compiled bottles — which sits on an offshore git and artifact host by default. The lever: self-host the tap and bottle store in-country.

Does Homebrew work in China?

Homebrew's public formulae are open source on GitHub, so whether a mainland box can run brew install is a reachability matter, not the compliance question. The residency and supply-chain question is your private tap — the Git repository that describes your internal tooling, install logic and sometimes credentials — and the compiled bottles your China build pulls. By default those live on an offshore git and artifact host; keep this measured, because the exposure is the proprietary supply chain, not the open-source catalog.

Homebrew's own docs make the lever concrete. A tap, they say, "can be created by anyone" and "is usually a Git repository available online, but you can use anything as long as it's a protocol that Git understands, or even just a directory with files in it" — and a tap can serve its own bottles, since the bottle root "optionally contains the URL root used to determine bottle URLs." So you can host the private tap in your own in-country Git repository and keep its bottles in an in-country artifact store. Where that private tap or its bottles carry personal information, holding it offshore is a cross-border transfer under PIPL (Articles 38–40), and for a CIIO or high-volume handler the data must stay in China (Cybersecurity Law Article 39 (formerly Article 37)). A China-facing package portal your mainland developers reach would additionally carry an ICP filing duty.

This is a risk map for the private half, not a verdict — Homebrew works, and which duties bite turns on your entity, your data volumes and what your tap actually holds. Our China team can map your exposure with you →

What Homebrew's own documentation says about China

FactPrimary source
A Homebrew tap is a Git repository you create and host yourself — that is the in-country lever. Homebrew's tap-authoring docs state a tap "is usually a Git repository available online, but you can use anything as long as it's a protocol that Git understands, or even just a directory with files in it," and that taps "can be created by anyone to provide their own formulae, casks and/or external commands to any Homebrew user." The default tap command "assumes a repository on GitHub," but "the two-argument form accepts any URL supported by Git" — so a private tap can live in your own in-country Git repository rather than an offshore host. Homebrew — How to Create and Maintain a Tap, and Taps (docs.brew.sh), retrieved 2026-10-13
Bottles are your compiled binaries, and a tap can serve them from a storage root you choose. Homebrew defines a bottle plainly — "Bottles are simple gzipped tarballs of compiled binaries" — and its bottle DSL "optionally contains the URL root used to determine bottle URLs," which is "useful for taps that wish to provide bottles for their formulae." By default Homebrew's own core bottles are served from GitHub Packages (offshore), but because the bottle root_url is yours to set, a private tap's artifact store can be placed in-country. Homebrew — Bottles (docs.brew.sh), retrieved 2026-10-13
Holding a private tap or its bottles offshore is a cross-border transfer where they carry personal data. A private tap's formulae can embed credentials, config or test-fixture records; when that content is personal information and it rests on an offshore git or artifact host, moving it abroad is a cross-border transfer under PIPL Articles 38–40 — requiring notice, a separate consent and a transfer mechanism (a CAC security assessment, the CAC standard contract, or certification). The duty falls on you, the handler, not on Homebrew. PIPL Articles 38–40 (data export mechanisms and separate consent); retrieved 2026-10-13
For a CIIO or high-volume handler, China-generated personal information and important data must be stored in the mainland. The Cybersecurity Law's Article 39 (formerly Article 37) — the 2025 amendment in force January 1, 2026 renumbered the data-localization article from 37 to 39, substance unchanged — requires in-country storage, with a security assessment before any export. A private tap and bottle store hosted offshore structurally cannot meet that duty for the regulated data they hold; a self-hosted, in-country tap and artifact store can. Cybersecurity Law Article 39 (formerly Article 37), in force 2026-01-01; retrieved 2026-10-13

Sources verified by the 21YunBox compliance team on 2026-10-13.

For a mainland-China engineering team, the honest first thing to settle about Homebrew is what the question is not. Homebrew’s public formulae and casks are open source, published in Git repositories on GitHub, and whether a build box in Shanghai can run brew install and pull a community package is an operational matter — a mirror or cache answers it, and it is not a compliance question. The compliance question lives one layer in, on the half a reachability check never reaches: your private tap. A tap is Homebrew’s unit of distribution for your own formulae and casks, and a private one encodes your internal tooling — which proprietary tools your China build and provisioning install, at which versions, from where, with which steps, and sometimes the credentials to fetch them. Alongside it sits a bottle store: the compiled binaries (bottles) your build pulls. That private tap and bottle store are your software supply chain, and by default they live wherever you host them — which, for most teams, is an offshore git host and an offshore artifact store. Where that proprietary code and those artifacts come to rest, and what your China build pulls across the border each run, is the whole question — and because a Homebrew tap is just a Git repository you host yourself, you get to decide it.

Keep this measured. Homebrew’s public catalog is open source and carries no residency issue of its own; this is not a big data-residency claim about brew install. It is a narrow, specific one about the private tap and bottle store that a China build or provisioning pipeline depends on.

Homebrew's own tap-authoring documentation on docs.brew.sh, stating that a tap is a Git repository you create and host yourself: 'A tap is usually a Git repository available online, but you can use anything as long as it's a protocol that Git understands, or even just a directory with files in it,' and that taps 'can be created by anyone to provide their own formulae, casks and/or external commands to any Homebrew user.'
“A tap is usually a Git repository available online, but you can use anything as long as it’s a protocol that Git understands, or even just a directory with files in it.” — Homebrew's own tap-authoring documentation, which adds that taps “can be created by anyone to provide their own formulae, casks and/or external commands to any Homebrew user.” A tap is a Git repository you host yourself, which is exactly what makes an in-country private tap a lawful residency lever. Source: docs.brew.sh — How to Create and Maintain a Tap

Homebrew in China at a glance

What decides it In Homebrew's own terms — and China's law
Public formulae are open source — not the axis Homebrew's public formulae and casks are open source on GitHub. Its docs note the default “one-argument form assumes a repository on GitHub,” while “the two-argument form accepts any URL supported by Git.” Pulling community packages is a reachability and mirror question — useful operationally, but it is not where the compliance exposure is.
Your private tap is proprietary supply chain The distinctive half a reachability check never sees. A private tap is the Git repository that describes your internal tooling — which proprietary tools your China build installs, their versions and sources, the install logic, and sometimes credentials or config to fetch them. That is trade-secret supply-chain detail, and its compiled bottles are your own binaries. Where they live is a residency question, not a speed one.
Offshore by default By default a private tap sits on an offshore git host and its bottles on an offshore artifact store; Homebrew's own core bottles, for reference, are served from GitHub Packages. So your proprietary formulae, build logic and binaries — plus any credentials the formulae carry — rest abroad unless you place them elsewhere.
The China build pulls across the border When a mainland build or provisioning run resolves your private tap and downloads its bottles from an offshore host, your China deployment's dependency supply chain crosses the border on every run — a question of provenance, integrity and residency of proprietary material that no “can it resolve the package” check measures.
Residency & cross-border Where that private tap or its bottles carry personal information or regulated material, holding it on an offshore host is a cross-border transfer under PIPL Articles 38–40 — notice, a separate consent and a transfer mechanism (a CAC security assessment, the CAC standard contract, or certification). For a critical information infrastructure operator or high-volume handler, the Cybersecurity Law's Article 39 (formerly Article 37) requires China-generated personal information and important data to be stored in the mainland.
Self-host is the lever Because a tap is “just a Git repository,” the lawful lever is simple: host the private tap in your own in-country Git repository and serve its bottles from an in-country artifact store (a tap can set its own bottle root_url), so proprietary code, build logic and binaries stay resident and the China supply chain stays in-country — the 21YunBox Optimizer in front of what you already run.

What a private tap actually holds — and why it is the axis

A Homebrew tap is not a dataset the way an application database is; it is a description of a software supply chain, and that is precisely why it is a residency question rather than a speed one. Homebrew’s documentation is explicit that a tap is something you make and host yourself: taps “can be created by anyone to provide their own formulae, casks and/or external commands to any Homebrew user,” and “a tap is usually a Git repository available online, but you can use anything as long as it’s a protocol that Git understands, or even just a directory with files in it.” The brew tap command, in the docs’ words, “adds repositories that Homebrew can use for formulae, casks and external commands.”

For a company, a private tap is where the sensitivity sits. Its formulae and casks enumerate your internal tooling — the proprietary tools your China build and provisioning pipelines install, their versions, the URLs they are fetched from, and the exact install steps — which together are trade-secret detail about how your systems are built. Formulae and casks routinely carry configuration and, at times, the credentials or tokens needed to reach an internal download source. And the tap’s bottles — which Homebrew defines plainly: “Bottles are simple gzipped tarballs of compiled binaries” — are your own compiled internal software. A tap can even serve those bottles from a storage location you choose: the bottle DSL “optionally contains the URL root used to determine bottle URLs,” and that is “useful for taps that wish to provide bottles for their formulae.” So the residency map has two layers: the proprietary supply-chain description in the tap, and the compiled artifacts it points at.

The doors: supply chain, residency, cross-border and ICP

Point a China build at a private tap and bottle store that live offshore and the first exposure opens — and it is a supply-chain one. Your China deployment’s dependency supply chain now runs across the border: on every build or provisioning run, mainland infrastructure resolves an offshore tap and downloads binaries from an offshore artifact host. That is a question of what proprietary code enters your China systems, with what provenance and integrity, and where it is stored — none of which a “can the package resolve” check can see.

Where that private tap or its bottles carry personal information — a credential tied to a person, a config holding contact data, test fixtures with real records — holding it on an offshore host is a cross-border transfer (数据出境). The duty lands on you, the handler: PIPL Articles 38–40 require a transfer mechanism and a separate consent to send such data offshore. And if your organization operates critical information infrastructure, or handles personal information at scale, the Cybersecurity Law’s Article 39 (formerly Article 37 — the 2025 Cybersecurity Law amendment, in force January 1, 2026, renumbered the data-localization article from 37 to 39, its substance unchanged) requires China-generated personal information and important data to be stored in the mainland. Keep this measured: for a private tap the personal-information content is usually incidental rather than central — the primary exposure is the proprietary code and credentials, with residency duties engaging where personal data is in fact present.

One further door is conditional. If you stand up a China-facing surface around the tap — an internal package portal or a self-service artifact site your mainland developers reach over the public internet — that surface is an internet information service and carries an ICP filing (备案) duty bound to mainland hosting. A tap consumed privately by your build infrastructure does not by itself trigger this; a public-facing one can.

Why a reachability check misses this

A probe from inside China can run brew install, watch a package download, and conclude “it works.” That answer is beside the point. The exposure is not whether the client can resolve and fetch — a mirror or cache settles that. It is where your private tap and its bottles live and what crosses the border when your China build pulls them: the proprietary tooling inventory and install logic in the tap, the credentials its formulae may carry, and the compiled binaries in the bottle store. A reachability test sees none of that. It cannot tell you that your internal supply chain is described in a repository on an offshore git host, that your compiled artifacts sit in an offshore store, or whether any personal data rode along.

There is a trap specific to package tooling: making the public registry merely reachable — standing up a mirror or cache so community packages install quickly — does nothing for residency, because your private tap and artifacts are still offshore. Mirroring the open-source catalog and keeping your proprietary supply chain in-country are two different things. That is the competitor-proof second half of the question, and it is why keeping the private tap and bottle store in-country — not merely making installs fast — is the answer.

The lawful path — map, localize, deliver

There is a compliant way to run a private Homebrew tap for a mainland-China team, and because a tap is just a Git repository and bottles can be served from a URL root you choose, it sits on the tooling you already use — no rebuild, no migration off Homebrew.

First, map: our China compliance team inventories your private tap — which of your formulae and casks describe proprietary internal tooling, whether they embed credentials or config, where the tap repository and its bottles are hosted today, and what your China build and provisioning actually pull across the border. We build the technical picture; the legal conclusions are settled with counsel.

Then localize: host the private tap in an in-country Git repository and serve its bottles from an in-country artifact store (the bottle root_url points wherever you choose), so your proprietary code, build logic, credentials and compiled binaries come to rest on mainland soil and your China build’s supply chain stays in-country. Where personal information is genuinely present, obtain the notice and separate consent and use a lawful transfer mechanism only where a transfer is truly needed; minimize what crosses the border. Localize means standing up a lawful, in-country supply chain — never a route that ships the proprietary material offshore anyway, and never any form of circumvention.

Then deliver: if you expose a China-facing surface around the tap — an internal package portal or artifact site your mainland developers reach — it is an internet information service, so it carries an ICP filing duty and needs compliant, in-country delivery. 21YunBox delivers it in-country — the 21YunBox Optimizer — in front of what you already run. 21YunBox never uses or suggests circumvention of any kind — we keep in-country what the law says must stay, deliver the rest compliantly from inside the mainland, and never move regulated material across the border by stealth. 21YunBox is a compliance overlay and partner to the Homebrew workflow you already run, not a competitor to it.

None of this is a verdict that Homebrew is “blocked” or “illegal” in China — it plainly works, and its public catalog is open source. It is a residency-and-supply-chain map for the private half, and which duties bite your case turns on your entity, your role under Chinese law, your data volumes, and what your private tap actually holds — worth settling the specifics with counsel before your China build’s supply chain depends on it.

Get a compliance assessment →


Related reading:

Frequently Asked Questions

Can I install Homebrew packages in China?
Generally yes — Homebrew's public formulae and casks are open source on GitHub, and whether a mainland build box can resolve and download community packages is an operational reachability matter that a mirror or cache can help with. That is not the compliance question, though, and this page does not lead on it. The question that matters for a company is where your private tap and its compiled bottles live and what your China build pulls across the border, because that is your proprietary software supply chain.
Isn't Homebrew all open source — so what is the residency exposure?
The public catalog is open source and carries no residency issue of its own, so keep the concern scoped. The exposure is the private tap you run for internal tooling: the Git repository that enumerates which proprietary tools your China build installs, at which versions and from where, the install logic, and sometimes credentials to reach an internal source — plus the compiled bottles that tap points at. If that tap and its bottles sit on an offshore git and artifact host, your China deployment's supply chain and proprietary code are offshore, and any personal data they carry is a cross-border transfer under PIPL.
Can 21YunBox help run a private Homebrew tap compliantly for China?
Yes. Our China team maps what your private tap holds — which formulae and casks are proprietary, whether they embed credentials, and where the tap repository and its bottles are hosted today — then helps you host the tap in an in-country Git repository and serve its bottles from an in-country artifact store, so proprietary code and build logic stay resident. Because a tap is just a Git repository and bottles use a root URL you set, this needs no rebuild and no migration off Homebrew. Any China-facing package portal is then delivered compliantly, in-country. Get in touch to work through your specific case.

ARTICLES RELATED TO HOMEBREW

CATEGORIES

DevOps

Make Your Site Work inside the Great Firewall of China

Enter your information, and our staff will assist you in getting a 21YunBox account for China.

Make Your Site Work Within the Great Firewall of China
Make Your Site Work Within the Great Firewall of China

By clicking 'Get Started', I also agree to 21YunBox's Terms of Service and Privacy Policy.