# Host in Europe: an opt-in the deploy verifies

A project that must store its data in the EU opts in once with pnpm setup; every production deploy then refuses a placement hint, R2 bucket or Neon database outside the Union.

- **New: `pnpm run setup --data-residency eu`.** The wizard asks once where data at rest must be stored. The opt-in writes `"DATA_RESIDENCY": "eu"` into the `vars` of `apps/web/wrangler.jsonc`, sets the placement to `aws:eu-central-1` unless you name another EU region, and refuses a region outside the Union, London and Zurich included. `--data-residency none` removes it. The template ships without it. See [Host in Europe](/docs/production#host-in-europe). ([d61b56a](https://github.com/CarlosZiegler/template-cloudflare/commit/d61b56a15eb5dc80b61bebeb570baf057026554d))
- **The production deploy checks it.** With the opt-in, `scripts/check-production-config.mjs` refuses to publish when the placement hint is not an EU region, a bound R2 bucket or `STORAGE_ENDPOINT` lacks the EU jurisdiction, or `DATABASE_URL` is a Neon host outside the EU; the Hyperdrive check reads the origin's region too. A database on another provider gets a warning to confirm by hand. No value is printed. `pnpm doctor` checks the tracked config. ([d61b56a](https://github.com/CarlosZiegler/template-cloudflare/commit/d61b56a15eb5dc80b61bebeb570baf057026554d))
- **What it promises, in one record.** [ADR-0021](/docs/adr/0021-host-in-europe) replaces the decision four projects each wrote on their own: data is stored in the EU; where a Worker executes, where the cron runs and where Workers Logs are kept cannot be pinned on this plan. ([0ca814f](https://github.com/CarlosZiegler/template-cloudflare/commit/0ca814fa0ddfad7033e1cf55f7535bf3b34b9ac8))
