Status: accepted · Date: 2026-11-28
Enforcement: scripts/check-production-config.mjs and packages/project-setup-cli/src/hyperdrive.mjs check, both steps of .github/workflows/deploy-prod.yml; pnpm doctor for the tracked Worker config.
Four projects created from the template each wrote this decision on their own: the database in Frankfurt, the bucket in R2's EU jurisdiction, a placement hint toward the database, and the same caveat about where a Worker runs. One of them also wrote a deploy check. The template had none of it, so every project re-derived the facts and only one verified them.
Decision
- EU hosting is an opt-in with one switch.
"DATA_RESIDENCY": "eu"in thevarsofapps/web/wrangler.jsoncrecords it.pnpm run setup --data-residency euwrites it (the wizard asks once;--data-residency noneremoves it). The template itself ships without it. - With the opt-in, data at rest lives in the European Union:
- the production database is in an EU region. On Neon that is
aws-eu-central-1(Frankfurt), the only Neon region inside the Union; - files are in an R2 bucket created with the
eujurisdiction and reached throughhttps://<account>.eu.r2.cloudflarestorage.com; a bucket bound inr2_bucketssets"jurisdiction": "eu"; - the Worker's
placement.regionis an EU cloud region next to the database (aws:eu-central-1by default).
- the production database is in an EU region. On Neon that is
- Every production deploy verifies it and refuses to publish otherwise.
check-production-config.mjsreads the placement hint, the bound buckets,STORAGE_ENDPOINTandDATABASE_URL;hyperdrive.mjs checkreads the origin host of the Hyperdrive config the Worker uses. Both print names and regions, never a value. A database that is not on Neon cannot be located from its URL: the check says so in a warning and the project confirms the region with its provider. - The claim this supports is "data is stored in the EU". It does not support "data is processed only in the EU"; the table below says why.
"EU" means the Union. London (aws:eu-west-2, gcp:europe-west2) and Zurich (aws:eu-central-2, gcp:europe-west6) carry a European prefix and are refused.
What cannot be pinned
Read from the providers' pages on 2026-11-28.
| Part | What the opt-in gives | What stays open |
|---|---|---|
| Postgres rows | In the EU region; Neon cannot move a project to another region after creation | Backups and dumps follow where you put them: a backup bucket needs the EU jurisdiction too, and the check does not see it |
| R2 objects | Stored in the EU: a jurisdiction is a guarantee, unlike a location hint, and is fixed at creation | Nothing |
| Worker execution | A latency hint toward the EU for fetch handlers | Placement is a performance feature, not a boundary. A request is received at the data center closest to the visitor and TLS ends there. Keeping execution inside a region needs the Data Localization Suite, an Enterprise-only add-on. |
| Cron tick | Nothing | Cloudflare does not document where a scheduled handler runs |
| Hyperdrive | Its pool is placed "in one or more regions closest to your origin database" | The location is Cloudflare's choice and is not configurable |
| Workers Logs and traces | Nothing | Without the Customer Metadata Boundary (Enterprise), logs "may be stored in Cloudflare's core data centers globally". Keep personal data out of logs. |
| Rate limiter, email, push | Nothing | The Web Vitals limiter counts per client address at the edge; email and push leave through their providers |
| Other processors | Nothing | AI providers, payment providers, the error tracker and analytics each have their own location and contract |
Consequences
- Public and legal copy says "data is stored in the EU". "Hosted in Germany" or "processed only in the EU" needs the Data Localization Suite or the Node target on a server in the EU (production guide), and legal advice; neither is decided here.
- The two things the opt-in cannot do for you cannot be changed later: create the Neon project in the EU region and the R2 bucket with the EU jurisdiction before the first real user. Setup prints both steps.
- Pull request previews copy
placement, and their database is a branch of the production Neon project, so previews stay in the same region. They do not copyDATA_RESIDENCY; the check runs on the production deploy only. - A project that opted in and later moves its database outside the EU fails its next deploy, which is the point.
- The opt-in lists what is verified, not every processor. A project still writes its own list of subprocessors.
Alternatives
- EU hosting as the template's default. Projects for Brazil place their database in São Paulo; a default that half the projects must undo is not a default.
- Documentation only. Four projects wrote the document and one wrote the check; a region is one typo away from wrong, and a bucket's jurisdiction cannot be repaired after the fact.
- Promise processing in the EU. It is not ours to promise on this plan.