---
title: R2 Object Storage · Data Localization Suite docs
description: In the following sections, we will give you some details about how to configure R2 with Regional Services and Customer Metadata Boundary.
lastUpdated: 2025-04-04T19:42:25.000Z
source_url:
  html: https://a74404c8.preview.developers.cloudflare.com/data-localization/how-to/r2/index.md
  md: https://a74404c8.preview.developers.cloudflare.com/data-localization/how-to/r2/
---

In the following sections, we will give you some details about how to configure R2 with Regional Services and Customer Metadata Boundary.

## Regional Services

To configure Regional Services for hostnames [proxied](https://developers.cloudflare.com/dns/proxy-status/) through Cloudflare and ensure that processing of requesting objects from a [R2 Bucket](https://developers.cloudflare.com/r2/buckets/) occurs only in-region, follow these steps:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select an account.
2. Go to the **R2** tab.
3. Follow the steps to [create a Bucket](https://developers.cloudflare.com/r2/buckets/create-buckets/).
4. [Connect a bucket to a custom domain](https://developers.cloudflare.com/r2/buckets/public-buckets/#connect-a-bucket-to-a-custom-domain).
5. Run the [API POST](https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api) command on the configured bucket custom domain to create a `regional_hostnames` with a specific region.

Regional Services only applies to the custom domain configured for an R2 Bucket.

### Send logs to R2 via S3-Compatible endpoint

The following instructions will show you how to set up a Logpush job using an S3-compatible endpoint to store logs in an R2 bucket in the jurisdiction of your choice.

1. Create an [R2 bucket](https://developers.cloudflare.com/r2/get-started/) in your Cloudflare account and select the [jurisdiction](https://developers.cloudflare.com/r2/reference/data-location/#set-jurisdiction-via-the-cloudflare-dashboard) you would like to use.

2. Generate an API token for your R2 bucket. You have the following two options:

1) Set up a Logpush destination using [S3-compatible endpoint](https://developers.cloudflare.com/logs/get-started/enable-destinations/s3-compatible-endpoints/) and fill in the following fields:

* **Bucket**: Enter the name of the R2 bucket you created with the jurisdiction you would like to use.
* **Path** (optional): If you want, you can specify a folder path to organize your logs.
* **Endpoint URL**: Provide the S3 API endpoint for your bucket in the format `<account-id>.eu.r2.cloudflarestorage.com`. Do not include the bucket name, as it was set in the first field.
* **Bucket Region**: For instance, use `WEUR` to specify the EU region.
* **Access Key ID**: Enter the Token ID created previously (`325xxxxcd`).
* **Secret Access Key**: Use the SHA-256 hash of the token (`dxxxx391b`).

Complete the configuration by selecting the fields you want to push to your R2 bucket.

## Customer Metadata Boundary

With Customer Metadata Boundary set to `EU`, **R2** > **Bucket** > [**Metrics**](https://developers.cloudflare.com/r2/platform/metrics-analytics/) tab in the account dashboard will be populated.

Note

Additionally, customers can create R2 buckets with [jurisdictional restrictions set to EU](https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions). In this case, we recommend [using jurisdictions with the S3 API](https://developers.cloudflare.com/r2/reference/data-location/#using-jurisdictions-with-the-s3-api).

Refer to the [R2 documentation](https://developers.cloudflare.com/r2/) for more information.
