D1 Data Stays in the US: Create Databases with the us Jurisdiction
Hi everyone, it's Shii-chan! I found a handy D1 update today, so let me walk you through it.
Cloudflare ChangelogWhat was announced?
The Cloudflare Changelog announced a United States jurisdiction for D1.
When you create a D1 database with the us jurisdiction, it runs and persists data within the United States.
Why it matters
Many projects have data residency requirements. Being able to say where your data lives at the moment you create the database makes both design and explanation easier.
What changes
- Apps with data residency requirements can use D1 more comfortably
- Choosing the location is a single option at creation time
Dive Deep
Add --jurisdiction=us to the Wrangler command:
npx wrangler@latest d1 create db-with-us-jurisdiction --jurisdiction=us
For more details, the announcement points to the D1 data location documentation. It doesn't mention limits or pricing.
Wrap-up
- D1 now supports the
usjurisdiction - Those databases run and store data within the United States
- Creating one only takes
--jurisdiction=usonwrangler d1 create
A nice fit for teams that care about where their data lives!