Creating Access Key and Secret Key
- Log in to: https://dash.cloudflare.com/
- Go to “My Profile” in the top right corner and navigate to the “API Tokens” tab.
- At the bottom of the page, under “API Keys,” you’ll see the R2 API Tokens section.
- Click “Create API Token” and choose “Custom Token.”
Set the following permissions:
Account → R2 Storage → Read (and Write if needed)
Once the token is created, you will be shown the Access Key ID and Secret Access Key.
Make sure to save them, as they will not be shown again.
Finding the Account ID From the Cloudflare dashboard (https://dash.cloudflare.com/), navigate to the R2 section from the left menu. The R2 Bucket list will appear in the top-right area.
The Account ID is usually visible in the URL or at the top of the page.
Alternatively, you can find it under Account Home → Overview.
Bucket Name and Prefix (Folder) Information You will see the list of buckets you’ve created in the R2 panel.
Example: logs, network-events The prefix refers to the subfolders within the bucket.
For example, if your folder structure looks like this:
logs/
├── 2025/
├── 07/
├── 25/
└── firewall.json.gzThen the prefix should be entered as: logs/2025/07/25
Cloudflare R2 follows the same logic as AWS S3. Everything is treated as an object, so the prefix acts like a folder.
Adding the Source to Logsign
Go to Settings > Data Collection > API, then select the relevant product (Cloudflare R2).
On the screen that appears, fill in the required fields using the information you previously gathered from the Cloudflare dashboard (as outlined in the steps above).
Important Notes for This Integration:
You must specify both the bucket name and the prefix. The bucket name is already created and known to you. The prefix (e.g., logs/2025/07/25) must also be known and correctly entered. You can add multiple buckets and prefixes, but be sure to align them in the same order (bucket1 → prefix1, bucket2 → prefix2, etc.).
After Submission:
Once the information is entered correctly, add the source and wait for the logs to start coming in. For Log Start Date, you can go back up to 1 month, but not further. The prefix you provide must also fall within this 1-month window. If it doesn’t, the parser may timeout and the logs may not be retrieved successfully.