# How the computerd Daemon Is Shipped and What It Implements in Cloudflare Computer

> Discover how the computerd daemon is shipped and its FUSE filesystem driver, Cap'n Proto RPC server, and process-execution subsystem for managing remote workloads in Cloudflare Computer.

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

---

**The computerd daemon is shipped as a pre-built native executable in the `artifacts/computerd/` directory and implements a FUSE filesystem driver, a Cap'n Proto RPC server, and a process-execution subsystem for managing remote workloads.**

The **computerd** daemon serves as the core runtime powering the Cloudflare Computer platform, acting as the bridge between Durable Objects and the underlying virtual filesystem. According to the cloudflare/computer source code, this TypeScript-based binary bundles a FUSE driver, RPC layer, and process manager into a single deployable artifact. Understanding its packaging and internal architecture is essential for operating self-hosted instances or debugging the interaction between the filesystem and remote execution contexts.

## How the computerd Daemon Is Shipped

### Build Artifacts and Distribution

The daemon is built from the TypeScript source located in the `packages/computerd` workspace and packaged as a native-compatible executable. The CI pipeline compiles the daemon for each target platform and publishes the binary as a release artifact in the repository’s `artifacts/computerd/` directory. For example, the Linux x64 build is available at `artifacts/computerd/computerd-linux-x64`.

These pre-built binaries bundle the Node.js runtime along with the native **fuse-native** addon, allowing the daemon to mount virtual filesystems without requiring a separate Node.js installation on the host. Test harnesses and example scripts invoke the daemon directly via these artifact paths, ensuring consistent behavior across development and production environments.

### Platform-Specific Packaging

Each platform receives a dedicated binary following the naming convention `computerd-<platform>`, stored under `artifacts/computerd/`. The build process compiles [`packages/computerd/src/cli/computerd.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/cli/computerd.ts) into a standalone executable that includes all dependencies required for FUSE operations and Cap'n Proto serialization.

## Core Capabilities Implemented by the computerd Daemon

The daemon implements three tightly-coupled responsibilities that enable remote computation with POSIX-compatible filesystem semantics.

### FUSE Filesystem Driver

Located in [`packages/computerd/src/fuse/driver.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/fuse/driver.ts), the **FUSE driver** uses the **fuse-native** native addon to expose a virtual filesystem. This driver forwards all VFS calls to the **dofs** SQLite layer, implementing the full set of POSIX operations required by the mount interface, including `open`, `read`, `write`, `readdir`, and `getattr`.

The driver mounts the virtual filesystem at a user-specified path, allowing processes to interact with the persisted SQLite-backed storage as if it were a standard local directory. All file metadata and content operations pass through this layer before reaching the underlying `dofs` database.

### Cap'n Proto RPC Server

The RPC subsystem, centered in [`packages/computerd/src/rpc/server.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/rpc/server.ts), provides the **capnweb** RPC contract defined in [`docs/08_capnweb_interface.md`](https://github.com/cloudflare/computer/blob/main/docs/08_capnweb_interface.md). This server publishes the **Runner** and **SyncRPC** interfaces that the `computerd` Durable Object consumes. Through these interfaces, remote clients trigger filesystem synchronization, execute commands within the mounted environment, and supervise running processes.

The Cap'n Proto implementation enables high-performance, schema-evolution-safe communication between the edge-distributed Durable Object and the daemon running on compute nodes.

### Process-Execution Subsystem

Process lifecycle management is handled in [`packages/computerd/src/exec/runner.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/exec/runner.ts) and related modules including [`log.ts`](https://github.com/cloudflare/computer/blob/main/log.ts) and [`schema.ts`](https://github.com/cloudflare/computer/blob/main/schema.ts). This subsystem manages command execution inside the FUSE-mounted environment, storing execution metadata in the same SQLite database used by `dofs`. It tracks stdout and stderr streams, manages process state transitions, and cleans up orphaned exec rows when the daemon starts up.

The execution layer ensures that all processes run within the context of the virtual filesystem, maintaining isolation while providing durable logging and exit status tracking.

## Bootstrapping the Daemon

The entry point at [`packages/computerd/src/cli/computerd.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/cli/computerd.ts) parses command-line flags, initializes the FUSE driver at the specified mount point, and starts the RPC server on the configured port. When launched, the binary performs the following sequence:

1. Parses CLI arguments for mount path (`--mount`) and RPC port (`--port`)
2. Initializes the SQLite-backed `dofs` layer
3. Starts the FUSE driver to expose the virtual filesystem
4. Spins up the Cap'n Proto RPC server to accept connections from Durable Objects

```bash

# Path to the pre-built binary (Linux x64 example)

ARTIFACT=artifacts/computerd/computerd-linux-x64

# Mount point for the virtual filesystem

MOUNT=/tmp/computerd-mount

# Start the daemon (runs FUSE driver + RPC server)

$ARTIFACT --mount $MOUNT --port 8080

```

## Interacting with the Daemon

You can interact with the running daemon via the Cap'n Proto RPC interface using the client libraries provided in the repository.

```typescript
import { createRunner } from '@cloudflare/computer-rpc';

async function runCommand() {
  const runner = await createRunner('http://localhost:8080');
  const exec = await runner.exec({ cmd: ['ls', '-l', '/'] });
  const output = await exec.readAll();   // captures stdout/stderr
  console.log(output);
}
runCommand();

```

To execute a process within the mounted FUSE filesystem:

```typescript
import { exec } from '@cloudflare/computer';

await exec('bash', {
  cwd: '/workspace',                     // inside the mounted VFS
  env: { PATH: '/usr/local/bin:/bin' },
});

```

## Summary

- The **computerd** daemon ships as a native binary in `artifacts/computerd/` (e.g., `computerd-linux-x64`), built from the `packages/computerd` workspace.
- It implements a **FUSE driver** at [`packages/computerd/src/fuse/driver.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/fuse/driver.ts) that exposes the SQLite-backed `dofs` filesystem via POSIX operations.
- The **Cap'n Proto RPC server** in [`packages/computerd/src/rpc/server.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/rpc/server.ts) exposes `Runner` and `SyncRPC` interfaces for Durable Object communication.
- The **process-execution subsystem** in [`packages/computerd/src/exec/runner.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/exec/runner.ts) manages command lifecycle, stream capture, and metadata persistence.
- The CLI entry point at [`packages/computerd/src/cli/computerd.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/cli/computerd.ts) orchestrates bootstrap, mounting the filesystem and starting the RPC server on startup.

## Frequently Asked Questions

### What platforms does the computerd daemon support?

The repository provides pre-built binaries for Linux x64 in `artifacts/computerd/computerd-linux-x64`. The CI pipeline builds platform-specific executables for each supported target, storing them with the naming convention `computerd-<platform>`. These artifacts include the Node.js runtime and the native **fuse-native** addon, eliminating external dependencies on the host system.

### How does the computerd daemon handle persistence?

The daemon persists execution state and filesystem metadata using the **dofs** SQLite layer. Process execution logs, exit statuses, and stream data are stored in the same database that backs the FUSE filesystem. On startup, [`packages/computerd/src/exec/runner.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/exec/runner.ts) performs cleanup of orphaned exec rows to maintain database consistency after unclean shutdowns.

### Can I run the computerd daemon without FUSE capabilities?

No. The FUSE driver implemented in [`packages/computerd/src/fuse/driver.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/fuse/driver.ts) is a core component required for operation. The daemon relies on the virtual filesystem to provide the execution environment for remote commands. Without mounting the FUSE filesystem at the specified `--mount` path, the process-execution subsystem cannot isolate or manage workloads correctly.

### What RPC protocol does the computerd daemon use?

The daemon implements the **capnweb** protocol using Cap'n Proto. Defined in [`docs/08_capnweb_interface.md`](https://github.com/cloudflare/computer/blob/main/docs/08_capnweb_interface.md) and implemented in [`packages/computerd/src/rpc/server.ts`](https://github.com/cloudflare/computer/blob/main/packages/computerd/src/rpc/server.ts), this interface exposes the **Runner** and **SyncRPC** capabilities. The Durable Object consumes these interfaces to trigger filesystem synchronization, spawn processes, and retrieve execution results from the daemon.