Skip to content

Self-hosting

ClawMobile Cloud is a thin control plane over open components. You can run the whole stack yourself; this page sketches the pieces and how they fit.

Components

LayerTechRole
Edge APICloudflare Worker (Hono)Auth, rate limits, SSE fan-out, D1/R2 access
Web UINext.js static export → CF PagesThe dashboard you’re reading about
DocsAstro Starlight → CF PagesThis site
OrchestratorBun + Hono on a VPSSession lifecycle, device pool, scrcpy relay
DevicesRedroid containers (Kamatera / Vast.ai)The Android runtime per session
StorageR2 (skills, recordings), D1 (index), KV (tokens, rate limits)State

Provisioning outline

  1. Edge. Create the Worker, D1 database (apply migrations), R2 buckets (clawmobile-skills, clawmobile-recordings), and KV namespaces. Deploy the Worker and both Pages projects.
  2. Orchestrator VPS. Run the first-boot script (generates the ADB keypair, creates /var/clawmobile, installs Bun), install cloudflared, and start the orchestrator + watchdog under PM2.
  3. Redroid node(s). Install Docker and pull the Redroid image. Register the node(s) in the orchestrator’s REDROID_HOSTS.
  4. Tunnel. The orchestrator is reached only through a Cloudflare Tunnel; the Worker calls its /internal/* routes with a shared X-Tunnel-Secret.

Key configuration

  • REDROID_HOSTS — comma-separated standing nodes (Tier 1).
  • VASTAI_API_KEY — optional burst capacity (Tier 2). Leave blank to disable; VASTAI_MAX_HOURS is a hard cost cap enforced by the watchdog.
  • TUNNEL_SECRET / JWT_SECRET — must match between Worker and orchestrator.
  • R2 S3-compat credentials (R2_S3_ENDPOINT, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY) enable presigned skill sharing.

See the .env.example and .dev.vars.example files in the repo for the full list, and the infra/ directory for the bootstrap scripts.

The plugin contract

The agent’s behavior comes from the mobile-ui plugin’s tool surface, which is stable: adding, removing, or renaming a tool is a breaking change. If you fork it, keep openclaw.plugin.json and the Tools reference in sync. Cloud mode is just CLAWMOBILE_LITE=1 + CLAWMOBILE_CLOUD=1.