12k
All articles

What Deno Joining Cloudflare Means for Your Apps

Deno Deploy shuts down in April 2027. See what changes, how to export Deno KV data, and compare migration paths to Cloudflare Workers, Node, or Docker.

OpenReplay Team
OpenReplay Team
What Deno Joining Cloudflare Means for Your Apps

If your app runs on Deno Deploy, it has a deadline: Deno Deploy shuts down in April 2027. The Deno runtime will keep getting fix-only releases for about a year, and Deno KV data hosted on Deploy goes away when Deploy does.

The October 9 announcement arrived as a news story, but if you have production traffic, KV data and cron jobs on Deploy, you now have a migration to plan.

This article covers what ends and when, what keeps working, and what breaks. It then compares three ways forward (Cloudflare Workers, Node, and Deno in Docker), with code for each step.

Key Takeaways

  • Deno Deploy will be sunset in April 2027. Apps keep running until then, and Deno has not published a specific shutdown day.
  • The Deno runtime stays open source and keeps working on your own machines, with fix-only maintenance lasting about a year, to around October 2027.
  • Deno KV databases hosted on Deploy go away with Deploy, so export every entry before you choose where to move.
  • Cloudflare Workers KV is eventually consistent and has no atomic check-and-set, so code built on kv.atomic() has to be redesigned. Copying it across will not work.
  • The merge of celld into workerd has been announced but not released. Both projects can be self-hosted today.

The Deno Cloudflare News: What Was Announced

On October 9, 2026, Cloudflare announced that the Deno team is joining the company. The main engineering goal is to merge celld, Deno’s self-hostable implementation of Workers and Durable Objects, into workerd, Cloudflare’s open-source Workers runtime. The announcement, co-written by Ryan Dahl and Kenton Varda, says the joined team wants to make self-hosting Workers and Durable Objects simple.

The technical reason is a gap in workerd. The post says workerd is already open source, but its Durable Objects support is limited to a single instance. celld was built to run many Durable Objects across machines. Deno released it in August 2026, and it is still pre-1.0, at version 0.6.x.

The merged version has not shipped. Cloudflare promises “more announcements about this work in the coming months” but has given no date. You can still self-host celld or workerd separately today.

What Ends and When?

Two parts of Deno have end dates: the Deno Deploy platform, which shuts down in April 2027, and active development of the Deno runtime, which moves to fix-only releases.

ComponentStatusTimingSource
Deno DeploySunsettingApril 2027deno.com/deploy
Deno runtimeFix-only releasesAbout a year, to around October 2027denoland/deno #37030
JSRContinues, moving to Cloudflare infrastructureNo end dateDeno’s announcement
Workers migration helpFor paying Deploy customersBefore Deploy shuts downDeno’s announcement
celld + workerd mergeAnnounced, not releasedNo date givenCloudflare blog

“Fix-only” means you should not expect new runtime features. Pin an exact Deno version in CI and in your containers, so that an upgrade only happens when you choose to make one.

What Keeps Working After Deno Deploy Shuts Down?

The Deno runtime is not being switched off. Deno stays open source and keeps running on your laptop, your CI runners and your own servers. Anything you run with deno run outside Deploy keeps working after April 2027. What changes is that security and bug fixes stop after the maintenance window ends.

According to Deno’s announcement, JSR keeps operating, with its infrastructure moving to Cloudflare. Your jsr: imports should keep resolving.

What Breaks: Deno KV and Deploy-Only APIs

The biggest risk in leaving Deno Deploy is data. Deno KV databases hosted on Deploy go away with Deploy, so any app that calls Deno.openKv() on Deploy needs to export its data before you pick a destination. Start by finding out how much of your code depends on Deno-only APIs:

grep -rnE "Deno\.(openKv|cron|env|serve|readTextFile|writeTextFile)|from \"jsr:" --include=*.ts --include=*.tsx .

Matches on Deno.env and Deno.serve are simple to port. Matches on openKv and cron are where the real migration work is.

Export Your KV Data

Deploy can continuously back up a hosted KV database to your own S3 or Google Cloud Storage bucket, which gives you point-in-time snapshots. For a portable dump you can load anywhere, write a short export script. You can connect to a Deploy KV database from outside Deploy by passing https://api.deno.com/v2/databases/<Database ID>/connect to Deno.openKv() and setting DENO_KV_ACCESS_TOKEN. Keys and values are not always JSON-safe: bigint, Uint8Array and Deno.KvU64 need to be tagged so you can rebuild them on import.

// export-kv.ts
// KV_URL=https://api.deno.com/v2/databases/<id>/connect DENO_KV_ACCESS_TOKEN=... \
//   deno run -A --unstable-kv export-kv.ts > kv-dump.ndjson
const kv = await Deno.openKv(Deno.env.get("KV_URL"));

function encode(v: unknown): unknown {
  if (typeof v === "bigint") return { $bigint: v.toString() };
  if (v instanceof Uint8Array) return { $bytes: Array.from(v) };
  if (v instanceof Deno.KvU64) return { $u64: v.value.toString() };
  if (Array.isArray(v)) return v.map(encode);
  if (v && typeof v === "object" && !(v instanceof Date)) {
    return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, encode(x)]));
  }
  return v;
}

for await (const entry of kv.list({ prefix: [] })) {
  console.log(JSON.stringify({ key: encode(entry.key), value: encode(entry.value) }));
}
kv.close();

If your app stored Map, Set or Date values, add a tag for each of those as well. The export is not a single point-in-time snapshot, because kv.list() reads in batches and consistency is only guaranteed within a batch. Pause writes while the script runs, or accept that some entries may change during the export.

Why Cloudflare KV Is Not a Drop-In Replacement

Cloudflare Workers KV is not a drop-in replacement for Deno KV because Workers KV is eventually consistent and has no atomic check-and-set. Deno KV always writes with strong consistency, and reads are strongly consistent unless you ask for eventual consistency. Workers KV gets its speed from caching, so a read in one location can return an older value for a while after a write elsewhere. Workers KV also has no atomic check-and-set. So the following pattern cannot be ported:

const kv = await Deno.openKv();
const key = ["balance", userId];
const current = await kv.get<number>(key);

const res = await kv.atomic()
  .check(current) // fails if another write landed first
  .set(key, (current.value ?? 0) - amount)
  .commit();

if (!res.ok) {
  // retry: the value changed between read and write
}

The .check() call compares versionstamps, which guarantees that nothing changed between the read and the write. An eventually consistent store cannot provide that guarantee. On Cloudflare, the closest equivalent is a Durable Object, which runs single-threaded and has its own SQLite storage. For write-after-write consistency, Cloudflare’s KV docs suggest routing every write for a key through one Durable Object instance. Off Cloudflare, use a database transaction instead.

Path A: Cloudflare Workers

Cloudflare Workers is the closest fit if your code already uses Web-standard Request/Response handlers. Workers uses the same fetch-handler model. Deno has promised migration help to paying Deploy customers who move to Workers.

To move to Workers:

  1. Replace Deno.serve(handler) with an export default { fetch } module.
  2. Replace Deno.env.get() with the env bindings passed to fetch.
  3. Move each KV access pattern to the right primitive: Workers KV for data that is read often and written rarely, and Durable Objects for anything that used kv.atomic().
  4. Re-test jsr: dependencies in your build, because some may rely on Deno-only globals.

Path B: Node on Any Host

Ryan Dahl created Node.js before he created Deno, and moving a Deno HTTP server back to Node is mostly mechanical. Deno.env.get() becomes process.env, and you replace Deno.serve() with a framework such as Hono. Hono handlers take a Web-standard Request and return a Response, so most of your routing logic carries over unchanged. If you are weighing runtimes more broadly, see Bun vs Node vs Deno.

Before (Deno):

const port = Number(Deno.env.get("PORT") ?? 8000);
Deno.serve({ port }, (req) => {
  const url = new URL(req.url);
  if (url.pathname === "/health") return new Response("ok");
  return new Response("Not found", { status: 404 });
});

After (Node + Hono):

import { Hono } from "hono";
import { serve } from "@hono/node-server";

const app = new Hono();
app.get("/health", (c) => c.text("ok"));
app.notFound((c) => c.text("Not found", 404));

const port = Number(process.env.PORT ?? 8000);
serve({ fetch: app.fetch, port });

On Node, serve() wraps the node:http module and returns the underlying server instance, so closing it is up to you. If you need graceful shutdown, keep a reference to that server. Load your exported KV data into a database that supports transactions, such as Postgres, so the kv.atomic() logic has somewhere to go.

Path C: Deno in Docker on a VPS

If you need zero code changes this quarter, run the same Deno app in a container on a VPS. This works as a stopgap and stops being a safe option when the fix-only window closes. Pin an exact image tag from Docker Hub rather than latest:

FROM denoland/deno:2.9.8
WORKDIR /app
COPY . .
USER deno
RUN deno cache main.ts
EXPOSE 8000
CMD ["run", "--allow-net", "--allow-env", "--unstable-kv", "main.ts"]

Outside Deploy, a Deno.openKv() call with no arguments uses a local SQLite file in a default location inside the container. To keep the data on a mounted volume, pass a path such as Deno.openKv("/data/kv.sqlite3"), mount the volume at /data, and add --allow-read=/data --allow-write=/data to the CMD. Then import your exported data into it.

If your app…Choose
Relies heavily on kv.atomic()Workers with Durable Objects, or Node with Postgres
Uses only Web-standard APIsWorkers or Node, whichever you prefer to operate
Needs zero code changes this quarterDeno in Docker, then plan Path A or B

Conclusion

Do the KV export first. It is the only step that can lose you data. After that, pick a path based on what your code depends on: Workers for fetch-handler apps, Node with Hono for portability to any host, and Docker only to buy time.

FAQs

What replaces Deno.cron when moving an app to Cloudflare Workers?

Cron Triggers replace Deno.cron on Workers. Add one or more cron expressions under triggers.crons in your Wrangler configuration file, then export a scheduled() handler from the Worker, either alongside fetch or instead of it. Cron Triggers run on UTC time. If one Worker declares several schedules, every schedule calls the same handler, and controller.cron tells it which schedule fired.

Can I keep using JSR packages after moving from Deno to Node?

Yes, through JSR's npm compatibility layer. Running npx jsr add with the package name writes a .npmrc entry that points the @jsr scope at npm.jsr.io and adds an aliased dependency to package.json. Commit that .npmrc file to source control. Packages are ESM-only, so package.json needs 'type': 'module'. Node cannot read jsr: import specifiers, so change those imports to the package name.

What happens to Deno Queues code that uses kv.enqueue and listenQueue?

Deno Queues are built on Deno KV. On Deploy they run on the hosted KV database, so they stop working when Deploy shuts down. On Cloudflare, use a Queues producer and a queue consumer handler. Off Cloudflare, use a job queue backed by your own database or Redis. Deno Queues deliver each message at least once, so make your handlers idempotent before you switch to a new queue system.

DevTools for the frontend

Gain Debugging Superpowers

Unleash the power of session replay to reproduce bugs, track slowdowns and uncover frustrations in your app. Get complete visibility into your frontend with OpenReplay — the most advanced open-source session replay tool for developers.

Star on GitHub12k

We use cookies to improve your experience. By using our site, you accept cookies.