Skip to content

Commit f94d15f

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

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
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 restriction and a location hint are both provided, the jurisdiction takes precedence and the location hint is ignored.

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

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,68 @@ 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+
### Supported locations
23+
24+
| Parameter | Location |
25+
| --------- | ------------------------------ |
26+
| eu | The European Union |
27+
| fedramp | FedRAMP-compliant data centers |
28+
29+
## Jurisdictional Restrictions
30+
31+
Jurisdictional Restrictions guarantee D1 databases operate within a specific jurisdiction.
32+
33+
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/).
34+
35+
### Set jurisdiction via the Cloudflare dashboard
36+
37+
1. In the Cloudflare dashboard, go to the **D1 SQL Database** page.
38+
39+
<DashButton url="/?to=/:account/workers/d1" />
40+
41+
2. Select **Create Database**.
42+
3. Enter a name for the database.
43+
4. Under **Data location**, select **Specify jurisdiction** and choose a jurisdiction from the list.
44+
5. Select **Create** to complete the database creation process.
45+
46+
### Using jurisdictions from Workers
47+
48+
The example below shows how to create an R2 bucket in the `eu` jurisdiction using Wrangler
49+
50+
```sh
51+
npx wrangler@latest d1 create d1-with-jurisdiction --jurisdiction eu
52+
```
53+
54+
### Using jurisdictions from the REST API
55+
56+
```curl
57+
curl -X POST "https://api.cloudflare.com/client/v4/accounts/<account_id>/d1/database" \
58+
-H "Authorization: Bearer $token" \
59+
-H "Content-Type: application/json" \
60+
--data '{"name": "db-wth-jurisdiction", "jurisdiction": "eu" }'
61+
62+
```
63+
64+
### Available jurisdictions
65+
66+
The following jurisdictions are supported:
67+
68+
| Jurisdiction | Jurisdiction description |
69+
| ------------ | ------------------------ |
70+
| eu | European Union |
71+
| fedramp | FedRAMP |
72+
73+
:::note
74+
75+
Note that jurisdiction restrictions can only be set on database creation. If a jurisdiction and a location hint are both provided, the jurisdiction takes precedence and the location hint is ignored.
76+
:::
77+
1678
## Provide a location hint
1779

1880
Location hint is an optional parameter you can provide to indicate your desired geographical location for your primary database instance.
@@ -51,6 +113,7 @@ To provide a location hint when creating a database via the dashboard:
51113
1. In the Cloudflare dashboard, go to the **D1** page.
52114

53115
<DashButton url="/?to=/:account/workers/d1" />
116+
54117
2. Select **Create database**.
55118
3. Provide a database name and an optional **Location**.
56119
4. Select **Create** to create your database.
@@ -78,4 +141,6 @@ With read replication enabled, D1 creates and distributes read-only copies of th
78141

79142
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.
80143

81-
Refer to [D1 read replication](/d1/best-practices/read-replication/) for more information.
144+
If jurisdictional restrictions are present, replicas are only created within the jurisdiction set on creation.
145+
146+
Refer to [D1 read replication](/d1/best-practices/read-replication/) for more information.

0 commit comments

Comments
 (0)