Type RawConfig
File match wrangler.json wrangler.jsonc wrangler.toml
Schema URL https://catalog.lintel.tools/schemas/schemastore/wrangler-cli/latest.json
Source https://www.unpkg.com/wrangler/config-schema.json

Validate with Lintel

npx @lintel/lintel check
Type: RawConfig

Definitions

RawConfig object
$schema string
env Record<string, object>

The env section defines overrides for the configuration for different environments.

All environment fields can be specified at the top level of the config indicating the default environment settings.

  • Some fields are inherited and overridable in each environment.
  • But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.

For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments

Default:
{}
name string

The name of your Worker. Alphanumeric + dashes only.

account_id string

This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable.

compatibility_date string

A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.

More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates

compatibility_flags string[]

A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.

More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/

Default:
[]
main string

The entrypoint/path to the JavaScript file that will be executed.

find_additional_modules boolean

If true then Wrangler will traverse the file tree below base_dir; Any files that match rules will be included in the deployed Worker. Defaults to true if no_bundle is true, otherwise false.

preserve_file_names boolean

Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, 34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico.

base_dir string

The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the main entry point of the Worker if not specified.

workers_dev boolean

Whether we use ..workers.dev to test and deploy your Worker.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev

Default: true
preview_urls boolean

Whether we use -..workers.dev to serve Preview URLs for your Worker.

Default: false
routes Route[]

A list of routes that your Worker should be published to. Only one of routes or route is required.

Only required when workers_dev is false, and there's no scheduled Worker (see triggers)

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes

tsconfig string

Path to a custom tsconfig

jsx_factory string

The function to use to replace jsx syntax.

Default: "React.createElement"
jsx_fragment string

The function to use to replace jsx fragment syntax.

Default: "React.Fragment"

A list of migrations that should be uploaded with your Worker.

These define changes in your Durable Object declarations.

More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations

Default:
[]
triggers object

"Cron" definitions to trigger a Worker's "scheduled" function.

Lets you call Workers periodically, much like a cron job.

More details here https://developers.cloudflare.com/workers/platform/cron-triggers

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers

Default:
{
  "crons": []
}
1 nested properties
crons string[]
limits object
2 nested properties
cpu_ms number

Maximum allowed CPU time for a Worker's invocation in milliseconds

subrequests number

Maximum allowed number of fetch requests that a Worker's invocation can execute

rules Rule[]

An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling

build object

Configures a custom build step to be run by Wrangler when building your Worker.

Refer to the custom builds documentation for more details.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds

Default:
{
  "watch_dir": "./src"
}
3 nested properties
command string

The command used to build your Worker. On Linux and macOS, the command is executed in the sh shell and the cmd shell for Windows. The && and || shell operators may be used.

cwd string

The directory in which the command is executed.

watch_dir string | string[]

The directory to watch for changes while using wrangler dev, defaults to the current working directory

no_bundle boolean

Skip internal build steps and directly deploy script

minify boolean

Minify the script before uploading.

keep_names boolean

Set the name property to the original name for functions and classes renamed during minification.

See https://esbuild.github.io/api/#keep-names

Default: true
first_party_worker boolean

Designates this Worker as an internal-only "first-party" Worker.

logfwdr object

List of bindings that you will send to logfwdr

Default:
{
  "bindings": []
}
1 nested properties
bindings object[] required
logpush boolean

Send Trace Events from this Worker to Workers Logpush.

This will not configure a corresponding Logpush job automatically.

For more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/

upload_source_maps boolean

Include source maps when uploading this worker.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps

placement object | object | object | object

Specify how the Worker should be located to minimize round-trip time.

More details: https://developers.cloudflare.com/workers/platform/smart-placement/

assets object
5 nested properties
directory string

Absolute path to assets directory

binding string

Name of env binding property in the User Worker.

html_handling string

How to handle HTML requests.

Values: "auto-trailing-slash" "force-trailing-slash" "drop-trailing-slash" "none"
not_found_handling string

How to handle requests that do not match an asset.

Values: "single-page-application" "404-page" "none"
run_worker_first string[] | boolean

Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.

Can also be true, indicating that every request should be routed to the User Worker.

observability object
4 nested properties
enabled boolean

If observability is enabled for this Worker

head_sampling_rate number

The sampling rate

logs object
5 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

invocation_logs boolean

Set to false to disable invocation logs

persist boolean

If logs should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations logs emitted from the Worker should be sent to.

Default:
[]
traces object
4 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

persist boolean

If traces should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations traces emitted from the Worker should be sent to.

Default:
[]
compliance_region string

Specify the compliance region mode of the Worker.

Although if the user does not specify a compliance region, the default is public, it can be set to undefined in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.

Values: "public" "fedramp_high"
python_modules object

Configuration for Python modules.

1 nested properties
exclude string[] required

A list of glob patterns to exclude files from the python_modules directory when bundling.

Patterns are relative to the python_modules directory and use glob syntax.

Default:
[
  "***.pyc"
]
define Record<string, string>

A map of values to substitute when deploying your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
vars Record<string, string | Json>

A map of environment variables to set when deploying your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables

Default:
{}
secrets object

Secrets configuration (experimental).

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

1 nested properties
required string[]

List of secret names that are required by your Worker. When defined, this property:

  • Replaces .dev.vars/.env/process.env inference for type generation
  • Enables local dev validation with warnings for missing secrets
durable_objects object

A list of durable objects that your Worker should be bound to.

For more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects

Default:
{
  "bindings": []
}
1 nested properties
bindings object[] required
workflows WorkflowBinding[]

A list of workflows that your Worker should be bound to.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
cloudchamber object

Configuration in wrangler for Cloudchamber

6 nested properties
image string
location string
instance_type string
Values: "dev" "basic" "standard" "lite" "standard-1" "standard-2" "standard-3" "standard-4"
vcpu number
memory string
ipv4 boolean
containers ContainerApp[]

Container related configuration

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
kv_namespaces object[]

These specify any Workers KV Namespaces you want to access from inside your Worker.

To learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces

Default:
[]
send_email object[]

These specify bindings to send email from inside your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings

Default:
[]
queues object

Specifies Queues that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues

Default:
{
  "consumers": [],
  "producers": []
}
2 nested properties
producers object[]

Producer bindings

consumers object[]

Consumer configuration

r2_buckets object[]

Specifies R2 buckets that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets

Default:
[]
d1_databases object[]

Specifies D1 databases that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases

Default:
[]
vectorize object[]

Specifies Vectorize indexes that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes

Default:
[]
ai_search_namespaces object[]

Specifies AI Search namespace bindings that are bound to this Worker environment. Each binding is scoped to a namespace and allows dynamic instance CRUD within it.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
ai_search object[]

Specifies AI Search instance bindings that are bound to this Worker environment. Each binding is bound directly to a single pre-existing instance within the "default" namespace.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
hyperdrive object[]

Specifies Hyperdrive configs that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive

Default:
[]
services object[]

Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings

Default:
[]
analytics_engine_datasets object[]

Specifies analytics engine datasets that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets

Default:
[]
browser object

A browser that will be usable from the Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Browser binding should be remote or not in local development

ai object

Binding to the AI project.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai

Default:
{}
3 nested properties
binding string required
staging boolean
remote boolean

Whether the AI binding should be remote or not in local development

images object

Binding to Cloudflare Images

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Images binding should be remote or not in local development

media object

Binding to Cloudflare Media Transformations

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Media binding should be remote or not

stream object

Binding to Cloudflare Stream

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Stream binding should be remote or not in local development

version_metadata object

Binding to the Worker Version's metadata

1 nested properties
binding string required
unsafe object

"Unsafe" tables for features that aren't directly supported by wrangler.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
3 nested properties
bindings object[]

A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare.

metadata Record<string, any>

Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields.

capnp object | object

Used for internal capnp uploads for the Workers runtime

mtls_certificates object[]

Specifies a list of mTLS certificates that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates

Default:
[]
tail_consumers TailConsumer[]

Specifies a list of Tail Workers that are bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
streaming_tail_consumers StreamingTailConsumer[]

Specifies a list of Streaming Tail Workers that are bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
dispatch_namespaces object[]

Specifies namespace bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms

Default:
[]
pipelines object[]

Specifies list of Pipelines bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
secrets_store_secrets object[]

Specifies Secret Store bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
unsafe_hello_world object[]

DO NOT USE. Hello World Binding Config to serve as an explanatory example.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
ratelimits object[]

Specifies rate limit bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
worker_loaders object[]

Specifies Worker Loader bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
vpc_services object[]

Specifies VPC services that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
vpc_networks object | object[]

Specifies VPC networks that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
pages_build_output_dir string

The directory of static assets to serve.

The presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules.

legacy_env boolean

A boolean to enable "legacy" style wrangler environments (from Wrangler v1). These have been superseded by Services, but there may be projects that won't (or can't) use them. If you're using a legacy environment, you can set this to true to enable it.

send_metrics boolean

Whether Wrangler should send usage metrics to Cloudflare for this project.

When defined this will override any user settings. Otherwise, Wrangler will use the user's preference.

dev object
10 nested properties
ip string

IP address for the local dev server to listen on,

Default: "localhost"
port number

Port for the local dev server to listen on

Default: 8787
inspector_port number

Port for the local dev server's inspector to listen on

Default: 9229
inspector_ip string

IP address for the local dev server's inspector to listen on

Default: "127.0.0.1"
local_protocol string

Protocol that local wrangler dev server listens to requests on.

Default: "http"
Values: "http" "https"
upstream_protocol string

Protocol that wrangler dev forwards requests on

Setting this to http is not currently implemented for remote mode. See https://github.com/cloudflare/workers-sdk/issues/583

Default: "https"
Values: "https" "http"
host string

Host to forward requests to, defaults to the host of the first route of project

enable_containers boolean

When developing, whether to build and connect to containers. This requires a Docker daemon to be running. Defaults to true.

Default: true
container_engine object | string
generate_types boolean

Re-generate your worker types when your Wrangler configuration file changes.

Default: false
site object

The definition of a Worker Site, a feature that lets you upload static assets with your Worker.

More details at https://developers.cloudflare.com/workers/platform/sites

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-sites

4 nested properties
bucket string required

The directory containing your static assets.

It must be a path relative to your Wrangler configuration file. Example: bucket = "./public"

If there is a site field then it must contain this bucket field.

entry-point string

The location of your Worker script.

include string[]

An exclusive list of .gitignore-style patterns that match file or directory names from your bucket location. Only matched items will be uploaded. Example: include = ["upload_dir"]

Default:
[]
exclude string[]

A list of .gitignore-style patterns that match files or directories in your bucket that should be excluded from uploads. Example: exclude = ["ignore_dir"]

Default:
[]
wasm_modules Record<string, string>

A list of wasm modules that your worker should be bound to. This is the "legacy" way of binding to a wasm module. ES module workers should do proper module imports.

text_blobs Record<string, string>

A list of text files that your worker should be bound to. This is the "legacy" way of binding to a text file. ES module workers should do proper module imports.

data_blobs Record<string, string>

A list of data files that your worker should be bound to. This is the "legacy" way of binding to a data file. ES module workers should do proper module imports.

alias Record<string, string>

A map of module aliases. Lets you swap out a module for any others. Corresponds with esbuild's alias config

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing

keep_vars boolean

By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.

If you change your vars in the dashboard, wrangler will override/delete them on its next deploy.

If you want to keep your dashboard vars when wrangler deploys, set this field to true.

Default: false
RawEnvironment object

The raw environment configuration that we read from the config file.

All the properties are optional, and will be replaced with defaults in the configuration that is used in the rest of the codebase.

name string

The name of your Worker. Alphanumeric + dashes only.

account_id string

This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable.

compatibility_date string

A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.

More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates

compatibility_flags string[]

A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.

More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/

Default:
[]
main string

The entrypoint/path to the JavaScript file that will be executed.

find_additional_modules boolean

If true then Wrangler will traverse the file tree below base_dir; Any files that match rules will be included in the deployed Worker. Defaults to true if no_bundle is true, otherwise false.

preserve_file_names boolean

Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, 34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico.

base_dir string

The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the main entry point of the Worker if not specified.

workers_dev boolean

Whether we use ..workers.dev to test and deploy your Worker.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev

Default: true
preview_urls boolean

Whether we use -..workers.dev to serve Preview URLs for your Worker.

Default: false
routes Route[]

A list of routes that your Worker should be published to. Only one of routes or route is required.

Only required when workers_dev is false, and there's no scheduled Worker (see triggers)

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes

tsconfig string

Path to a custom tsconfig

jsx_factory string

The function to use to replace jsx syntax.

Default: "React.createElement"
jsx_fragment string

The function to use to replace jsx fragment syntax.

Default: "React.Fragment"

A list of migrations that should be uploaded with your Worker.

These define changes in your Durable Object declarations.

More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations

Default:
[]
triggers object

"Cron" definitions to trigger a Worker's "scheduled" function.

Lets you call Workers periodically, much like a cron job.

More details here https://developers.cloudflare.com/workers/platform/cron-triggers

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers

Default:
{
  "crons": []
}
1 nested properties
crons string[]
limits object
2 nested properties
cpu_ms number

Maximum allowed CPU time for a Worker's invocation in milliseconds

subrequests number

Maximum allowed number of fetch requests that a Worker's invocation can execute

rules Rule[]

An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling

build object

Configures a custom build step to be run by Wrangler when building your Worker.

Refer to the custom builds documentation for more details.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds

Default:
{
  "watch_dir": "./src"
}
3 nested properties
command string

The command used to build your Worker. On Linux and macOS, the command is executed in the sh shell and the cmd shell for Windows. The && and || shell operators may be used.

cwd string

The directory in which the command is executed.

watch_dir string | string[]

The directory to watch for changes while using wrangler dev, defaults to the current working directory

no_bundle boolean

Skip internal build steps and directly deploy script

minify boolean

Minify the script before uploading.

keep_names boolean

Set the name property to the original name for functions and classes renamed during minification.

See https://esbuild.github.io/api/#keep-names

Default: true
first_party_worker boolean

Designates this Worker as an internal-only "first-party" Worker.

logfwdr object

List of bindings that you will send to logfwdr

Default:
{
  "bindings": []
}
1 nested properties
bindings object[] required
logpush boolean

Send Trace Events from this Worker to Workers Logpush.

This will not configure a corresponding Logpush job automatically.

For more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/

upload_source_maps boolean

Include source maps when uploading this worker.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps

placement object | object | object | object

Specify how the Worker should be located to minimize round-trip time.

More details: https://developers.cloudflare.com/workers/platform/smart-placement/

assets object
5 nested properties
directory string

Absolute path to assets directory

binding string

Name of env binding property in the User Worker.

html_handling string

How to handle HTML requests.

Values: "auto-trailing-slash" "force-trailing-slash" "drop-trailing-slash" "none"
not_found_handling string

How to handle requests that do not match an asset.

Values: "single-page-application" "404-page" "none"
run_worker_first string[] | boolean

Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.

Can also be true, indicating that every request should be routed to the User Worker.

observability object
4 nested properties
enabled boolean

If observability is enabled for this Worker

head_sampling_rate number

The sampling rate

logs object
5 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

invocation_logs boolean

Set to false to disable invocation logs

persist boolean

If logs should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations logs emitted from the Worker should be sent to.

Default:
[]
traces object
4 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

persist boolean

If traces should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations traces emitted from the Worker should be sent to.

Default:
[]
compliance_region string

Specify the compliance region mode of the Worker.

Although if the user does not specify a compliance region, the default is public, it can be set to undefined in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.

Values: "public" "fedramp_high"
python_modules object

Configuration for Python modules.

1 nested properties
exclude string[] required

A list of glob patterns to exclude files from the python_modules directory when bundling.

Patterns are relative to the python_modules directory and use glob syntax.

Default:
[
  "***.pyc"
]
define Record<string, string>

A map of values to substitute when deploying your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
vars Record<string, string | Json>

A map of environment variables to set when deploying your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables

Default:
{}
secrets object

Secrets configuration (experimental).

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

1 nested properties
required string[]

List of secret names that are required by your Worker. When defined, this property:

  • Replaces .dev.vars/.env/process.env inference for type generation
  • Enables local dev validation with warnings for missing secrets
durable_objects object

A list of durable objects that your Worker should be bound to.

For more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects

Default:
{
  "bindings": []
}
1 nested properties
bindings object[] required
workflows WorkflowBinding[]

A list of workflows that your Worker should be bound to.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
cloudchamber object

Configuration in wrangler for Cloudchamber

6 nested properties
image string
location string
instance_type string
Values: "dev" "basic" "standard" "lite" "standard-1" "standard-2" "standard-3" "standard-4"
vcpu number
memory string
ipv4 boolean
containers ContainerApp[]

Container related configuration

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
kv_namespaces object[]

These specify any Workers KV Namespaces you want to access from inside your Worker.

To learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces

Default:
[]
send_email object[]

These specify bindings to send email from inside your Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings

Default:
[]
queues object

Specifies Queues that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues

Default:
{
  "consumers": [],
  "producers": []
}
2 nested properties
producers object[]

Producer bindings

consumers object[]

Consumer configuration

r2_buckets object[]

Specifies R2 buckets that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets

Default:
[]
d1_databases object[]

Specifies D1 databases that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases

Default:
[]
vectorize object[]

Specifies Vectorize indexes that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes

Default:
[]
ai_search_namespaces object[]

Specifies AI Search namespace bindings that are bound to this Worker environment. Each binding is scoped to a namespace and allows dynamic instance CRUD within it.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
ai_search object[]

Specifies AI Search instance bindings that are bound to this Worker environment. Each binding is bound directly to a single pre-existing instance within the "default" namespace.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
hyperdrive object[]

Specifies Hyperdrive configs that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive

Default:
[]
services object[]

Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings

Default:
[]
analytics_engine_datasets object[]

Specifies analytics engine datasets that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets

Default:
[]
browser object

A browser that will be usable from the Worker.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Browser binding should be remote or not in local development

ai object

Binding to the AI project.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai

Default:
{}
3 nested properties
binding string required
staging boolean
remote boolean

Whether the AI binding should be remote or not in local development

images object

Binding to Cloudflare Images

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Images binding should be remote or not in local development

media object

Binding to Cloudflare Media Transformations

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Media binding should be remote or not

stream object

Binding to Cloudflare Stream

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
2 nested properties
binding string required
remote boolean

Whether the Stream binding should be remote or not in local development

version_metadata object

Binding to the Worker Version's metadata

1 nested properties
binding string required
unsafe object

"Unsafe" tables for features that aren't directly supported by wrangler.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
{}
3 nested properties
bindings object[]

A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare.

metadata Record<string, any>

Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields.

capnp object | object

Used for internal capnp uploads for the Workers runtime

mtls_certificates object[]

Specifies a list of mTLS certificates that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates

Default:
[]
tail_consumers TailConsumer[]

Specifies a list of Tail Workers that are bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
streaming_tail_consumers StreamingTailConsumer[]

Specifies a list of Streaming Tail Workers that are bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
dispatch_namespaces object[]

Specifies namespace bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms

Default:
[]
pipelines object[]

Specifies list of Pipelines bound to this Worker environment

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
secrets_store_secrets object[]

Specifies Secret Store bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
unsafe_hello_world object[]

DO NOT USE. Hello World Binding Config to serve as an explanatory example.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
ratelimits object[]

Specifies rate limit bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
worker_loaders object[]

Specifies Worker Loader bindings that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
vpc_services object[]

Specifies VPC services that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
vpc_networks object | object[]

Specifies VPC networks that are bound to this Worker environment.

NOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.

Default:
[]
Route string | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute
ZoneIdRoute object
pattern string required
zone_id string required
custom_domain boolean
ZoneNameRoute object
pattern string required
zone_name string required
custom_domain boolean
CustomDomainRoute object
pattern string required
custom_domain boolean required
DurableObjectMigration object

Configuration in wrangler for Durable Object Migrations

tag string required

A unique identifier for this migration.

new_classes string[]

The new Durable Objects being defined.

new_sqlite_classes string[]

The new SQLite Durable Objects being defined.

renamed_classes object[]

The Durable Objects being renamed.

deleted_classes string[]

The Durable Objects being removed.

UserLimits object
cpu_ms number

Maximum allowed CPU time for a Worker's invocation in milliseconds

subrequests number

Maximum allowed number of fetch requests that a Worker's invocation can execute

Rule object

A bundling resolver rule, defining the modules type for paths that match the specified globs.

type string required

The possible types for a Rule.

Values: "ESModule" "CommonJS" "CompiledWasm" "Text" "Data" "PythonModule" "PythonRequirement"
globs string[] required
fallthrough boolean
ConfigModuleRuleType string

The possible types for a Rule.

Assets object
directory string

Absolute path to assets directory

binding string

Name of env binding property in the User Worker.

html_handling string

How to handle HTML requests.

Values: "auto-trailing-slash" "force-trailing-slash" "drop-trailing-slash" "none"
not_found_handling string

How to handle requests that do not match an asset.

Values: "single-page-application" "404-page" "none"
run_worker_first string[] | boolean

Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.

Can also be true, indicating that every request should be routed to the User Worker.

Observability object
enabled boolean

If observability is enabled for this Worker

head_sampling_rate number

The sampling rate

logs object
5 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

invocation_logs boolean

Set to false to disable invocation logs

persist boolean

If logs should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations logs emitted from the Worker should be sent to.

Default:
[]
traces object
4 nested properties
enabled boolean
head_sampling_rate number

The sampling rate

persist boolean

If traces should be persisted to the Cloudflare observability platform where they can be queried in the dashboard.

Default: true
destinations string[]

What destinations traces emitted from the Worker should be sent to.

Default:
[]
Json string | number | boolean | null | Json[] | object
DurableObjectBindings object[]
WorkflowBinding object
binding string required

The name of the binding used to refer to the Workflow

name string required

The name of the Workflow

class_name string required

The exported class name of the Workflow

script_name string

The script where the Workflow is defined (if it's external to this Worker)

remote boolean

Whether the Workflow should be remote or not in local development

limits object

Optional limits for the Workflow

1 nested properties
steps number

Maximum number of steps a Workflow instance can execute

CloudchamberConfig object

Configuration in wrangler for Cloudchamber

image string
location string
instance_type string
Values: "dev" "basic" "standard" "lite" "standard-1" "standard-2" "standard-3" "standard-4"
vcpu number
memory string
ipv4 boolean
ContainerApp object

Configuration for a container application

image string required

The path to a Dockerfile, or an image URI for the Cloudflare registry.

class_name string required

The class name of the Durable Object the container is connected to.

name string

Name of the application

max_instances number

Number of maximum application instances.

image_build_context string

Build context of the application.

image_vars Record<string, string>

Image variables available to the image at build-time only. For runtime env vars, refer to https://developers.cloudflare.com/containers/examples/env-vars-and-secrets/

scheduling_policy string

The scheduling policy of the application

Default: "default"
Values: "default" "moon" "regional"
instance_type string | string | string | string | string | string | string | string | object

The instance type to be used for the container. Select from one of the following named instance types: - lite: 1/16 vCPU, 256 MiB memory, and 2 GB disk - basic: 1/4 vCPU, 1 GiB memory, and 4 GB disk - standard-1: 1/2 vCPU, 4 GiB memory, and 8 GB disk - standard-2: 1 vCPU, 6 GiB memory, and 12 GB disk - standard-3: 2 vCPU, 8 GiB memory, and 16 GB disk - standard-4: 4 vCPU, 12 GiB memory, and 20 GB disk - dev: 1/16 vCPU, 256 MiB memory, and 2 GB disk (deprecated, use "lite" instead) - standard: 1 vCPU, 4 GiB memory, and 4 GB disk (deprecated, use "standard-1" instead)

Customers on an enterprise plan have the additional option to set custom limits.

Default: "dev"
wrangler_ssh object
2 nested properties
enabled boolean required

If enabled, those with write access to a container will be able to SSH into it through Wrangler.

Default: false
port number

Port that the SSH service is running on

authorized_keys object[]

SSH public keys to put in the container's authorized_keys file.

trusted_user_ca_keys object[]

Trusted user CA keys to put in the container's trusted_user_ca_keys file.

rollout_step_percentage number | number[]

Configures what percentage of instances should be updated at each step of a rollout. You can specify this as a single number, or an array of numbers.

If this is a single number, each step will progress by that percentage. The options are 5, 10, 20, 25, 50 or 100.

If this is an array, each step specifies the cumulative rollout progress. The final step must be 100.

This can be overridden adhoc by deploying with the --containers-rollout=immediate flag, which will roll out to 100% of instances in one step.

Default:
[
  10,
  100
]
rollout_active_grace_period number

Configures the grace period (in seconds) for active instances before being shutdown during a rollout.

Default: 0
TailConsumer object
service string required

The name of the service tail events will be forwarded to.

environment string

(Optional) The environment of the service.

StreamingTailConsumer object
service string required

The name of the service streaming tail events will be forwarded to.

DispatchNamespaceOutbound object
service string required

Name of the service handling the outbound requests

environment string

(Optional) Name of the environment handling the outbound requests.

parameters string[]

(Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler

RawDevConfig object
ip string

IP address for the local dev server to listen on,

Default: "localhost"
port number

Port for the local dev server to listen on

Default: 8787
inspector_port number

Port for the local dev server's inspector to listen on

Default: 9229
inspector_ip string

IP address for the local dev server's inspector to listen on

Default: "127.0.0.1"
local_protocol string

Protocol that local wrangler dev server listens to requests on.

Default: "http"
Values: "http" "https"
upstream_protocol string

Protocol that wrangler dev forwards requests on

Setting this to http is not currently implemented for remote mode. See https://github.com/cloudflare/workers-sdk/issues/583

Default: "https"
Values: "https" "http"
host string

Host to forward requests to, defaults to the host of the first route of project

enable_containers boolean

When developing, whether to build and connect to containers. This requires a Docker daemon to be running. Defaults to true.

Default: true
container_engine object | string
generate_types boolean

Re-generate your worker types when your Wrangler configuration file changes.

Default: false
ContainerEngine object | string
DockerConfiguration object
socketPath string required

Socket used by miniflare to communicate with Docker

containerEgressInterceptorImage string

Docker image name for the container egress interceptor sidecar