|
| 1 | +--- |
| 2 | +title: Remote bindings public beta - Connect to remote resources during local development |
| 3 | +description: We are excited to introduce beta support for remote bindings for local development, allowing you to connect to deployed resources like R2 buckets and D1 databases, all while running your Worker code on your local machine. |
| 4 | +products: |
| 5 | + - workers |
| 6 | +date: 2025-06-18T01:00:00Z |
| 7 | +--- |
| 8 | + |
| 9 | +import { WranglerConfig, Aside } from "~/components"; |
| 10 | + |
| 11 | +Today [we announced the public beta](https://github.com/cloudflare/workers-sdk/discussions/9660) of [remote bindings](/workers/development-testing/#remote-bindings) for local development: allowing you to connect to deployed resources like R2 buckets and D1 databases while running your Worker code on your local machine. This means you can test your local code changes against real data and services, without the overhead of deploying for each iteration. |
| 12 | + |
| 13 | +## Example configuration |
| 14 | + |
| 15 | +To specify which bindings you'd like to connect to remotely, simply add the `"experimental_remote" : true` setting in your Wrangler configuration: |
| 16 | + |
| 17 | +<WranglerConfig> |
| 18 | + |
| 19 | +```jsonc title="wrangler.jsonc" |
| 20 | +{ |
| 21 | + "name": "my-worker", |
| 22 | + "compatibility_date": "$today", |
| 23 | + |
| 24 | + "r2_buckets": [ |
| 25 | + { |
| 26 | + "bucket_name": "screenshots-bucket", |
| 27 | + "binding": "screenshots_bucket", |
| 28 | + "experimental_remote": true, |
| 29 | + }, |
| 30 | + ], |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +</WranglerConfig> |
| 35 | + |
| 36 | +When remote bindings are configured, your Worker **still executes locally**, but all binding calls are proxied to the deployed resource. |
| 37 | + |
| 38 | +**You can try out remote bindings for local development today with:** |
| 39 | + |
| 40 | +- [Wrangler v4.20.3](/workers/development-testing/#using-wrangler-with-remote-bindings): Use the `wrangler dev --x-remote-bindings command`. |
| 41 | +- The [Cloudflare Vite Plugin](/workers/development-testing/#using-vite-with-remote-bindings): Refer to the documentation for how to enable in your Vite config. |
| 42 | +- The [Cloudflare Vitest Plugin](/workers/development-testing/#using-vitest-with-remote-bindings): Refer to the documentation for how to enable in your Vitest config. |
| 43 | + |
| 44 | +<Aside type="tip"> |
| 45 | + Learn more and provide feedback in [our beta |
| 46 | + announcement](https://github.com/cloudflare/workers-sdk/discussions/9660). |
| 47 | +</Aside> |
0 commit comments