Skip to content

Commit a29d606

Browse files
committed
Update data-location to include jurisdiction
1 parent 92bcf04 commit a29d606

File tree

2 files changed

+77
-2
lines changed

2 files changed

+77
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: D1 now supports jurisdictional restrictions.
3+
description: D1 now has the capability to set jurisdictional restrictions on database creation. This restricts the location to run and store the d1 database.
4+
products:
5+
- d1
6+
- workers
7+
date: 2025-09-11
8+
---
9+
10+
You can now set a [jurisdiction](/d1/configuration/data-location/) when creating a d1 database. Note that if a jurisdiction is provided, the location hint is ignored.

src/content/docs/d1/configuration/data-location.mdx

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ Learn how the location of data stored in D1 is determined, including where the l
1313

1414
By default, D1 will automatically create your primary database instance in a location close to where you issued the request to create a database. In most cases this allows D1 to choose the optimal location for your database on your behalf.
1515

16+
## Restrict D1 Databases to a jurisdiction
17+
18+
Jurisdictions are used to create D1 databases that only run and store data within a region to comply with local regulations such as the [GDPR](https://gdpr-info.eu/) or [FedRAMP](https://blog.cloudflare.com/cloudflare-achieves-fedramp-authorization/).
19+
20+
Workers may still access the database constrained to a jurisdiction from anywhere in the world. The jurisdiction constraint only controls where the database itself runs and persists data. Consider using [Regional Services](/data-localization/regional-services/) to control the regions from which Cloudflare responds to requests.
21+
22+
23+
### Supported locations
24+
25+
| Parameter | Location |
26+
| --------- | ---------------------------- |
27+
| eu | The European Union |
28+
| fedramp | FedRAMP-compliant data centers |
29+
30+
1631
## Provide a location hint
1732

1833
Location hint is an optional parameter you can provide to indicate your desired geographical location for your primary database instance.
@@ -72,10 +87,60 @@ D1 supports the following location hints:
7287
D1 location hints are not currently supported for South America (`sam`), Africa (`afr`), and the Middle East (`me`). D1 databases do not run in these locations.
7388
:::
7489

90+
## Jurisdictional Restrictions
91+
92+
Jurisdictional Restrictions guarantee D1 databases operate within a specific jurisdiction.
93+
94+
Use Jurisdictional Restrictions when you need to ensure data is run and stored within a jurisdiction to meet data residency requirements, including local regulations such as the [GDPR](https://gdpr-info.eu/) or [FedRAMP](https://blog.cloudflare.com/cloudflare-achieves-fedramp-authorization/).
95+
96+
### Set jurisdiction via the Cloudflare dashboard
97+
98+
1. In the Cloudflare dashboard, go to the **D1 SQL Database** page.
99+
100+
<DashButton url="/?to=/:account/workers/d1" />
101+
2. Select **Create Database**.
102+
3. Enter a name for the database.
103+
4. Under **Data location**, select **Specify jurisdiction** and choose a jurisdiction from the list.
104+
5. Select **Create** to complete the database creation process.
105+
106+
### Using jurisdictions from Workers
107+
108+
The example below shows how to create an R2 bucket in the `eu` jurisdiction using Wrangler
109+
110+
```sh
111+
npx wrangler@latest d1 create d1-with-jurisdiction --jurisdiction eu
112+
```
113+
114+
### Using jurisdictions from the REST API
115+
116+
```curl
117+
curl -X POST "https://api.cloudflare.com/client/v4/accounts/<account_id>/d1/database" \
118+
-H "Authorization: Bearer $token" \
119+
-H "Content-Type:application/json" --data '{"name": "db-wth-jurisdiction", "jurisdiction": "eu" }'
120+
121+
```
122+
123+
### Available jurisdictions
124+
125+
The following jurisdictions are supported:
126+
127+
| Jurisdiction | Jurisdiction description |
128+
| ------------ | ------------------------ |
129+
| eu | European Union |
130+
| fedramp | FedRAMP |
131+
132+
:::note
133+
134+
Note that jurisdictions can only be set on database creation. If a jurisdiction and location hint are provided, the location hint is ignored.
135+
136+
:::
137+
75138
## Read replica locations
76139

77140
With read replication enabled, D1 creates and distributes read-only copies of the primary database instance around the world. This reduces the query latency for users located far away from the primary database instance.
78141

79-
When using D1 read replication, D1 automatically creates a read replica in [every available region](/d1/configuration/data-location#available-location-hints), including the region where the primary database instance is located.
142+
When using D1 read replication, D1 automatically creates a read replica in [every available region](/d1/configuration/data-location#available-location-hints), including the region where the primary database instance is located.
143+
144+
If jurisdictional restrictions are present, replicas are only created within the jurisdiction set on creation.
80145

81-
Refer to [D1 read replication](/d1/best-practices/read-replication/) for more information.
146+
Refer to [D1 read replication](/d1/best-practices/read-replication/) for more information.

0 commit comments

Comments
 (0)