Choose an instance_type: lite (1/16 vCPU, 256 MiB, 2 GB disk), basic (1/4 vCPU, 1 GiB, 4 GB), or standard-1 through standard-4 (up to 4 vCPU, 12 GiB, 20 GB). Custom types must stay within 1-4 vCPU, 12 GiB memory, 20 GB disk, at least 3 GiB memory per vCPU and at most 2 GB disk per 1 GiB memory.
Route stateful or session-pinned work with getContainer(env.MY_CONTAINER, id).startAndWaitForPorts(); load-balance stateless work with await getRandom(env.MY_CONTAINER, INSTANCE_COUNT) then .fetch(request).
If you override onActivityExpired(), call await this.stop() inside it or the instance never sleeps and keeps billing.
Verify Docker is running (docker info) before deploying, since wrangler deploy builds and pushes the image.
Deploy with npx wrangler deploy , then confirm with npx wrangler containers list and npx wrangler containers images list.
Containers require the Workers Paid plan and images must target linux/amd64.
Migrations must use new_sqlite_classes for Container-backed Durable Object classes. Using the legacy new_classes fails.
Default startup timeouts are portReadyTimeoutMS 20,000 ms and instanceGetTimeoutMS 8,000 ms. Slow-booting images fail readiness checks before the app is ready.
Default sleepAfter is 10 minutes, but overriding onActivityExpired() without calling this.stop() leaves the container running and billing indefinitely.
Custom instance types are constrained by ratio, not just totals: at least 3 GiB memory per vCPU and at most 2 GB disk per 1 GiB memory.
First-time deploys can take several minutes to provision before requests are served reliably; a failed smoke test immediately after deploy may just be provisioning.
getRandom() spreads across a fixed instance count you supply; it does not autoscale to demand.
Give your agent this knowledge — and 16,300+ more routes
One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?