Skip to main content
workerd hero

What is workerd?

workerd (pronounced “worker-dee”) is a JavaScript/Wasm server runtime based on the same code that powers Cloudflare Workers. It’s an open-source, production-ready runtime that brings the power of Cloudflare’s edge computing platform to your own infrastructure. You might use workerd as:
  • An application server to self-host applications designed for Cloudflare Workers
  • A development tool to develop and test Workers code locally
  • A programmable HTTP proxy (forward or reverse) to efficiently intercept, modify, and route network requests

Key features

Standards-based APIs

Built on web platform standards like fetch(), streams, and WebSocket

Capability bindings

Secure, composable architecture immune to SSRF attacks

Node.js compatibility

Run Node.js code with the nodejs_compat compatibility flag

Nanoservices

Microservices performance with local function call speed

Durable Objects

Strongly consistent, low-latency storage with SQL support

Python support

Run Python code using Pyodide integration

Design principles

workerd is built on a foundation of carefully considered design principles:

Server-first

Designed for servers, not CLIs or GUIs. workerd is optimized for high-throughput, low-latency request handling in production environments.

Standard-based

Built-in APIs are based on web platform standards like fetch(), streams, and WebSocket. This means your code is portable and you can leverage existing knowledge and libraries.

Nanoservices

Split your application into components that are decoupled and independently-deployable like microservices, but with the performance of a local function call. When one nanoservice calls another, the callee runs in the same thread and process.

Homogeneous deployment

Instead of deploying different microservices to different machines in your cluster, deploy all your nanoservices to every machine in the cluster. This makes load balancing much easier and eliminates the need for service discovery.

Capability bindings

workerd configuration uses capabilities instead of global namespaces to connect nanoservices to each other and external resources. The result is code that is more composable and immune to SSRF attacks.

Always backwards compatible

Updating workerd to a newer version will never break your JavaScript code. workerd’s version number is simply a date, corresponding to the maximum compatibility date supported by that version. You can always configure your worker to use a past date, and workerd will emulate the API as it existed on that date.
Learn more about these principles in the blog post announcing workerd.

Get started

Quick start

Get workerd running in minutes with a Hello World example

Installation

Install workerd on Linux, macOS, or Windows

Core concepts

Understand workerd’s architecture and design

API reference

Explore the full API documentation

Runtime APIs

workerd implements a comprehensive set of standard web APIs:
  • HTTP: fetch(), Request, Response, Headers
  • Streams: ReadableStream, WritableStream, TransformStream
  • WebSocket: Full duplex communication
  • Crypto: Web Crypto API with additional algorithms
  • Encoding: TextEncoder, TextDecoder, base64
  • URL: URL, URLPattern, URLSearchParams
  • Storage: Durable Objects, KV, R2, Cache API
  • Node.js: Compatible subset with nodejs_compat flag

Important notes

workerd is production-ready but has some important considerations:

Beta status

While most of workerd’s code has been used in Cloudflare Workers for years, the standalone workerd server and configuration format are relatively new. The config format may change before leaving beta, but will remain stable after that.

Not a hardened sandbox

workerd isolates each Worker, but does not provide defense-in-depth on its own. When running untrusted code, you must run workerd inside an appropriate secure sandbox (like a virtual machine). Cloudflare Workers uses many additional layers of defense-in-depth.
If you discover a security bug, submit it to Cloudflare’s bug bounty program for a reward.

Community and support

Build docs developers (and LLMs) love