Use Cloudflare R2 as a Zero Trust log destination
Last updated Mar 2, 2026 Note
Only available on Zero Trust Enterprise plans.
This tutorial covers how to build a Cloudflare R2 bucket to store logs, and how to connect the bucket to the Zero Trust Logpush service to store logs persistently and export them into other tools.
Before you begin
- Ensure Cloudflare R2 and the Zero Trust Logpush integration are included in your plan. For more information, contact your account team.
Create a Cloudflare R2 bucket
- In the Cloudflare dashboard ↗︎, go to the R2 Overview page. Go to Overview ↗
- Select Create bucket.
- Enter an identifiable name for the bucket, then select Create bucket.
Create an R2 API token
- Return to R2, then select Manage R2 API tokens.
- Select Create API token.
- In Permissions, select Object Read & Write.
- In Specify bucket(s), choose Apply to specific buckets only. Select the bucket you created.
- Configure other token settings to your preferences.
- Select Create API Token.
- Copy the Access Key ID, Secret Access Key, and endpoint URL values. You will not be able to access these values again.
- Select Finish.
Connect a Zero Trust Logpush job
- In Cloudflare One ↗︎, go to Insights > Logs. Select Manage Logpush.
- Select Connect a service.
- Choose which data sets and fields you want to send to your bucket. Select Next.
- Select S3 Compatible.
- In S3 Compatible Bucket Path, enter the name of your bucket.
- In Bucket region, enter
auto. - Enter the values for Access Key ID, Secret Access Key, and Endpoint URL in their corresponding fields.
- Select Push. If prompted, you do not need to prove ownership with a token challenge.
The Logpush job will send the selected Zero Trust logs to your R2 bucket.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/cloudflare-one/tutorials/r2-logs/#page","headline":"Use Cloudflare R2 as a Zero Trust log destination","description":"This tutorial covers how to build a Cloudflare R2 bucket to store Zero Trust logs. It also shows how to connect the bucket to the Zero Trust Logpush service.","url":"https://developers.cloudflare.com/cloudflare-one/tutorials/r2-logs/","inLanguage":"en","image":"https://developers.cloudflare.com/cloudflare-one/tutorials/r2-logs/og.png?v=548215f7eb23ae7e","dateModified":"2026-03-02","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Logging"]}
description: This tutorial explains how to use Cloudflare Tunnels with Kubernetes client-go credential plugins for authentication. By following these steps, you can securely access your Kubernetes cluster through a Cloudflare Tunnel. title: Use Cloudflare Tunnels with Kubernetes client-go credential plugins image: https://developers.cloudflare.com/cloudflare-one/tutorials/tunnel-kubectl/og.png?v=c450efa947b5a411
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/cloudflare-one/llms.txt
Use this file to discover all available pages before exploring further.
Docs