Learn how the location of data stored in Workers KV is determined, including how you can restrict a namespace to a specific jurisdiction.
By default, data written to a Workers KV namespace is stored in KV's central data stores with no jurisdictional restriction, and then cached globally across Cloudflare's network, allowing your data to be read with low latency from anywhere in the world. Refer to How KV works for more information.
Jurisdictions are used to create Workers KV namespaces that only durably store data within a region, to help comply with data locality regulations such as the GDPR ↗︎ or FedRAMP ↗︎.
Workers may still access a namespace constrained to a jurisdiction from anywhere in the world, and KV data can be cached outside the jurisdiction location on Cloudflare's network. The jurisdiction constraint only controls where the namespace's data is durably stored. Consider using Regional Services to control the regions from which Cloudflare responds to requests.
| Parameter | Data Storage Location |
|---|---|
| eu | European Union |
| fedramp | FedRAMP-compliant data centers |
| us | United States of America |
To create a namespace restricted to a jurisdiction, pass the --jurisdiction flag to wrangler kv namespace create:
npx wrangler@latest kv namespace create <NAMESPACE_NAME> --jurisdiction=euTo create a namespace restricted to a jurisdiction, include the jurisdiction field in the request body when you create a namespace:
Required API token permissions
At least one of the following token permissions is required:Workers KV Storage Write
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/storage/kv/namespaces" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"title": "<NAMESPACE_NAME>",
"jurisdiction": "eu"
}'