# Is Cloudflare Computer Open Source? MIT License and Architecture Explained

> Discover if Cloudflare Computer is open source. Learn about its MIT license, architecture, and how you can use and modify its virtual filesystem and container runtime.

- Repository: [Cloudflare/computer](https://github.com/cloudflare/computer)
- Tags: architecture
- Published: 2026-08-09

---

**Yes, cloudflare/computer is fully open source under the MIT license, allowing free use, modification, and distribution of its virtual filesystem and container runtime components.**

The cloudflare/computer repository provides a virtual filesystem and execution environment built on Cloudflare Durable Objects. Released under the permissive MIT license, the entire codebase—including its SQLite-backed VFS, capnweb RPC layer, and container daemon—is available for public inspection and contribution.

## MIT License and Open Source Compliance

The repository's `LICENSE` file confirms that cloudflare/computer is distributed under the **MIT license**, one of the most permissive open source licenses available. This grants you the rights to use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the software, provided the copyright notice and permission notice are included in all copies or substantial portions.

While the project is marked as **"preview only"** in the top-level [`README.md`](https://github.com/cloudflare/computer/blob/main/README.md), indicating that APIs remain experimental and subject to change, the source code itself is fully open. This means you can clone the repository, examine the implementation details in [`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts), and modify the `WorkspaceRPC` interface definitions found in [`docs/08_capnweb_interface.md`](https://github.com/cloudflare/computer/blob/main/docs/08_capnweb_interface.md) without legal restriction.

## Core Architecture: Four Open Source Packages

The cloudflare/computer monorepo implements a distributed execution environment through four interconnected npm packages, all included in the same GitHub repository and built together using npm workspaces.

### @cloudflare/dofs – Virtual Filesystem Core

The **`@cloudflare/dofs`** package provides the **SQLite-backed virtual filesystem (VFS)** and synchronization protocol that serves as the authoritative state layer. According to [`packages/dofs/README.md`](https://github.com/cloudflare/computer/blob/main/packages/dofs/README.md), this package exports a `Database` handle used by other components to maintain filesystem state within Cloudflare Durable Objects.

Key implementation details reside in [`packages/dofs/src/sync/changes.ts`](https://github.com/cloudflare/computer/blob/main/packages/dofs/src/sync/changes.ts), which defines the `ChangeEntry` schema—the fundamental structure used for sync and object transfer between the persistent storage layer and execution environments.

### @cloudflare/computer-rpc – Capnweb RPC Definitions

The **`@cloudflare/computer-rpc`** package contains the **capnweb-based RPC layer** that enables communication between the Durable Object and in-container daemons. As documented in [`packages/rpc/README.md`](https://github.com/cloudflare/computer/blob/main/packages/rpc/README.md), this package defines the `WorkspaceRPC` interface, which splits functionality into `SyncRPC` (for filesystem operations) and `ShellRPC` (for command execution).

The transport mechanics and error model are detailed in [`docs/08_capnweb_interface.md`](https://github.com/cloudflare/computer/blob/main/docs/08_capnweb_interface.md), which specifies how the WebSocket endpoint (`/ws`) handles binary capnweb messages between the sandbox container and the coordinating Durable Object.

### @cloudflare/computerd – Container Daemon

The **`@cloudflare/computerd`** package implements the **FUSE daemon and RPC server** that runs inside sandbox containers. This daemon mounts the virtual filesystem via FUSE and serves the capnweb RPC endpoint to coordinate with the Durable Object.

The integration between the VFS and FUSE is tested in [`packages/computerd/src/exec/runner.fuse.test.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/exec/runner.fuse.test.ts), which demonstrates how the daemon handles filesystem operations within containerized environments (tests are skipped on non-Linux hosts where FUSE is unavailable).

### @cloudflare/computer – Public Consumer API

The **`@cloudflare/computer`** package exposes the **public API that Workers consume**. As shown in [`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts), this top-level package exports the `workspace` factory function, filesystem-like `fs` methods, and the `runtime.exec()` interface for command execution.

This package abstracts the complexity of the underlying RPC layer and VFS, allowing developers to interact with remote execution environments using familiar JavaScript APIs.

## Implementation Deep Dive: Key Source Files

Several critical files demonstrate the open source nature and architectural decisions of the project:

- **`LICENSE`** – Contains the full MIT license text, confirming the open source status of all packages in the repository.
- **[`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts)** – The public API entry point that exposes the `workspace` factory and runtime execution methods.
- **[`packages/dofs/src/sync/changes.ts`](https://github.com/cloudflare/computer/blob/main/packages/dofs/src/sync/changes.ts)** – Defines the `ChangeEntry` structure used for synchronizing filesystem state between the Durable Object and execution backends.
- **[`docs/08_capnweb_interface.md`](https://github.com/cloudflare/computer/blob/main/docs/08_capnweb_interface.md)** – Comprehensive documentation of the `WorkspaceRPC` interface, transport mechanics, and error handling strategies.
- **[`packages/computerd/src/exec/runner.fuse.test.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/exec/runner.fuse.test.ts)** – Integration tests showing how the daemon mounts the VFS via FUSE and executes commands within containerized environments.

## Practical Usage: Interacting with the Open Source API

The following example demonstrates how to use the open source `@cloudflare/computer` package within a Cloudflare Worker. This code creates a workspace, writes to the virtual filesystem, executes a shell command, and reads the file back:

```typescript
// Install: npm i @cloudflare/computer

import { workspace } from '@cloudflare/computer';

// Create a workspace backed by a Durable Object
const ws = await workspace.create({
  backend: 'container', // Options: 'container', 'shell', or 'javascript'
});

// Write to the virtual filesystem
await ws.fs.writeFile('hello.txt', new TextEncoder().encode('👋 Cloudflare!'));

// Execute a command in the container backend
const exec = await ws.runtime.exec('cat hello.txt', { backend: 'container' });
for await (const event of exec.events) {
  if (event.name === 'stdout') {
    console.log(new TextDecoder().decode(event.value));
  }
}

// Read the file directly via the VFS API
const data = await ws.fs.readFile('hello.txt');
console.log(new TextDecoder().decode(data)); // → 👋 Cloudflare!

```

The same API works across all execution backends—**Isolate shell**, **Isolate JavaScript**, or **container**—by changing only the `backend` option. The underlying implementation in [`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts) handles the RPC communication with the daemon running in `packages/computerd` and the state management in `packages/dofs`.

## Summary

- **cloudflare/computer is MIT licensed open source**, permitting commercial and private use, modification, and distribution.
- The repository consists of a **four-package monorepo**: dofs (VFS), computer-rpc (RPC definitions), computerd (daemon), and computer (public API).
- **Key implementation files** include [`packages/dofs/src/sync/changes.ts`](https://github.com/cloudflare/computer/blob/main/packages/dofs/src/sync/changes.ts) for sync logic and [`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts) for the public interface.
- While APIs are currently **preview/experimental**, the complete source code is freely available in the GitHub repository for inspection and contribution.

## Frequently Asked Questions

### What license does cloudflare/computer use?

The project uses the **MIT License**, as defined in the repository's `LICENSE` file. This permissive license allows you to use, modify, and distribute the code for both commercial and non-commercial purposes, provided you include the original copyright notice and license text.

### Can I self-host cloudflare/computer?

Yes, because the code is open source, you can theoretically self-host the components. However, the architecture is designed specifically for Cloudflare's infrastructure—requiring Durable Objects for state persistence and Workers for compute—so practical self-hosting outside the Cloudflare ecosystem would require significant modification of the RPC and storage layers defined in `packages/dofs` and `packages/rpc`.

### Is the cloudflare/computer API stable?

No, the API is currently marked as **"preview only"** according to the repository README. The interfaces exported from [`packages/computer/src/index.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/index.ts) and the `WorkspaceRPC` definitions are experimental and subject to breaking changes as the project evolves. Production use is not recommended until the API reaches general availability.

### Where can I find the source code for the virtual filesystem implementation?

The virtual filesystem implementation resides primarily in the `@cloudflare/dofs` package. The core sync logic and `ChangeEntry` schema are defined in [`packages/dofs/src/sync/changes.ts`](https://github.com/cloudflare/computer/blob/main/packages/dofs/src/sync/changes.ts), while the SQLite-backed VFS interface is documented in [`packages/dofs/README.md`](https://github.com/cloudflare/computer/blob/main/packages/dofs/README.md). These files handle the authoritative state layer that persists filesystem data in Cloudflare Durable Objects.