Remote Development
Void normally uses local D1, KV, and R2 through Miniflare. Remote mode lets you run local code against a project deployed to your Void platform, for example to test with existing data or investigate an issue.
Calls such as db.select() and env.KV.get() use the deployed resources without changing your application code. Writes affect real data, so use a staging project when possible.
Prerequisites
Before enabling remote mode, you need:
- Connect to your team's platform with
void connect <url>. It signs you in when needed. - Link a project with
void project link. Deploy it at least once so its resources exist.
Enabling Remote Mode
In void.config.ts (persistent)
json
{
"remote": true
}Via environment variable (one-off)
bash
VOID_REMOTE=1 vite devVOID_REMOTE=0 disables remote mode even if void.config.ts has "remote": true.
Supported Bindings
| Binding | Local (default) | Remote |
|---|---|---|
| D1 | Local SQLite via Miniflare | Remote D1 database |
| KV | Local file-backed KV | Remote KV namespace |
| R2 | Local file-backed R2 | Remote R2 bucket |
| AI | Always proxied | Always proxied |
AI requests use your platform’s account and allowance in both local and remote mode. There is no local AI simulator.
Checking Remote Mode
When the dev server starts with remote mode active, it prints:
[void] Remote bindings active
DB → remote D1
KV → remote KV
STORAGE → remote R2Limitations
- Network latency: each binding call makes a network request, so responses may be slower than local development.
- R2 multipart uploads:
createMultipartUpload()andresumeMultipartUpload()are not supported in remote mode. - R2 range and conditional reads: in remote mode,
get()ignores request headers passed asrangeoronlyIfand returns the whole object. For example,get(key, { range: request.headers, onlyIf: request.headers })returns the whole object when the request has aRangeorIf-None-Matchheader.get()throws whenrangeoronlyIfis an object that asks for a byte range or a condition, such as{ offset: 0, length: 100 }or{ etagMatches: etag }. - R2 conditional writes:
put(..., { onlyIf })requires an updated platform and project deployment. Failed preconditions returnnull. - R2 metadata and list options: custom metadata, HTTP metadata, and
list()withdelimiter,startAfter, orincluderequire an updated project deployment. Without one,list()with these options andput()with metadata other thancontentTypethrow an error. - D1 dump:
db.dump()is not supported in remote mode. - D1 batches:
db.batch()requires an updated platform and project deployment.