···11+---
22+"@opennextjs/cloudflare": minor
33+---
44+55+use `wrangler r2 bulk put` for R2 cache population
-27
packages/cloudflare/README.md
···5555 # or
5656 bun opennextjs-cloudflare build && bun opennextjs-cloudflare deploy
5757 ```
5858-5959-### Batch Cache Population (Optional, Recommended)
6060-6161-For improved performance with large caches, you can enable batch upload by providing R2 credentials via .env or environment variables.
6262-6363-Create a `.env` file in your project root (automatically loaded by the CLI):
6464-6565-```bash
6666-R2_ACCESS_KEY_ID=your_access_key_id
6767-R2_SECRET_ACCESS_KEY=your_secret_access_key
6868-CF_ACCOUNT_ID=your_account_id
6969-```
7070-7171-You can also set the environment variables for CI builds.
7272-7373-**Note:**
7474-7575-You can follow documentation https://developers.cloudflare.com/r2/api/tokens/ for creating API tokens with appropriate permissions for R2 access.
7676-7777-**Benefits:**
7878-7979-- Significantly faster uploads for large caches using parallel transfers
8080-- Reduced API calls to Cloudflare
8181-- Automatically enabled when credentials are provided
8282-8383-**Fallback:**
8484-If these environment variables are not set, the CLI will use standard Wrangler uploads. Both methods work correctly - batch upload is simply faster for large caches.