R2 Connector
Access documents stored in Cloudflare R2 buckets
How it works
The R2 connector pulls in all documents from the specified Cloudflare R2 bucket. It supports various file formats including PDF, DOC, DOCX, TXT, and more.
Documents are updated every 1 day.
Setting up
Authorization
- Log into your Cloudflare dashboard.
- Navigate to “R2” in the sidebar.
- Click on “Manage R2 API Tokens”.
- Click “Create API token”.
-
Give your token a name (e.g., “OnyxR2Connector”) and select the appropriate permissions (Object Read only).
-
Click “Create API Token”.
-
On the next screen, you’ll see your Access Key ID and Secret Access Key. Make sure to copy these immediately as you won’t be able to access the Secret Access Key again.
-
To find your Account ID, go to the Overview page in your Cloudflare dashboard. The Account ID is listed in the url as the final substring.
Indexing
- Navigate to the Admin Dashboard and select the R2 Connector.
- In Step 1, provide your R2 credentials:
- Provide your R2 Access Key ID, Secret Access Key, and Account ID for authentication.
- These credentials will be used to access your R2 buckets.
R2 Access Key ID: R2 Secret Access Key: Account ID:
-
Click “Update” to save your credentials.
-
In Step 2, specify which R2 bucket you want to make searchable:
- Click “Connect” to begin indexing.
Understanding R2 Structure
Cloudflare R2 organizes data into buckets, similar to Amazon S3. Each bucket can contain an unlimited number of objects (files). You can think of a bucket as a root directory, and the objects as files within that directory.
For more information on R2 structure, visit the Cloudflare R2 documentation.