Mainbrella open source · GPL v3.0

Open Source
Business in a Box

Fork Mainbrella. Make it your own. Set your prices and sell Linux workspaces for AI agents from your own Cloudflare account. Accounts, billing, quotas, and customer access are already built.

GPL v3.0. No Mainbrella software fee.
Existing Workers Paid allowances may cover a small deployment.

A control plane on the stack you already use.
  1. 01
    Humans & agents

    Web · iPhone / iPad · JavaScript · Python · HTTP

  2. 02
    Workers + D1

    API · identity · account and billing data

  3. 03
    Durable Objects

    Reservations · quotas · lifecycle · generation fencing

  4. 04
    Cloudflare Containers

    Real Linux · native filesystem · your workloads

Cloudflare provides the infrastructure. Mainbrella connects it into an agent workspace system.

Your brand. Your prices. Your customers.

Start with a working platform, then build a service for the people you want to serve.

The foundation
is already built.

Account management, billing flows, API keys, quota enforcement, machine lifecycle, terminals, and previews take real engineering work. That code is here, along with deployment configs and tests. Put your effort into the audience, experience, and service that make your business worth choosing.

You're welcome to compete directly with mainbrella.com. Forking the platform and selling your own hosted service is part of the invitation.

Fork the GPL v3 source, customize your brand and prices, deploy to your own Cloudflare account, and sell to your customers. The platform includes a working SaaS with no Mainbrella software fee.
Example prices in the diagram are illustrative—you choose your own. View full size →

What if your sandbox infrastructure was mostly Cloudflare?

Linux machines on demand, without assembling a Kubernetes cluster, an EC2 fleet, Redis, and Postgres.

Workers handle the front door.

The API authenticates sessions and named API keys, checks ownership, and routes lifecycle, commands, files, and interactive access to the right machine. D1 holds the surrounding account, billing, and application data.

Durable Objects coordinate the work.

A ContainerAccount object coordinates account reservations, concurrency, and compute budgets. Each machine's runtime has its own state. Cloudflare Containers supply the isolated Linux environment.

Ambiguous response?
Keep one launch.

Creation combines persisted reservations with idempotency keys. If a launch response gets lost, retrying the same request can reconcile the original creation instead of casually starting another paid machine. Commands that may have already run need reconciliation, not blind replay.

How creation and generations work →
Mainbrella connects the web dashboard, billing, developer API, SDKs, SSH, terminals, previews, saved workspaces, and mobile clients to Workers, D1, Durable Objects, and Linux Containers in your Cloudflare account. Customize the brand, prices, and domain.
View the control-plane diagram at full size →

The useful parts are already connected.

From an agent's first command to a human opening its work.

Explore the docs →

Use the language
you already use.

JavaScript and Python SDKs expose the same machine workflow. The HTTP API and OpenAPI description let you integrate your own agent or generate a client.

JavaScript SDKnpm install @mainbrella/sdk
Python SDKpip install mainbrella
OpenAPI →

An old request never becomes a new machine's command.

A slot name identifies a place. The generation identifies the machine that actually occupied it.

  1. Start small, generation A.

    Launch execution abc. Receive “downloading…” and “compiling…” through cursor 2.

  2. The connection drops. A stops.

    Recreate small as generation B: a fresh machine in the same logical slot.

  3. The old client reconnects.

    Execution abc + generation A + cursor 2 still identifies A's retained execution history. It never attaches to B.

After B replaces A Illustrative API requests
# Read A's retained output, while retained
GET /containers/executions/abc/events
    ?id=small&createdAt=<A>&cursor=2
→ A's recorded output and status

# Try to run a command on A
POST /containers/exec
     ?id=small&createdAt=<A>
→ 409 Conflict
{"error":"container_not_running"}

The command never runs on generation B.

The API checks the logical ID and exact createdAt before forwarding commands; the runtime rechecks generation identity. Old stdin writes are fenced out too. A malformed generation returns 400 invalid_generation. Retained history remains subject to execution retention limits.

Inspect the command boundary →

A private machine. A real browser development loop.

Let an agent build the app, then open what it made.

Preview routing and access →

Native Linux files. Explicit persistence.

Keep normal filesystem behavior while the machine is alive. Save when you want to keep the work.

  1. WorkUse the container's native filesystem.
  2. SaveCapture a filesystem snapshot explicitly.
  3. StopRelease the running machine.
  4. RestoreBring saved bytes into a fresh generation.

Files come back. Processes start fresh.

Ordinary stop discards unsaved filesystem changes. Save/restore preserves filesystem state; RAM, running processes, and preview sessions do not resume. Export a workspace when you want a portable backup.

A boundary you can inspect.

The repository includes coverage for save/restore, binary bytes, symlinks, permissions, timestamps, stale generations, account isolation, export, and deletion. The verification tooling is part of the project.

Saved workspace semantics →

Already on Workers Paid? You have a head start.

Fork Mainbrella and put your existing Cloudflare account to work.

Fork it. Set your own prices. Compete with us.

Mainbrella is free software under GPL v3.0. You are welcome to inspect, fork, modify, and run the code, change the pricing, charge your own customers, and launch a hosted service that competes with mainbrella.com. You do not need a Mainbrella subscription or to pay us a software fee.

Your infrastructure runs in your account. Respect GPL v3.0, including its requirements when distributing modified software.

Read the GPL v3.0 license →

Your plan already includes Container usage.

Cloudflare's $5/month Workers Paid plan includes 375 vCPU-minutes, 25 GiB-hours of memory, and 200 GB-hours of disk each month. A small deployment that stays within your account's included allowances may add no compute cost.

Containers require Workers Paid. Allowances are shared across your account; additional usage and other services can incur charges.

Cloudflare pricing and allowances →

The deployment
is in the repository.

Worker code, the container runtime and Dockerfile, Wrangler configs, D1 migrations, tests, and deployment tooling are included. Start with the backend README and release runbook: configure your account bindings, domains, identity and billing integrations, and secrets; apply migrations; then deploy the runtime and API in the documented order. Adapt the account entitlements for your own installation.

Cloudflare allowances reviewed October 6, 2026. This is a self-hosting option; Mainbrella's hosted plans are a separate service.

How does this relate to Cloudflare Computer?

Shared distributed-systems problems. Different starting points.

Design choiceCloudflare ComputerMainbrella
Core abstractionA durable workspace/filesystem with execution attached.A managed Linux machine with lifecycle and access attached.
FilesystemDurable Object SQLite is authoritative; the Container backend mounts it through FUSE.Native container filesystem; explicit snapshot save and restore.
ComputeContainers, Worker shell, and Worker JavaScript backends.Full Linux Cloudflare Containers.
Product layerA developer library to build into an application.Accounts, billing, quotas, API keys, SDKs, SSH, terminals, previews, images, and mobile clients.

Execution needs an owner.

Both projects address execution identity, retained output, and the risk of ambiguous command replay. Mainbrella binds machine operations to an exact generation so delayed requests cannot reach a replacement.

Keep native machines. Explore lightweight runtimes.

Mainbrella does not currently use Computer. Its Worker runtimes are an interesting direction for a separate lightweight workspace experiment. Computer currently labels itself preview-only; replacing working backend pieces needs a clear benefit and workload-specific filesystem testing.

Read Cloudflare Computer's architecture and preview status →

Build a business on it.

Choose your audience, make the platform your own, and offer a service people want to use. The code is open, the pricing is yours to change, and your customers are yours to serve.