Self-hosting Durable Objects

Web Performance & Frameworks

About the session

This session explores the architecture of celld, which allows you to self-host Cloudflare Durable Objects and Cloudflare Workers across many VMs. Learn how this relates to the Deno acquisition and the team’s nascent plans to bring this functionality into workerd.

View slides (opens in a new tab)
View transcript

0:02Well, I'm going to be talking about self -hosted durable objects, self -hosted Cloudflare even, if you want to think about it that way. I'm coming at this from a long career of thinking about JavaScript on the server, thinking about servers in general. I first presented Node .js. my project back in 2009 in Berlin to a surprised audience that did not think about JavaScript on the server too much. The demo at that talk was an IRC server. It was shown live on stage and people could connect to it.

0:50And it was 500 lines of JavaScript, dependency-free. parser and everything in there um and it was uh shocking to people right like this was this not only was this implemented in in uh in javascript which was was not a thing before that but it was event driven and it was terse and um yeah it was a nice demo and but um there has always been this this nagging thing in my mind about that demo um by the way have do you guys know have you seen this demo did anybody know this a few people all right the old people i see uh we'll go to sip tea later on um uh something about that demo has always bothered me because this was a single threaded server it uh was a single server even um and as you got more and more participants joining the IRC server, it slowed down because it could just not handle like any server.

1:59There's a limit to how many connections it can handle. And taking that demo and turning it into something that scaled meant re-architecting it entirely. You would somehow need to split connections across many instances. You'd have to shard those connections. You'd have to have some mechanism for those instances to know about each other, communicate between them. In modern chat systems, you would have to have some message history, some state associated with it, some account storage, that sort of stuff. And although it was a great demo back in 2009, it's not really how you would build Discord, right?

2:47Discord is architecture. very differently than that um and i have to say like focusing on on kind of server side infrastructure might might seem like kind of a a niche thing but i think this is this is like fundamentally important to humanity right humanity operate we we we are information creatures right all of all of our stuff is online all of our stuff is accessed through the internet your bank is a server right your uh how you pay your rent is is a server uh how you communicate with your friends is is a server how you access the encyclopedia is is a server every like everything okay not everything is a server uh rocket ships are not servers but um a lot of of human infrastructure is actually servers and it is important that we are able to uh wrap our heads around what exactly we are building um the state of the art for for building server -side infrastructure has improved dramatically over the last decade or you know even since 2009 um but it's still kind of gnarly right like people are are just kind of designing all sorts of different systems you've got different databases you've got queuing systems you've got cash you've orchestration stuff. You have glue code that kind of ties it all together.

4:12You have different types of VMs and cloud services. And yeah, I mean, it's a whole profession kind of navigating that world, tying together these pieces. And I am just struck by the idea that this could all be done much more simply. And I think At Cloudflare, you know, one can kind of pick at the details of various choices that they've made in their programming model. But to a very large extent, I think Cloudflare, Kenton in particular, like got the programming model correct in that you are building for scale by default.

5:03Perfect. Durable objects is a... here at Cloudflare. But more importantly, it's a distributed systems primitive that is incredibly handy and really, you know, allows you to build important systems on top of it. So what does it give you? It gives you basically a little server, right? I kind of think of it as a little like my IRC demo, like a little Node.js or Of course, it's not Node .js, but it's a server that you can name, and you're kind of guaranteed that you can route directly to that server. Handles WebSockets well, which is practical. It's single-threaded, which I think is important.

5:51It's easy to reason about. And they each have a little SQLite database attached to it. Previously, key value store, but these days, SQLite database attached to each store. object and this this idea of having your splitting your system into into these little servers each with a little bit of state that each handles web sockets very well that you know of course normal requests as well um this is a very very nice design and this solves all sorts of problems so you know i i've been kind of wrestling with new server abstractions for a while, and at Dino, explored all sorts of stuff and built a service called Dino Deploy.

6:42But it just never was really what I wanted. And I think there was a long time where I was kind of looking at Cloudflare and recognizing that they were doing things correct. But, you know, how had little nitpicks with, with various details. And, and, um, uh, cell, I've been playing around with something called cells for longer than cell D has, has been around. Um, but recently this, this past summer, uh, kind of decided, why don't we just implement the Cloudflare API exactly, exactly as it is with, with the Wrangler JSON and the bindings and everything else. Um, and, you know, really what, what I want to be able to do is I want to run cloudflare outside of cloudflare, um, in particular durable objects, but of course the, the rest of, of it as well.

7:35And I, you know, having built this, uh, Dino deploy cloud, um, I really am allergic to the complexity of cloud infrastructure and was really looking for a way to say. this as much as possible. So the idea was to take the Cloudflare API and pair it with a storage model borrowed from Lightstream. Lightstream being a project from Fly .io, where they allow you to essentially back up your SQLite database to an S3 bucket. And so CellD is kind of combining ideas from these. And of course, it kind of goes without saying, but like V8.

8:25expertise and stuff taken from Dino itself, right? So we're kind of taking Dino concepts from the runtime, we're taking the API from Cloudflare, and we're taking Lightstream from Fly .io. And what we have then is actually an implementation of durable objects and other Cloudflare services that runs literally on top of a bucket. There is no other cloud infrastructure involved, of course. You have to run the VMs, okay? So you can run multiple cell D instances and they all communicate and learn about each other through this bucket that they have access to. The durable objects are synchronized to that bucket. And yeah, this was essentially an experiment to see how well this model worked.

9:15Of course, this is inspired a lot by the blog posts by Kenton and others about... how durable objects works in the first place. And yeah, turns out this works actually quite well. So what I wanted to do is a little demo here and kind of try my IRC demo again. So if you would, we'll see how well this works. Live demos are always a little sketch, little sketch. So let's see. So you should be joining this channel here. And yeah, don't say any bad words because I think this is flooded.

10:00Let me increase the font size there. Across the top here, we've got a couple of different channels and you have like node A, node B, and node C. These are different VMs. These VMs are running in a service called Vulture, just a p*****g. place where you can host some VMs somewhere outside of Cloudflare. Of course, you could do this in AWS. You could do this in JCP. You could do this in Fly. And we've got these various durable objects. Each IRC channel here is a durable object, and I'm using the term IRC very loosely. This is a chat system. And we're all in the Connect channel, but I don't know. We could join the Rust channel and say, you know, I love Rust, or we could hop over to the general channel, which is actually hosted on a different VM entirely, and say hello, and yeah, you get the point.

10:58So what I'm going to do now is I'm going to just go ahead, so now I'm over in Vulture here, and these are actually the different VMs, and I don't know how much I should explore here. But let me just grab, you know, we're all on B right now in the connect channel. And let me just see if I can SSH into this.

11:28Okay, there we go.

11:32I'm just trying to prove to you that this is actually a system that is running. So this is a VM that's running this cell D. instance uh and yeah i don't know you might be able to parse some of the some of the flags here you can see that that that's connected to r2 so i've got three three vms running with all all connected to r2 and i'm gonna go ahead and um take this node b one here and uh stop it you know let's let's let's pretend this this thing just goes offline and let's see what happens Did it wait, you know, you actually click it, server stop.

12:16Okay, so node B is now down. And what should happen is that it'll take a couple of seconds, but the durable objects actually get migrated to another node. So now we're actually on node A right now, instead of node B, node B is of course offline. And I don't know, should we try it one more time? Just my tempting fate if I do this again.

12:46We'll kill node A and see if we all get migrated to node C then. That one also goes down.

12:57And... Okay. Yay.

13:04So, you get the... point you can run durable objects by yourself and you can run them on vulture or other places um why do you want to do this millions of reasons you might want to do this right you you might have compliance reasons this that you need to run it in a specific place you might have hard you might be running in a factory and you need to be very close to the machines at hand um there there you might have data resident issues. There's just, you know, I think in the 99 % case, Cloudflare is the right tools, right? Like it's hosted, it's available, there's operators there that, you know, make sure everything is running. But there are other situations where you might want to run this elsewhere. And as I said, this is more than durable objects.

13:54It's just durable objects is kind of the foundational abstraction on which we build. So you have stateless workers, of course, but you also have KV and Qs. You can do R2 because, of course, you're just connected to a bucket. We can just store it in that bucket. It doesn't matter if it's R2 or S3. You can do workflows or cron or static assets, right? I was hosting that HTML page, which is, of course, static and delivered through cell D as well. So really, it's the worker. programming model that that that cell d is is providing um so yeah you know you you might wonder uh why why is cloudflare doing this um you can go go read my blog post with with kenton about this but this programming i mean from my perspective um you know previous to to joining cloudflare this is just the correct programming model this is raising the layer.

14:58When most people, most application developers, most server developers should not be operating at the Linux syscall level, right? Like this is just too low level. It's not to say that there's anything wrong with that. Like that's where I operate. Nothing wrong with writing in a systems language like Rust, but there's benefits to operating at a higher level of abstraction. There's benefits to GC. There's there's benefit to not having a file system you are forced into the right patterns and you're not sitting there picking all of these random services trying to tie together i don't know redis and cockroach db and uh nginx and doing all of this stuff you you rather have this um well abstracted programming model uh designed by cloudflare but now available in the open source and and ability to run it wherever you want.

15:57This is important for Cloudflare's business as well because they don't want it to be a vendor login situation, right? That's bad for their business, right? You should come to Cloudflare knowing that you can program against durable objects and other services, but you're not tied into the Cloudflare infrastructure permanently. So you are safe to design your app. your business around these primitives with the knowledge that we're putting a lot of work into allowing people to run this elsewhere. Cloudflare has re -trademarked a phrase from Sun Microsystems, the network is the computer. I love that phrase.

16:43And I think that perfectly describes the workers' programming model. And I want to see this being the default way that people are programming servers everywhere. It's worth talking about agents very quickly. The very exciting thing with durable objects is that this is a very cheap mechanism to run a little bit of JavaScript. And what else is an agent loop but just a little bit of JavaScript, right? I don't mean to put .

17:18down all the work that goes into harnesses. I'm sure there's quite a lot of complexity there, but it's a loop that calls the LLM API, right? And it's very nice if that VM that you're running in is not actually a full Linux VM, but rather something super cheap. Here, I've got a memory comparison against Node.js process on Linux that took about 44 megabytes of RSS. And... the marginal overhead of a cell D durable object, which is just under half a megabyte of memory. The memory usage is dramatically different. You can pack these things in very densely. Try to get 1 ,000 Node .js servers on one 8 -gigabyte machine.

18:09It's not going to happen. But you can for sure get 1,000 durable objects on an... gigabyte machine with with cell d um so yeah this it's it's particularly exciting in it because of of agents but in general this is this i think is is the right programming model so we are working now um to integrate to merge cell d into worker d worker d of course is is uh the open source version of uh of workers but you know it's really a single it's It's really for testing more or less, right? It's not that that was the intention. I think the intention was to run your worker code elsewhere, but it doesn't really scale, right?

18:54You just get a single worker D instance. And what we're going to do is make it so that you can have many, many worker D instances all connected to a bucket and run many, many durable objects, many, many workers, and really scale this infinitely. a bad word but kind of um so yeah if you're you are interested in running durable objects workers uh other cloudflare cloudflare applications uh off of cloudflare's network i'd love to talk um and yeah you'll you'll be hearing more about our work in worker d uh in the coming months thanks

Browse all
Connect 2027

Connect returns in 2027

Be the first to know when registration opens and the agenda goes live.

By submitting this form, you agree to our Privacy Policy.

cloudflare-connect-2026

---
title: "Self-hosting Durable Objects"
url: "https://www.cloudflare.com/connect/2026/session/self-hosting-durable-objects"
year: 2026
---

# Self-hosting Durable Objects

[Watch session](https://www.cloudflare.com/connect/2026/session/self-hosting-durable-objects)

[View slides (PDF)](https://www.cloudflare.com/connect/2026/session/self-hosting-durable-objects/slides.pdf)

## Session details

- **Track:** Web Performance & Frameworks
- **Topics:** Agentic AI & MCP, AI inference & workloads, Data security & privacy, Data compliance & localization, Network modernization & multicloud, Programmable Platforms, App modernization
- **Solution areas:** Developer Platform

## About this session

This session explores the architecture of celld, which allows you to self-host Cloudflare Durable Objects and Cloudflare Workers across many VMs. Learn how this relates to the Deno acquisition and the team’s nascent plans to bring this functionality into workerd.

## Speakers

- [Ryan Dahl](https://www.cloudflare.com/connect/speakers/2630260) — Senior Principal Systems Engineer, Cloudflare

## Transcript

[0:02] Well, I'm going to be talking about self -hosted durable objects, self -hosted Cloudflare even, if you want to think about it that way. I'm coming at this from a long career of thinking about JavaScript on the server, thinking about servers in general. I first presented Node .js. my project back in 2009 in Berlin to a surprised audience that did not think about JavaScript on the server too much. The demo at that talk was an IRC server. It was shown live on stage and people could connect to it.

[0:50] And it was 500 lines of JavaScript, dependency-free. parser and everything in there um and it was uh shocking to people right like this was this not only was this implemented in in uh in javascript which was was not a thing before that but it was event driven and it was terse and um yeah it was a nice demo and but um there has always been this this nagging thing in my mind about that demo um by the way have do you guys know have you seen this demo did anybody know this a few people all right the old people i see uh we'll go to sip tea later on um uh something about that demo has always bothered me because this was a single threaded server it uh was a single server even um and as you got more and more participants joining the IRC server, it slowed down because it could just not handle like any server.

[1:59] There's a limit to how many connections it can handle. And taking that demo and turning it into something that scaled meant re-architecting it entirely. You would somehow need to split connections across many instances. You'd have to shard those connections. You'd have to have some mechanism for those instances to know about each other, communicate between them. In modern chat systems, you would have to have some message history, some state associated with it, some account storage, that sort of stuff. And although it was a great demo back in 2009, it's not really how you would build Discord, right?

[2:47] Discord is architecture. very differently than that um and i have to say like focusing on on kind of server side infrastructure might might seem like kind of a a niche thing but i think this is this is like fundamentally important to humanity right humanity operate we we we are information creatures right all of all of our stuff is online all of our stuff is accessed through the internet your bank is a server right your uh how you pay your rent is is a server uh how you communicate with your friends is is a server how you access the encyclopedia is is a server every like everything okay not everything is a server uh rocket ships are not servers but um a lot of of human infrastructure is actually servers and it is important that we are able to uh wrap our heads around what exactly we are building um the state of the art for for building server -side infrastructure has improved dramatically over the last decade or you know even since 2009 um but it's still kind of gnarly right like people are are just kind of designing all sorts of different systems you've got different databases you've got queuing systems you've got cash you've orchestration stuff. You have glue code that kind of ties it all together.

[4:12] You have different types of VMs and cloud services. And yeah, I mean, it's a whole profession kind of navigating that world, tying together these pieces. And I am just struck by the idea that this could all be done much more simply. And I think At Cloudflare, you know, one can kind of pick at the details of various choices that they've made in their programming model. But to a very large extent, I think Cloudflare, Kenton in particular, like got the programming model correct in that you are building for scale by default.

[5:03] Perfect. Durable objects is a... here at Cloudflare. But more importantly, it's a distributed systems primitive that is incredibly handy and really, you know, allows you to build important systems on top of it. So what does it give you? It gives you basically a little server, right? I kind of think of it as a little like my IRC demo, like a little Node.js or Of course, it's not Node .js, but it's a server that you can name, and you're kind of guaranteed that you can route directly to that server. Handles WebSockets well, which is practical. It's single-threaded, which I think is important.

[5:51] It's easy to reason about. And they each have a little SQLite database attached to it. Previously, key value store, but these days, SQLite database attached to each store. object and this this idea of having your splitting your system into into these little servers each with a little bit of state that each handles web sockets very well that you know of course normal requests as well um this is a very very nice design and this solves all sorts of problems so you know i i've been kind of wrestling with new server abstractions for a while, and at Dino, explored all sorts of stuff and built a service called Dino Deploy.

[6:42] But it just never was really what I wanted. And I think there was a long time where I was kind of looking at Cloudflare and recognizing that they were doing things correct. But, you know, how had little nitpicks with, with various details. And, and, um, uh, cell, I've been playing around with something called cells for longer than cell D has, has been around. Um, but recently this, this past summer, uh, kind of decided, why don't we just implement the Cloudflare API exactly, exactly as it is with, with the Wrangler JSON and the bindings and everything else. Um, and, you know, really what, what I want to be able to do is I want to run cloudflare outside of cloudflare, um, in particular durable objects, but of course the, the rest of, of it as well.

[7:35] And I, you know, having built this, uh, Dino deploy cloud, um, I really am allergic to the complexity of cloud infrastructure and was really looking for a way to say. this as much as possible. So the idea was to take the Cloudflare API and pair it with a storage model borrowed from Lightstream. Lightstream being a project from Fly .io, where they allow you to essentially back up your SQLite database to an S3 bucket. And so CellD is kind of combining ideas from these. And of course, it kind of goes without saying, but like V8.

[8:25] expertise and stuff taken from Dino itself, right? So we're kind of taking Dino concepts from the runtime, we're taking the API from Cloudflare, and we're taking Lightstream from Fly .io. And what we have then is actually an implementation of durable objects and other Cloudflare services that runs literally on top of a bucket. There is no other cloud infrastructure involved, of course. You have to run the VMs, okay? So you can run multiple cell D instances and they all communicate and learn about each other through this bucket that they have access to. The durable objects are synchronized to that bucket. And yeah, this was essentially an experiment to see how well this model worked.

[9:15] Of course, this is inspired a lot by the blog posts by Kenton and others about... how durable objects works in the first place. And yeah, turns out this works actually quite well. So what I wanted to do is a little demo here and kind of try my IRC demo again. So if you would, we'll see how well this works. Live demos are always a little sketch, little sketch. So let's see. So you should be joining this channel here. And yeah, don't say any bad words because I think this is flooded.

[10:00] Let me increase the font size there. Across the top here, we've got a couple of different channels and you have like node A, node B, and node C. These are different VMs. These VMs are running in a service called Vulture, just a p*****g. place where you can host some VMs somewhere outside of Cloudflare. Of course, you could do this in AWS. You could do this in JCP. You could do this in Fly. And we've got these various durable objects. Each IRC channel here is a durable object, and I'm using the term IRC very loosely. This is a chat system. And we're all in the Connect channel, but I don't know. We could join the Rust channel and say, you know, I love Rust, or we could hop over to the general channel, which is actually hosted on a different VM entirely, and say hello, and yeah, you get the point.

[10:58] So what I'm going to do now is I'm going to just go ahead, so now I'm over in Vulture here, and these are actually the different VMs, and I don't know how much I should explore here. But let me just grab, you know, we're all on B right now in the connect channel. And let me just see if I can SSH into this.

[11:28] Okay, there we go.

[11:32] I'm just trying to prove to you that this is actually a system that is running. So this is a VM that's running this cell D. instance uh and yeah i don't know you might be able to parse some of the some of the flags here you can see that that that's connected to r2 so i've got three three vms running with all all connected to r2 and i'm gonna go ahead and um take this node b one here and uh stop it you know let's let's let's pretend this this thing just goes offline and let's see what happens Did it wait, you know, you actually click it, server stop.

[12:16] Okay, so node B is now down. And what should happen is that it'll take a couple of seconds, but the durable objects actually get migrated to another node. So now we're actually on node A right now, instead of node B, node B is of course offline. And I don't know, should we try it one more time? Just my tempting fate if I do this again.

[12:46] We'll kill node A and see if we all get migrated to node C then. That one also goes down.

[12:57] And... Okay. Yay.

[13:04] So, you get the... point you can run durable objects by yourself and you can run them on vulture or other places um why do you want to do this millions of reasons you might want to do this right you you might have compliance reasons this that you need to run it in a specific place you might have hard you might be running in a factory and you need to be very close to the machines at hand um there there you might have data resident issues. There's just, you know, I think in the 99 % case, Cloudflare is the right tools, right? Like it's hosted, it's available, there's operators there that, you know, make sure everything is running. But there are other situations where you might want to run this elsewhere. And as I said, this is more than durable objects.

[13:54] It's just durable objects is kind of the foundational abstraction on which we build. So you have stateless workers, of course, but you also have KV and Qs. You can do R2 because, of course, you're just connected to a bucket. We can just store it in that bucket. It doesn't matter if it's R2 or S3. You can do workflows or cron or static assets, right? I was hosting that HTML page, which is, of course, static and delivered through cell D as well. So really, it's the worker. programming model that that that cell d is is providing um so yeah you know you you might wonder uh why why is cloudflare doing this um you can go go read my blog post with with kenton about this but this programming i mean from my perspective um you know previous to to joining cloudflare this is just the correct programming model this is raising the layer.

[14:58] When most people, most application developers, most server developers should not be operating at the Linux syscall level, right? Like this is just too low level. It's not to say that there's anything wrong with that. Like that's where I operate. Nothing wrong with writing in a systems language like Rust, but there's benefits to operating at a higher level of abstraction. There's benefits to GC. There's there's benefit to not having a file system you are forced into the right patterns and you're not sitting there picking all of these random services trying to tie together i don't know redis and cockroach db and uh nginx and doing all of this stuff you you rather have this um well abstracted programming model uh designed by cloudflare but now available in the open source and and ability to run it wherever you want.

[15:57] This is important for Cloudflare's business as well because they don't want it to be a vendor login situation, right? That's bad for their business, right? You should come to Cloudflare knowing that you can program against durable objects and other services, but you're not tied into the Cloudflare infrastructure permanently. So you are safe to design your app. your business around these primitives with the knowledge that we're putting a lot of work into allowing people to run this elsewhere. Cloudflare has re -trademarked a phrase from Sun Microsystems, the network is the computer. I love that phrase.

[16:43] And I think that perfectly describes the workers' programming model. And I want to see this being the default way that people are programming servers everywhere. It's worth talking about agents very quickly. The very exciting thing with durable objects is that this is a very cheap mechanism to run a little bit of JavaScript. And what else is an agent loop but just a little bit of JavaScript, right? I don't mean to put .

[17:18] down all the work that goes into harnesses. I'm sure there's quite a lot of complexity there, but it's a loop that calls the LLM API, right? And it's very nice if that VM that you're running in is not actually a full Linux VM, but rather something super cheap. Here, I've got a memory comparison against Node.js process on Linux that took about 44 megabytes of RSS. And... the marginal overhead of a cell D durable object, which is just under half a megabyte of memory. The memory usage is dramatically different. You can pack these things in very densely. Try to get 1 ,000 Node .js servers on one 8 -gigabyte machine.

[18:09] It's not going to happen. But you can for sure get 1,000 durable objects on an... gigabyte machine with with cell d um so yeah this it's it's particularly exciting in it because of of agents but in general this is this i think is is the right programming model so we are working now um to integrate to merge cell d into worker d worker d of course is is uh the open source version of uh of workers but you know it's really a single it's It's really for testing more or less, right? It's not that that was the intention. I think the intention was to run your worker code elsewhere, but it doesn't really scale, right?

[18:54] You just get a single worker D instance. And what we're going to do is make it so that you can have many, many worker D instances all connected to a bucket and run many, many durable objects, many, many workers, and really scale this infinitely. a bad word but kind of um so yeah if you're you are interested in running durable objects workers uh other cloudflare cloudflare applications uh off of cloudflare's network i'd love to talk um and yeah you'll you'll be hearing more about our work in worker d uh in the coming months thanks

## Related sessions

- [100 billion profiles, one early bet on Cloudflare Durable Objects](https://www.cloudflare.com/connect/2026/session/100-billion-profiles-one-early-bet-on-cloudflare-durable-objects)
- [A runtime for developers and their agents](https://www.cloudflare.com/connect/2026/session/a-runtime-for-developers-and-their-agents)
- [Code Mode: Fit 2,500 API endpoints into 1,000 tokens](https://www.cloudflare.com/connect/2026/session/code-mode-fit-2-500-api-endpoints-into-1-000-tokens)

## More from Connect

- [All sessions](https://www.cloudflare.com/connect/)
- [Get notified for Connect 2027](https://www.cloudflare.com/connect#2027)