Bindings and platform features
Bindings give a worker access to resources through env. In OpenFlare you declare a binding in your wrangler-style config, create the underlying resource through the console, the of CLI or the management API, and of deploy resolves each binding name to the platform resource.
A worker may have at most 64 bindings. Binding names must be unique across vars, secrets, bindings, version metadata and workflows.
Variables, JSON variables and secrets
Section titled “Variables, JSON variables and secrets”Variables and secrets are exposed on env but are not resource bindings; they share the namespace of binding names.
| Kind | Where to set it | Notes |
|---|---|---|
| Variable (string) | [vars], of deploy --var K:V, console Variables tab, PUT .../vars/{key} |
Key matches ^[A-Za-z_][A-Za-z0-9_]{0,127}$ in the console. |
| JSON variable | [vars] with a typed value, console JSON variables editor, .../json-vars |
Up to 16 KiB per key. Scoped to a version. Requires the cell jsonBindings capability. |
| Secret | of secret put, --secrets-file, console Secrets section, PUT .../secrets/{key} |
Write-only. Encrypted with AES-256-GCM under PLANE_SECRETS_KEY. |
If a cell does not advertise jsonBindings, the console only lets you save JSON variables as a candidate version (it shows “This cell supports saving JSON variables as a candidate only.”). Writes through the vars and secrets routes publish immediately and return a revision; see Console.
Workers KV
Section titled “Workers KV”- Config:
[[kv_namespaces]]withbindingandid. - Create:
of kv namespace create <title>, the console resources area, or the API. - Data operations:
of kv key list|get|put|delete,of kv bulk put|delete. - Limits: control-plane values up to 1 MiB;
expirationTtlat least 60 s; bulk 1-1000 items, 8 MiB total, not atomic.
KV is the closest to drop-in compatibility with Cloudflare.
- Config:
[[d1_databases]]withbinding,database_name/database_id, and optionallymigrations_dirandmigrations_pattern. - Create:
of d1 create <name>, the console, or the API. - Operate:
of d1 query,of d1 migrations list|status|apply|create,of d1 stats|info|promote|promotions. - Migrations are never applied by a deploy; run
of d1 migrations apply. - Caveats:
migrations_tableis not supported. Deleting a database is refused while a version references it. Follower and time-travel operations are offline restore commands; the console has no online UI for them.
- Config:
[[r2_buckets]]withbindingandbucket_name. - Create:
of r2 bucket create <name>, the console, or the API. - Operate:
of r2 object list|head|get|put|delete. - Caveats:
jurisdictionandstorage_classare rejected. Conditional requests (onlyIf) depend on the storage backend. Control-plane object operations are small (4 MiB at the cell, effectively under 1 MiB through JSON); use the binding from a worker for larger objects.
Storage backends
Section titled “Storage backends”A bucket is stored either on the cell’s local storage or proxied to Cloudflare R2 or Amazon S3. Pick the backend when you create the bucket. See R2 storage backends for the fields, connection test, credential rotation and detach flow.
In the console, the R2 page is under Storage & Databases > R2 Object Storage. A worker’s Bindings tab links an R2 binding to the bucket’s object browser.
Durable Objects
Section titled “Durable Objects”- Config:
[durable_objects]bindings and[[migrations]]declaring classes. - Lifecycle:
of durable-objects list|transfer|rename|delete|stats|instances. These are explicit commands that deploy never replays. - Rules: deleting a class returns
409while an active version references it. Transfer fails if the destination class exists or the source has transfer lineage.transferred_classesin migrations is rejected. - Caveats: DO tenants never freeze (no scale to zero) and do not hibernate.
Hyperdrive
Section titled “Hyperdrive”- Config:
[[hyperdrive]]withbindingandid; OpenFlare adds adatabase_tenantextension. - Create:
of hyperdrive createwith a credential-lesspostgres://host[:port]/dborigin; the password is read from stdin only. - Caveat: deletion is refused while a version references it. Hyperdrive is a partial implementation.
Workers Cache and purge
Section titled “Workers Cache and purge”- Cache API: per host, in memory and not persistent.
ignoreMethod,ignoreSearch,ignoreVaryandcacheNameare not implemented. There is no edgecacheTtltier. - Purge:
POST /api/v1/cells/{cell}/teams/{team}/cache/purgewith exactly one ofworkerName,tags(1-1000),pathPrefix(starts with/) orall: true. List recent purges withGET .../cache/purges. It needs a cell with thecachePurgecapability (otherwise409) and entries are pod-local. Purge operations expire after one hour.
Static assets
Section titled “Static assets”- Config:
[assets]withdirectoryandbinding, plushtml_handling(four modes) and routing options. - Deploy:
of deployuploads files by digest and a manifest, then references them from the version. - Limits: 20,000 files, 25 MiB per file, 512 MiB total at runtime; through the plane 8192 files, 8 MiB per object, 512 MiB team quota. See Limits.
Secrets Store
Section titled “Secrets Store”Status: Partial. Secrets Store is implemented (a SECRETS_STORE binding type, plane routes, CLI commands and a console page), but it is not a full copy of Cloudflare’s product.
- Config:
[[secrets_store_secrets]]. - Manage:
of secrets-store list|put|delete|publish(values on stdin). - API:
PUT,GETandDELETEon.../secrets-store/{storeId}/{secretName}andGET .../{secretName}/referencesto see which workers use a secret. Updates useIf-MatchandIf-None-Matchentity tags; a stale tag returns412. - Cell requirement: the cell must advertise the
secretsStorecapability, otherwise the plane refuses withVRT_CELL_CAPABILITY_MISSING(409). - Console: secret references appear on the Binding resources page.
Analytics Engine
Section titled “Analytics Engine”- Config:
[[analytics_engine_datasets]]. - Behavior: data points are written as Parquet per tenant. There is no hosted SQL API; query with
of analytics query <dataset>or external tools such as DuckDB.
Queues
Section titled “Queues”- Config:
[[queues.producers]]and consumers. - Manage:
of queues list|create|update|send|stats|delete. Messages are UTF-8, 1 byte to 128 KiB.
Cron Triggers
Section titled “Cron Triggers”- Config:
[triggers] crons = ["*/5 * * * *"]. Cron is listed as drop-in compatible.
Workflows
Section titled “Workflows”- Config:
[[workflows]];of deployupserts declarations. - Manage:
of workflows list|upsert|delete|stats|instances,of wfop. - Limits:
limits.stepsat most 100,000. Workflow tenants never freeze.
Other bindings
Section titled “Other bindings”Vectorize, Secrets Store and Flagship resources are managed from the console’s Binding resources page as well as the CLI and API.
Service bindings (with entrypoint and props), worker loaders, version metadata, rate limiting (per-process fixed window), Vectorize, Flagship, Images, outbound send_email, K2 (produce only), Browser and Tail Workers exist in partial form. See Compatibility for the matrix, including features that are not supported.