Does CockroachDB Work in China? Data Residency, PIPL & Self-Hosting
CockroachDB Cloud runs only on AWS, GCP and Azure regions — none inside mainland China — so your Chinese users' personal data sits offshore under PIPL, with a data-localization duty for CIIOs and large-volume handlers. Self-hosting the core database in-country is possible but hands you the full ICP and residency burden. A compliance-first look at where your data is allowed to live.
Does CockroachDB work in China?
Not as a managed service — and not without taking the whole compliance load on yourself. CockroachDB Cloud runs only on AWS, GCP and Azure regions, none inside mainland China, so your Chinese users' personal data sits offshore. You can self-host the core database on in-country servers, which makes the answer "yes, but" rather than a flat no — the catch is that every ICP and data-residency duty then becomes yours to carry.
In its own documentation, CockroachDB Cloud clusters "can be created in the following cloud regions" — AWS, GCP and Azure lists whose nearest points to China are Hong Kong, Tokyo, Seoul and Singapore, with no mainland region. Keep a China-facing app on CockroachDB Cloud and the personal information it holds on your Chinese users is stored outside the mainland — a cross-border transfer PIPL governs (Articles 38–43), and for a CIIO or large-volume handler a localization duty its regions cannot meet (Article 40; Cybersecurity Law Article 39 (formerly Article 37)). CockroachDB's own data-domiciling features can pin data to regions, but Cockroach Labs calls it "basic support for data domiciling" with "several limitations" — and you can only domicile to a region it operates, of which there is none in the mainland. The table below is CockroachDB's own wording and the rule each line triggers.
This is a risk map, not a verdict — whether a localization duty binds you, and which cross-border mechanism fits, turns on your entity, your data volumes and whose data it is. Our China team can map your data-residency exposure with you →
Compliance snapshot
- ! CockroachDB Cloud stores your data offshore — it has no mainland-China region
- ! China users' personal data in the cluster crosses the border — PIPL applies
- ✕ A China data-localization duty can't be met on CockroachDB Cloud's regions
- ! Self-hosting can sit on in-country infra — but ICP and residency fall on you
- ✓ The database carries no ICP of its own — that door sits on the app in front
What Cockroachdb's own documentation says about China
| Fact | Primary source |
|---|---|
| CockroachDB Cloud runs only on AWS, GCP and Azure regions — none in mainland China. In its own documentation, "CockroachDB Cloud clusters can be created in the following cloud regions," and the published lists reach across the US, Europe and Asia-Pacific — the nearest to China being Hong Kong, Tokyo, Seoul, Singapore and Mumbai — with no region inside the mainland. CockroachDB Standard and Basic run on AWS and GCP only; CockroachDB Advanced adds Azure. Whichever tier and region you choose for a China-facing app, your data is stored offshore. | Cockroach Labs — CockroachDB Cloud Regions (docs.cockroachlabs.com), retrieved 2026-10-07 |
| Your Chinese users' personal data in a CockroachDB Cloud cluster is a cross-border transfer. Because the cluster holds the personal information your application collects from people in China, storing it in an offshore AWS, GCP or Azure region is a cross-border transfer under PIPL — notice, separate consent and one transfer mechanism (Articles 38–43). For a critical information infrastructure operator or a large-volume handler, that data must be stored in the mainland (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)) — a data-residency duty CockroachDB Cloud's regions cannot meet. | Cockroach Labs — CockroachDB Cloud Regions (docs.cockroachlabs.com), retrieved 2026-10-07; PIPL Articles 38–43 & 40; Cybersecurity Law Article 39 (formerly Article 37) |
| CockroachDB's built-in data domiciling can't home data into a country where it runs no region. CockroachDB offers strong multi-region controls — but Cockroach Labs itself calls this "basic support for data domiciling," notes that "using CockroachDB as part of your approach to data domiciling has several limitations," and warns the steps are "necessary but not sufficient." More to the point, you can only domicile data to a region CockroachDB actually operates — and in mainland China there is none, so pinning rows to Hong Kong, Tokyo or Singapore still leaves China-collected data outside the mainland. | Cockroach Labs — Data Domiciling with CockroachDB (docs.cockroachlabs.com), retrieved 2026-10-07 |
| Self-hosting is the one path to in-country data — and it puts the whole burden on you. Cockroach Labs offers "a full featured, self-managed CockroachDB deployment" for "teams that require complete control over the database environment and deploy in their own private data centers." You can run that on mainland-China infrastructure, so the verdict is not a flat no — but the ICP filing for the application in front (State Council Order No. 292; MIIT Order No. 33) and every PIPL data-residency obligation then fall entirely on you, not on a managed service. | Cockroach Labs — Choose a Deployment Option (docs.cockroachlabs.com), retrieved 2026-10-07; State Council Order No. 292; MIIT Order No. 33 |
Sources verified by the 21YunBox compliance team on 2026-10-07.
For a mainland-China audience, the question about CockroachDB is not whether the database responds — it is where the data inside it is allowed to live. CockroachDB is a distributed SQL database: it holds your application’s real records, your Chinese users’ personal information among them, which puts it squarely in data-residency territory. And it answers the residency question in its own documentation. CockroachDB Cloud — the managed service Cockroach Labs runs — creates clusters only in AWS, GCP and Azure regions, and not one of them is inside mainland China. The endpoint is reachable; the exposure is that the personal data it stores sits offshore, where China’s cross-border and data-localization rules reach it. Self-hosting the core database on in-country servers is a real alternative — so the honest answer is not a flat no — but it shifts the entire compliance load onto you.
CockroachDB in China at a glance
| What decides it | In CockroachDB's own terms |
|---|---|
| Where it runs | CockroachDB Cloud creates clusters in AWS, GCP and Azure regions — Standard and Basic on AWS and GCP, Advanced adding Azure. The nearest regions to China are Hong Kong, Tokyo, Seoul, Singapore and Mumbai, all offshore. No region is inside mainland China. |
| Where your data physically sits | In the offshore cloud region you pick at cluster creation. “CockroachDB Cloud clusters can be created in the following cloud regions” — and that list has no mainland entry, so a China-facing app's records are stored outside the country. |
| Built-in data domiciling | CockroachDB can pin rows and tables to regions, but Cockroach Labs calls this “basic support for data domiciling” with “several limitations” — and you can only domicile to a region it operates, none of which is in the mainland. |
| Your China users' data | Personal information collected in China and stored in an offshore region is a cross-border transfer PIPL governs (Articles 38–43), with a localization duty for CIIOs and large-volume handlers (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)). |
| Self-hosted option | You can run the core database yourself “in their own private data centers,” including on mainland infrastructure. That keeps data in-country — but every ICP and residency obligation then falls on you. |
| ICP filing | Not CockroachDB's door. A database serves no public site, so the ICP filing a mainland audience needs sits on the application in front of your database, not on the database itself. |
No mainland region, so your data cannot sit in China
CockroachDB Cloud runs your database on Amazon Web Services, Google Cloud and Microsoft Azure, in the region you choose when you create the cluster. In Cockroach Labs’ own words, “CockroachDB Cloud clusters can be created in the following cloud regions,” and the published lists span the US, Europe and parts of Asia-Pacific — CockroachDB Standard and Basic on AWS and GCP, CockroachDB Advanced adding Azure. The closest those lists come to China is Hong Kong, Tokyo, Seoul, Singapore and Mumbai; mainland China is on none of them. This is the data-residency question in its purest form: the database is not a cache or an edge sitting in front of your data — it is your data, and CockroachDB Cloud has nowhere in the mainland to keep it. So any region you pick for a China-facing app binds your users’ records to a place outside the country.
Your China users’ personal data is a cross-border transfer
Because that cluster holds personal information collected from people in China, storing it in an offshore region is a cross-border transfer under the Personal Information Protection Law. The handler — you, not Cockroach Labs — has to give notice, obtain separate consent, and clear one transfer mechanism: a CAC security assessment, the CAC standard contract, or certification (PIPL Articles 38–43). And if you are a critical information infrastructure operator, or you process personal information above the regulators’ volume thresholds, that data must be stored in the mainland (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)) — a residency duty an offshore AWS, GCP or Azure region cannot meet. Reaching the endpoint quickly does not change any of this: the exposure is legal, not latency.
Built-in data domiciling is real — but it can’t domicile into China
CockroachDB markets strong multi-region controls, and they are genuinely useful: with REGIONAL BY ROW and super regions you can home individual rows and tables to particular regions. It would be fair to assume that answers a China-localization duty — but Cockroach Labs is careful not to oversell it. Its own documentation describes “basic support for data domiciling,” warns that “using CockroachDB as part of your approach to data domiciling has several limitations,” and states that the steps it lists are “necessary but not sufficient” to accomplish domiciling. The deeper point is simpler still: you can only domicile data to a region CockroachDB actually operates. With no mainland region to target, homing your rows to Hong Kong, Tokyo or Singapore keeps them neatly in Asia-Pacific — and still entirely outside mainland China. A feature that moves data between offshore regions does not satisfy a rule that says China-collected personal data must stay in China.
Self-hosting is the one path in-country — and the burden is yours
Here the answer stops being a flat no. Alongside the managed service, Cockroach Labs offers “a full featured, self-managed CockroachDB deployment” for “teams that require complete control over the database environment and deploy in their own private data centers.” Nothing stops you from standing that cluster up on mainland-China infrastructure, which is exactly how you would keep the data itself in-country. What self-hosting does not do is make the compliance questions disappear — it concentrates them on you. You own the data-residency posture, you own the security and operations Cockroach Labs’ SRE team would otherwise run, and the ICP filing (ICP 备案) under State Council Order No. 292 and MIIT Order No. 33 still has to be arranged — though, importantly, that filing attaches to the public-facing application in front of your database, not to the database layer. Keeping those two doors distinct matters: data residency is CockroachDB’s question to answer; ICP belongs to whatever app faces your Chinese audience.
This is a risk map, not a verdict: whether a localization duty binds you, which cross-border mechanism fits, and where the ICP obligation lands all turn on your entity, how much personal data you hold and whose it is — worth settling with counsel before you build.
Where 21YunBox fits — a compliant overlay, not a migration
You keep CockroachDB as your database, whether that is CockroachDB Cloud or a cluster you self-host. What we add is the piece neither option supplies on its own: compliant, ICP-filed delivery from inside the mainland for the application in front of your data, together with any in-China storage your residency obligations call for — fitted around the stack you already run, with no rebuild, no second codebase, and no move off CockroachDB. Our China team weighs your PIPL cross-border and data-localization exposure against your entity and data volumes, then stands up the in-country delivery and storage a lawful China presence needs, while your database keeps running exactly where it does today.
Related reading:
Frequently Asked Questions
Does CockroachDB have a mainland-China region?
No. CockroachDB Cloud creates clusters only in AWS, GCP and Azure regions, and its published region list has none inside mainland China — the closest are Hong Kong, Tokyo, Seoul, Singapore and Mumbai. CockroachDB Standard and Basic run on AWS and GCP; Advanced adds Azure. So any China-facing app on CockroachDB Cloud stores its data offshore. The one way to keep the database itself in the mainland is to self-host the core database on in-country servers — which you operate, secure and file for yourself.
Is it a problem to keep our Chinese users' data in CockroachDB Cloud?
Treat it as a risk to assess with counsel, not a flat yes or no. The cluster holds personal information collected in China, and storing it in an offshore region makes it a cross-border transfer under PIPL — you must give notice, obtain separate consent and clear one transfer mechanism (Articles 38–43). If you are a critical information infrastructure operator or process personal data above the regulators' volume thresholds, a localization duty also applies (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)), and CockroachDB Cloud's regions cannot satisfy it. CockroachDB's own data-domiciling features help pin data to regions, but none of those regions is in the mainland.
Can 21YunBox help make our CockroachDB setup work in China?
Yes. Our China team can map where your data-residency and PIPL cross-border exposure actually sits — for your entity, your data volumes and whose data it is — and stand up the ICP-filed, in-country delivery and any in-China storage a compliant presence needs, in front of the stack you already run. Whether you stay on CockroachDB Cloud or self-host the core database in the mainland, we fit around it rather than asking you to rebuild. Get in touch to work through your case.
