Does Firebase work in China?
The honest reason to look for a Firebase alternative in China isn't speed — it's that Firebase is a Google service with no mainland-China region, which raises two legal questions any replacement must answer too: can the public app be ICP-filed, and where does your China users' personal data live?
Firebase runs on Google Cloud. For Cloud Firestore you “must choose a location for the instance,” the nearest options to the mainland are Hong Kong (“asia-east2”) and Taiwan (“asia-east1”) — both offshore — and “once you provision a database instance, you cannot change its location setting.” Serve China from there and your users' personal information sits outside the mainland, a cross-border transfer PIPL governs; a public app hosted offshore also can't hold the ICP filing a mainland audience requires. The table below is Firebase's own wording and the rule each door triggers.
This is a risk map, not a verdict — which gates a Firebase alternative has to clear turns on your entity, your data and who your users are. Our China team can map your exposure before you pick a replacement →
What actually decides whether a Firebase-backed app works in mainland China
| Fact | Primary source |
|---|---|
| Firebase has no mainland-China region — and neither does the Google Cloud it runs on. Setting up Cloud Firestore, Firebase says you “must choose a location for the instance” and to “store your data close to the users and services that need it” — but its own location list stops at the border: the nearest entries are Hong Kong (“asia-east2”) and Taiwan (“asia-east1”), with no mainland-China option. Google Cloud, the infrastructure underneath, publishes “43 global regions and 130 zones,” none inside mainland China. | Firebase — Cloud Firestore locations (firebase.google.com), retrieved 2026-10-07; Google Cloud — Locations (cloud.google.com/about/locations), retrieved 2026-10-07 |
| On the Android phones sold in mainland China, a core Firebase service may not run at all. Firebase lists Cloud Messaging (FCM) as “Required” on Google Play services, and states that SDKs in that tier “require Google Play services, otherwise they have no functionality.” Mainland-market Android devices typically ship without Google Play services, so push messaging and the Google endpoints Firebase leans on are unreliable or unreachable there. That is the reachability half of the question — real, but not the half that decides whether you're permitted to operate. | Firebase — Dependencies of Firebase Android SDKs on Google Play services (firebase.google.com), retrieved 2026-10-07 |
| Where a Firebase app keeps China users' personal data sets your PIPL exposure. The location you pick is offshore, and in Firebase's words “once you provision a database instance, you cannot change its location setting” — so a China user's personal information stored in Firebase leaves the mainland. That is a cross-border transfer of personal information under PIPL: notice, separate consent and a permitted transfer mechanism (Articles 38–43); for a critical information infrastructure operator or a large-volume handler, the data may have to be kept in China (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)). | Firebase — Cloud Firestore locations (firebase.google.com), retrieved 2026-10-07; PIPL Articles 38–43 & 40; Cybersecurity Law Article 39 (formerly Article 37) |
| A public app shown to mainland users needs an ICP filing — and offshore hosting has nothing to file against. China's ICP filing regime (State Council Order No. 292; MIIT Order No. 33) binds a public-facing site or app to a licensed host physically inside the mainland and to a mainland legal entity. A Firebase-backed app served from Google's offshore regions has no in-country host for the filing to name, so this door stays shut regardless of how fast the app feels. | State Council Order No. 292; MIIT Order No. 33 (China ICP filing regime) |
Sources verified by the 21YunBox compliance team on 2026-10-07.
If your team is shopping for a Firebase alternative because of China, it is worth being honest about why. Firebase is an excellent platform — but it is a Google service, built on Google Cloud, which runs no region inside mainland China. What teams notice first is reachability: Google’s endpoints are filtered or simply unreliable from the mainland, and several Firebase features depend on Google Play services that mainland-market Android phones do not ship with. Reachability, though, is only the surface. The questions that actually decide whether any backend — Firebase or a replacement — belongs in front of a mainland audience are legal ones: can the public app be filed under China’s ICP regime, and where does your China users’ personal data live? Speed is downstream of both.
Firebase in China at a glance
| What decides it | In Firebase's own words — and China's own law |
|---|---|
| Where Firebase runs | On Google Cloud. For Cloud Firestore you “must choose a location for the instance,” and the nearest options to the mainland are Hong Kong (“asia-east2”) and Taiwan (“asia-east1”) — both offshore. There is no mainland-China location. |
| A mainland-China region? | No. Google Cloud, the infrastructure beneath Firebase, publishes “43 global regions and 130 zones,” none inside mainland China. |
| Reachability on the ground | Mixed, and often poor. Firebase lists Cloud Messaging as “Required” on Google Play services — which mainland-market Android devices typically lack — and such SDKs “have no functionality” without it. |
| The public-app door (ICP) | A site or app shown to the mainland public needs an ICP filing bound to a licensed in-country host (State Council Order No. 292; MIIT Order No. 33). Hosting served from offshore has nothing to file against. |
| The data door (PIPL) | China users' personal data stored in an offshore Firebase location leaves the mainland — a cross-border transfer PIPL governs (Articles 38–43; Article 40 and Cybersecurity Law Article 39 (formerly Article 37) can require in-country storage). |
Why teams look past Firebase for China — and what that really points to
The reachability story is real, and worth stating plainly. Firebase is built to serve users from Google’s global network, and that network ends outside the mainland. Google Cloud’s own count is “43 global regions and 130 zones”; the closest to mainland users are Hong Kong and Taiwan, both on the far side of the border. Several Firebase client features are tied to Google Play services, too — Firebase marks Cloud Messaging as “Required” and is blunt that SDKs in that tier “have no functionality” without it — and the Android handsets sold in the mainland generally do not carry Google Play services at all.
So teams feel the pain as instability: pushes that never arrive, calls that stall, a console that behaves differently by the hour. The instinct is to go find a faster backend. That instinct reads the symptom correctly and prescribes the wrong cure, because reachability is not the thing keeping you out. A Firebase call that completes instantly still says nothing about whether you are permitted to serve that audience from where you are serving them. That permission is two separate approvals — and neither one is about speed.
Gate one: the public app and its ICP filing
The first approval governs the app the public sees. Any website or app presented to the general public in mainland China must be filed under the country’s ICP regime — the framework set out in State Council Order No. 292 and MIIT Order No. 33. The filing does not attach to your company in the abstract; it attaches to a hosting resource that physically sits inside the mainland and to a mainland legal entity standing behind it.
That is exactly what a Firebase-backed app served from Google’s offshore regions does not have. There is no in-country host for the filing to name, so the door stays shut — not because the app is slow, but because there is nothing on the China side of the border to file. A quicker offshore backend moves none of this.
Gate two: your users’ data and PIPL
The second approval governs the data. A location in Firebase is not only a performance setting — it is where your records physically live, and Firebase is clear that “once you provision a database instance, you cannot change its location setting.” Choose one of the reachable options and your China users’ personal information is stored offshore from the moment they sign up.
Carrying a mainland resident’s personal data out of the country is a cross-border transfer, and China’s Personal Information Protection Law attaches conditions to it: notice to the individual, separate consent, and one of the permitted transfer mechanisms (PIPL Articles 38–43). If your app is a critical information infrastructure operator or handles personal data above the regulated thresholds, the law can require that data be kept inside China to begin with (PIPL Article 40, with Cybersecurity Law Article 39 (formerly Article 37)). Whether those duties bite, and which mechanism fits, turns on your role and your volumes — a question for counsel, not a default setting.
Choosing a Firebase alternative: weigh it on both gates, not on speed
Here is the trap worth naming before you compare backends. The reason Firebase struggles in China — offshore hosting — is also the reason it clears neither gate. So an alternative that fixes only the offshore part, by being faster or more reachable, can still clear neither gate. Reachability is not permission.
That turns a feature comparison into two questions you can put to any candidate:
- Can it be hosted and filed in-country? An ICP filing needs a licensed mainland host and a mainland entity to attach to. An open-source backend you can run yourself can be placed on in-country infrastructure and filed; a managed service with no mainland footprint cannot. Where a backend is allowed to live decides whether gate one is even in reach.
- Where will China users’ personal data sit? If the honest answer is “offshore,” you are back inside PIPL’s cross-border regime no matter whose name is on the backend. If it is “in-country,” you have changed the legal question — not just the latency.
Judge each option against those two and the comparison stops being about features and starts being about whether you are allowed to ship. A backend that is merely fast in China is not the same as one you are licensed to run there — and only the second kind lasts.
This is a risk map, not a verdict. Which gates apply to your app, and how hard, depends on your entity, your data and who your users are — worth settling with counsel before you commit to a backend.
Where 21YunBox fits — a compliant overlay, not a migration
You do not have to choose between a backend you like and a China audience you are allowed to serve. 21YunBox adds the piece neither Firebase nor a drop-in replacement includes on its own: ICP-filed delivery from inside the mainland, placed in front of the origin you already run — no rebuild, no second codebase, and no move off the platform your team knows. Our China team maps which gates apply to your app, handles the ICP filing against an in-country host, and designs how visitor and user data is handled at the border so the PIPL question has a defensible answer. Keep Firebase as a global origin, or move to the backend that suits you — either way, the compliant in-country layer is what we bring.
Related reading: