Skip to content

Commit 61157fd

Browse files
penalosadario-piotrowiczlrapoport-cf
authored
Remote Bindings GA (#25153)
* Remote Bindings GA * document --local * Update src/content/changelog/workers/2025-09-16-remote-bindings-ga.mdx Co-authored-by: Dario Piotrowicz <[email protected]> * Update src/content/changelog/workers/2025-09-16-remote-bindings-ga.mdx Co-authored-by: lrapoport-cf <[email protected]> * Apply suggestion from @lrapoport-cf Co-authored-by: lrapoport-cf <[email protected]> * Update 2025-09-16-remote-bindings-ga.mdx --------- Co-authored-by: Dario Piotrowicz <[email protected]> Co-authored-by: lrapoport-cf <[email protected]>
1 parent 12cc2e7 commit 61157fd

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Remote bindings GA - Connect to remote resources (D1, KV, R2, etc.) during local development
3+
description: You can now connect to R2 buckets, D1 databases, and other resources running on Cloudflare, while running your Worker's code locally, on your own machine.
4+
products:
5+
- workers
6+
date: 2025-09-16
7+
---
8+
9+
import { WranglerConfig, Aside } from "~/components";
10+
11+
Three months ago [we announced the public beta](/changelog/2025-06-18-remote-bindings-beta/) of [remote bindings](/workers/development-testing/#remote-bindings) for local development. Now, we're excited to say that it's available for everyone in Wrangler, Vite, and Vitest without using an experimental flag!
12+
13+
With remote bindings, you can now connect to deployed resources like [R2 buckets](/r2/) and [D1 databases](/d1/) while running 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.
14+
15+
## Example configuration
16+
17+
To enable remote bindings, add `"remote" : true` to each binding that you want to rely on a remote resource running on Cloudflare:
18+
19+
<WranglerConfig>
20+
21+
```jsonc title="wrangler.jsonc"
22+
{
23+
"name": "my-worker",
24+
"compatibility_date": "$today",
25+
26+
"r2_buckets": [
27+
{
28+
"bucket_name": "screenshots-bucket",
29+
"binding": "screenshots_bucket",
30+
"remote": true,
31+
},
32+
],
33+
}
34+
```
35+
36+
</WranglerConfig>
37+
38+
When remote bindings are configured, your Worker **still executes locally**, but all binding calls are proxied to the deployed resource that runs on Cloudflare's network.
39+
40+
**You can [try out remote bindings](/workers/development-testing/#remote-bindings) for local development today with:**
41+
42+
- [Wrangler v4.37.0](/workers/wrangler/)
43+
- The [Cloudflare Vite Plugin](/workers/vite-plugin/)
44+
- The [Cloudflare Vitest Plugin](/workers/testing/vitest-integration/)

src/content/docs/workers/development-testing/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ By default, running `wrangler dev` / `vite dev` (when using the [Vite plugin](/w
6565
During local development, your Worker code interacts with these bindings using the exact same API calls (such as `env.MY_KV.put()`) as it would in a deployed environment. These local resources are initially empty, but you can populate them with data, as documented in [Adding local data](/workers/development-testing/local-data/).
6666

6767
- By default, bindings connect to **local resource simulations** (except for [AI bindings](/workers-ai/configuration/bindings/), as AI models always run remotely).
68-
- You can override this default behavior and **connect to the remote resource**, on a per-binding basis. This lets you connect to real, production resources while still running your Worker code locally.
68+
- You can override this default behavior and **connect to the remote resource** on a per-binding basis with [remote bindings](/workers/development-testing/#remote-bindings). This lets you connect to real, production resources while still running your Worker code locally.
69+
- When using `wrangler dev`, you can temporarily disable all [remote bindings](/workers/development-testing/#remote-bindings) (and connect only to local resources) by providing the `--local` flag (i.e. `wrangler dev --local`)
6970

7071
## Remote bindings
7172

0 commit comments

Comments
 (0)