Quick Answer: You can run Cloudflare Workers anywhere by using OpenOrange, an Apache 2.0 project that runs your existing Workers and Durable Objects on AWS, Google Cloud, Azure, or your own servers. Your code and
wranglerconfiguration stay the same. You swapwrangler devfororange dev, and you pay for the machines you run on instead of Cloudflare's metering.
If you've built on Cloudflare Workers, you already know the appeal: fast edge deploys, Durable Objects for stateful logic, and a tidy set of bindings. The friction shows up later, when a Durable Object stays busy all day and the bill climbs, or when a 128 MB memory ceiling forces you to rewrite a job that worked fine on your laptop. Running Workers on your own infrastructure is the obvious escape hatch. The hard part is keeping the developer experience intact, and that's the gap OpenOrange tries to close.
What stays the same when you move off Cloudflare
The pitch is "zero refactoring," and the project's README makes it concrete. Your Worker code doesn't change. Your Wrangler configuration doesn't change. OpenOrange reads your wrangler.jsonc, wrangler.json, or wrangler.toml and maps each binding onto infrastructure you control.
Here's what you keep:
- Your Worker entry point and handlers, unchanged
- Your
wranglerconfiguration keys and binding names, such asenv.COUNTER - The Durable Object class you already wrote, with its state and alarms
- Your deploy workflow, now routed through
orange deploy
Most guides skip the other half of that story. The runtime underneath is different. OpenOrange implements the Workers API on Node.js and does not run workerd, Cloudflare's own runtime. That's a meaningful distinction, and it's why some bindings behave differently, which I'll get to below.
How Durable Objects become Rivet Actors
Here's where the architecture matters. Each Durable Object runs as a Rivet Actor with its own SQLite database, and that database lives in .open-orange/ during local development. Rivet places each object on a container and routes requests to it, while S3 stores each object's SQLite data.
This is what makes scaling a capacity question instead of an architecture question. The README puts it plainly: scaling out means adding machines. Cloudflare's Durable Objects keep their data on a single location, so there's nothing to place, replicate, or move. Rivet supplies that placement layer.
The trade-off is that you now operate a control plane. Rivet is the layer underneath, and you don't need to learn its API, but someone has to keep it running. That's where the cost of "self-host" lives, and it's worth weighing honestly before you commit.
The cost math, and where Cloudflare still wins
The project publishes its own cost model, priced on raw AWS: Graviton EC2 in us-east-1 with 40% headroom, plus S3 in your account. Treat these as the project's numbers, and verify them against your own usage before you plan a migration around them.
| Meter | Cloudflare | OpenOrange | Ratio (per project) |
|---|---|---|---|
| Durable Object compute | $0.045 per GB-hour | $0.0094 per GB-hour | 4.8× cheaper |
| Durable Object storage | $0.20 per GB-month | $0.023 per GB-month | 8.7× cheaper |
| SQLite writes | $1.00 per million rows | about $0.18 per million | 5.7× cheaper |
Here's the counter-intuitive part: for small, spiky Workers, Cloudflare is often the cheaper option. The free tier and per-request pricing are hard to beat when traffic is low and bursty. The savings from OpenOrange show up when Durable Objects stay busy, because you're paying for compute time and storage at machine rates instead of per-meter rates. Run your own traffic pattern through both models before you assume the ratio applies to you.
Runtime limits: your hardware, your rules
The limits table is where many teams feel the difference first. Cloudflare Workers Paid caps memory at 128 MB per Worker or Durable Object, CPU time at 30 seconds by default with a 5-minute maximum, and each Durable Object at 10 GB of storage. Its Node.js support is a nodejs_compat subset.
On OpenOrange, those limits become your machine's limits. Memory is bounded by your hardware, and the Node.js heap defaults to about 4 GB, which you can configure. CPU time has no cap, cron and alarm handlers have no 15-minute wall time, storage has no cap, and you run stock Node.js.
That freedom has a cost. A long-running job no longer gets killed for you, so a runaway loop will consume your memory until you notice. Set alerting on container memory and CPU before you move anything heavy. The platform stops being a guardrail and becomes your responsibility.
Running it locally and deploying
Setup is short. You need Node.js 22 or later, pnpm, and Docker if you plan to deploy. Install the CLI globally with pnpm add -g open-orange, then run your Worker with orange dev. Your app answers on http://localhost:8787.
For self-hosting, the process has three steps:
- Build the image with
orange deploy --dry-run --outdir out, then rundocker buildagainst the generated Dockerfile. The dry run calls no API. - Run the Rivet control plane using Rivet's guide for your platform, such as Kubernetes, AWS ECS, Docker Compose, Hetzner, or a plain VM.
- Run your image as worker nodes, pointing each container at the control plane with
RIVET_ENDPOINT.
Most people stop after step one and assume the rest is simple. It isn't. Plan for the control plane as its own service with uptime requirements.
Migrating data without downtime, and what can't move
The migration story is the strongest part of the pitch. orange migrate moves Durable Objects off Cloudflare while your app keeps serving, and each object copies itself during cutover. The project's migration guide covers each step, rollback, and what cannot move.
Not everything migrates cleanly, though. The bindings table splits support into three categories:
- Drop-in: KV, D1, Rate Limiting, Queues, Cron Triggers, and Hyperdrive run as they do on Cloudflare.
- Pluggable: R2, Workers AI, Send Email, Browser Rendering, and Sandbox run on a provider you configure, such as Amazon S3, OpenRouter, Amazon SES, or E2B.
- Partial: Durable Objects, Cache, Workflows, Tail Workers, and Worker Loader run with known differences documented on each binding's page.
Two items deserve attention before you plan a cutover. D1 databases are interrupted for a few minutes while they copy. And Analytics Engine is not supported: writeDataPoint() silently drops each data point. Vectorize, Images, Media, Stream, Pipelines, and AI Search throw when called, so you'll need to replace them before the switch. Audit your wrangler bindings against that list first. Most migrations fail on the one binding nobody checked.
Frequently Asked Questions
What is OpenOrange?
OpenOrange is an open-source runtime, licensed under Apache 2.0, that runs Cloudflare Workers and Durable Objects on Node.js. It reads your Wrangler configuration and maps each Cloudflare service onto Rivet, so you can run the same code on AWS, Google Cloud, Azure, or your own servers. It is not a fork of Cloudflare and does not run workerd.
How do I run a Cloudflare Worker on my own servers?
Install the CLI with pnpm add -g open-orange, then run orange dev for local testing. To self-host, run orange deploy --dry-run --outdir out to build the image, push it to a registry your servers can reach, run the Rivet control plane, and point each worker node at it with RIVET_ENDPOINT. Your Worker code stays unchanged throughout.
Why would I use OpenOrange instead of running workerd directly?
workerd is Cloudflare's runtime, not its platform. KV, D1, R2, Queues, and Workflows are bindings that call services you would have to build yourself. Durable Objects also keep their data on one machine, so nothing places, replicates, or scales them. OpenOrange supplies that placement and storage layer.
When is Cloudflare cheaper than self-hosting Workers?
For small, spiky workloads, Cloudflare usually is, because its free tier and per-request pricing are hard to beat at low volume. The project's cost model shows savings once Durable Objects stay busy and the GB-hour and storage meters accumulate. Model your own traffic pattern against both price sets before deciding.
Does moving to OpenOrange cause downtime?
For Durable Objects, orange migrate moves data while your app keeps serving, so the move itself doesn't require downtime. D1 databases are interrupted for a few minutes during their copy. Analytics Engine and several other services aren't supported, so check your bindings before you plan the cutover.
Start with one Worker this week
Pick the smallest Worker in your project, one with a single Durable Object and a KV binding, and run it through orange dev this week. Compare the response times and the memory use against your Cloudflare deployment, and note any binding that behaves differently. That single afternoon will tell you more than any cost table. Pass this to a teammate who is wrestling with a Cloudflare bill or a 128 MB limit, and ask them to run the same check.