Skip to content
Cloudflare Docs

Platform

Instance Types

The memory, vCPU, and disk space for Containers are set through predefined instance types. Three instance types are currently available:

Instance TypeMemoryvCPUDisk
dev256 MiB1/162 GB
basic1 GiB1/44 GB
standard4 GiB1/24 GB

These are specified using the instance_type property in your Worker's Wrangler configuration file. Looking for larger instances? Give us feedback here and tell us what size instances you need, and what you want to use them for.

Limits

While in open beta, the following limits are currently in effect:

FeatureWorkers Paid
GB Memory for all concurrent live Container instances40GB 1
vCPU for all concurrent live Container instances20 1
GB Disk for all concurrent live Container instances100GB 1
Image sizeSame as instance disk space
Total image storage per account50 GB 2

Environment variables

The container runtime automatically sets the following variables:

  • CLOUDFLARE_APPLICATION_ID - the ID of the Containers application
  • CLOUDFLARE_COUNTRY_A2 - the ISO 3166-1 Alpha 2 code of a country the container is placed in
  • CLOUDFLARE_DEPLOYMENT_ID - the ID of the container instance
  • CLOUDFLARE_LOCATION - a name of a location the container is placed in
  • CLOUDFLARE_PLACEMENT_ID - a placement ID
  • CLOUDFLARE_REGION - a region name
  • CLOUDFLARE_DURABLE_OBJECT_ID - the ID of the Durable Object that the container is bound to

Custom environment variables can be set when defining a Container in your Worker:

class MyContainer extends Container {
defaultPort = 4000;
envVars = {
MY_CUSTOM_VAR: "value",
ANOTHER_VAR: "another_value",
};
}

Footnotes

  1. This limit will be raised as we continue the beta. 2 3

  2. Delete container images with wrangler containers delete to free up space. Note that if you delete a container image and then roll back your Worker to a previous version, this version may no longer work.