Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 6 min read Announcement mediumAdept

Announcing self-hosted Deno KV, continuous backups, and replicas

Deno KV can now be self-hosted via an open-source, MIT-licensed `denokv` binary backed by SQLite and reachable from `Deno.openKv` over KV Connect. Databases hosted on Deno Deploy (backed by FoundationDB) can also stream continuous backups to S3 or GCS, and `denokv --sync-from-s3` runs a read-only local replica from those buckets. The replica keeps full mutation history, so `denokv pitr list` and `pitr checkout` give point-in-time recovery by versionstamp. Self-hosters own backups, replication and HA themselves, and Litestream or LiteFS is recommended for the SQLite file.

Assumes: Deno runtime basicskey-value storesS3 object storage

Related posts

  • Introducing KV Backup for Deno Subhosting

    Deno mediumAdept

    Deno Subhosting now supports continuous backup of Deno KV databases to customer-owned S3-compatible object storage, enabling point-in-time recovery. The workflow uses the Subhosting REST API: create a database via POST /organizations/{id}/databases, enable a backup with S3 endpoint, bucket and credentials via POST /databases/{id}/database_backups, then check status, list or delete backups. Only one backup can be active per database, so changing destination or credentials requires disabling the existing one first. Backup data can be synced to a local SQLite file and inspected or restored to a recovery point with the denokv tool.

  • Use Deno KV in Node with the new official npm package

    Deno mediumAdept

    Deno KV is now usable from Node.js through the official @deno/kv npm package, which exposes the same API as Deno's built-in KV through a single openKv function. That function can connect to a managed Deno Deploy database backed by FoundationDB, a self-hosted denokv server, a local SQLite file, or an in-memory store for tests. Most methods are supported, including atomic, enqueue and watch, but listenQueue does not work against remote databases yet. The package targets Node 18+, has no third-party dependencies, ships platform-specific SQLite binaries built with NAPI-RS from the Rust denokv codebase, and stores values in V8's serialization format.

  • Announcing Deno KV

    Deno mediumAdept

    Deno KV is a strongly consistent key-value database built into the Deno runtime. It is backed by SQLite when run locally and by FoundationDB when managed on Deno Deploy, where it is globally replicated across 35 regions. The API stores structured-serializable JavaScript values under array keys, supports prefix listing with cursor pagination, and offers atomic multi-key transactions using check-and-set. Reads are strongly consistent (serializable and linearizable) by default and can opt into eventual consistency for lower latency, for example 7ms versus 94ms in Frankfurt during the beta.

  • Deno 1.33: Deno 2 is coming

    Deno mediumAdept

    Deno 1.33 ships a built-in, unstable KV database (Deno.openKv) that persists to disk locally and is geo-replicated on Deno Deploy. It also flattens the deno.json schema, drops permission checks for statically analyzable dynamic imports, and polyfills many node:crypto, node:http and node:vm APIs. Deno.run is deprecated in favour of Deno.Command, and one Deno.serve overload is removed ahead of stabilization. Deprecated std/encoding paths are deleted, with an import-map workaround for transitive dependencies. The release also adds LSP document preloading, deno bench --no-run, an unset command for deno task, and V8 11.4, all framed as steps toward Deno 2.

  • How to Build a CRUD API with Oak and Deno KV

    Deno mediumAdept

    Deno KV, a key-value database built into the Deno runtime, can back a simple CRUD API for users and addresses served by Oak's Router. The walkthrough models a secondary index on email as a separate key prefix that maps email to user ID. It uses kv.atomic() with .check() to keep the primary and index keys consistent under concurrent writes, and paginates kv.list() with limit and cursor. The code runs with the --unstable flag in Deno 1.33+ and is tested with curl.

The quest for software engineering knowledge.

Look:
Layout: