Skip to content
Back to search

open-computer-use

MCP server that gives any LLM its own computer — managed Docker workspaces with live browser, terminal, code execution, document skills, and autonomous sub-agents. Self-hosted, open-source, pluggable into any model.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wide-moat--open-computer-use/badge.svg)](/listings/wide-moat--open-computer-use)

HTML

<a href="/listings/wide-moat--open-computer-use"><img src="/api/listings/wide-moat--open-computer-use/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/Wide-Moat/open-computer-use.git
cd open-computer-use
cp .env.example .env
# Edit .env — set OPENAI_API_KEY (or any OpenAI-compatible provider)

# 1. Start Computer Use Server (builds workspace image on first run, ~15 min)
docker compose up --build

# 2. Start Open WebUI (in another terminal)
docker compose -f docker-compose.webui.yml up --build

Open http://localhost:3000 — Open WebUI with Computer Use ready to go.

> **Note:** Two separate docker-compose files: `docker-compose.yml` (Computer Use Server) and `docker-compose.webui.yml` (Open WebUI). They communicate via `localhost:8081`. This mirrors real deployments where the server and UI run on different hosts.

Model Settings (important!)

After adding a model in Open WebUI, go to **Model Settings** and set:

| Setting | Value | Why | |---------|-------|-----| | **Function Calling** | `Native` | Required for Computer Use tools to work | | **Stream Chat Response** | `On` | Enables real-time output streaming |

Without `Function Calling: Native`, the model won't invoke Computer Use tools.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 461 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Open Computer Use
  2. [![Build](https://github.com/Wide-Moat/open-computer-use/actions/workflows/build.yml/badge.svg)](https://github.com/Wide-Moat/open-computer-use/actions/workflows/build.yml)
  3. [![CodeQL](https://github.com/Wide-Moat/open-computer-use/actions/workflows/codeql.yml/badge.svg)](https://github.com/Wide-Moat/open-computer-use/actions/workflows/codeql.yml)
  4. [![Release](https://img.shields.io/github/v/release/Wide-Moat/open-computer-use)](https://github.com/Wide-Moat/open-computer-use/releases)
  5. [![License](https://img.shields.io/badge/license-FSL--1.1--Apache--2.0-blue)](LICENSE)
  6. [![Stars](https://img.shields.io/github/stars/Wide-Moat/open-computer-use)](https://github.com/Wide-Moat/open-computer-use/stargazers)
  7. [![Issues](https://img.shields.io/github/issues/Wide-Moat/open-computer-use)](https://github.com/Wide-Moat/open-computer-use/issues)
  8. MCP server that gives any LLM its own computer — managed Docker workspaces with live browser, terminal, code execution, document skills, and autonomous sub-agents. Self-hosted, open-source, pluggable into any model.
  9. > **ARCHIVED.** This repository is no longer developed or maintained. It receives no fixes, no security updates and no dependency updates, and issues and pull requests are closed. Do not run it in production.
  10. >
  11. > Open Computer Use was a proof of concept for giving an LLM a real computer. Its successor is [Wide Moat](https://widemoat.ai): Open WebUI with Open Terminal, a browser, and a Kubernetes sandbox isolated with gVisor, with ingress sidecars and egress through a MITM proxy. The isolation and credential-handling problems listed under [Known limitations](#known-limitations) are addressed in that architecture, not in this codebase. Try it at [ai.lab.widemoat.ai](https://ai.lab.widemoat.ai).
  12. >
  13. > The code stays available under FSL-1.1-Apache-2.0: use it, fork it, self-host it. Each release converts to Apache-2.0 two years after publication.
  14. ![Demo: Qwen 3.6 Plus scrapes GitHub Trending, builds an Excel chart, and ships an editorial web dashboard — all in one chat](docs/demo-qwen-trending.gif)
  15. ## What is this?
  16. An MCP server that gives any LLM a fully-equipped Ubuntu sandbox with isolated Docker containers. Think of it as your AI's computer — it can do everything a developer can do:
  17. - **Execute code** — bash, Python, Node.js, Java in isolated containers
  18. - **Create documents** — Word, Excel, PowerPoint, PDF with professional styling via skills
  19. - **Browse the web** — Playwright + live CDP browser streaming (you see what AI sees in real-time)
  20. - **Run Claude Code** — autonomous sub-agent with interactive terminal, MCP servers auto-configured
  21. - **Use 13+ skills** — battle-tested workflows for document creation, web testing, design, and more
  22. **Built for production multi-user deployments.** Tested with 1,000+ MAU. Each chat session runs in its own isolated Docker container — the AI can install packages, create files, run servers, and nothing leaks between users. Works seamlessly across MCP clients: start with Open WebUI today, switch to Claude Desktop or n8n tomorrow — same backend, no migration.
  23. ### Key differentiators
  24. | Feature | Open Computer Use | Claude.ai (Claude Code web) | [open-terminal](https://github.com/open-webui/open-terminal) | OpenAI Operator |
  25. |---------|-------------------|-----------|---------------|-----------------|
  26. | **Self-hosted** | Yes | No | Yes | No |
  27. | **Any LLM** | Yes (OpenAI-compatible) | Claude only | Any (via Open WebUI) | GPT only |
  28. | **Code execution** | Full Linux sandbox | Sandbox (Claude Code web) | Sandbox / bare metal | No |
  29. | **Live browser** | CDP streaming (shared, interactive) | Screenshot-based | No | Screenshot-based |
  30. | **Terminal + Claude Code** | ttyd + tmux + Claude Code CLI | Claude Code web (built-in) | PTY + WebSocket | N/A |
  31. | **Skills system** | 13 built-in (auto-injected) + custom | Built-in skills + custom instructions | Open WebUI native (text-only) | N/A |
  32. | **Container isolation** | Docker (runc), per chat | Docker (gVisor) | Shared container (OS-level users) | N/A |
  33. Works with **any MCP-compatible client**: Open WebUI, Claude Desktop, LiteLLM, n8n, or your own integration. See [docs/COMPARISON.md](docs/COMPARISON.md) for a detailed comparison with alternatives.
  34. ### Live browser streaming
  35. ![Browser Viewer](docs/screenshots/03-browser-viewer.png)
  36. ### File preview with skills
  37. ![File Preview](docs/screenshots/02-file-preview.png)
  38. ### Frontend design — landing page rendered live in the browser tab
  39. ![Roasthaus landing page generated by the frontend-design skill, rendered live next to the chat](docs/screenshots/07-frontend-design-skill.png)
  40. ### Presentations — custom design system, not the default white template
  41. ![BrewLoop investor pitch deck slide with stat cards and a bar chart in a coffee-inspired palette](docs/screenshots/08-pptx-skill.png)
  42. ### Build your own skills — package recurring work into reusable functions
  43. ![invoice-builder skill demonstrating itself: usage code on the left, generated PDF on the right](docs/screenshots/09-skill-creator.png)
  44. ### Data → chart with analysis
  45. ![SaaS user-growth chart with annotated inflection point and written analysis](docs/screenshots/10-data-chart.png)
  46. ### Claude Code — interactive terminal in the cloud
  47. ![Claude Code Terminal](docs/screenshots/04-sub-agent-terminal.png)
  48. ### Sub-agent dashboard — monitor and control
  49. ![Sub-Agent Dashboard](docs/screenshots/06-sub-agent-dashboard.png)
  50. See [docs/FEATURES.md](docs/FEATURES.md) for architecture details and [docs/SCREENSHOTS.md](docs/SCREENSHOTS.md) for all screenshots.
  51. > **Pro tip**: Create skills with Claude Code in the terminal, then use them with any model in the chat. Skills are model-agnostic — write once, use everywhere.
  52. > **Multi-CLI sub-agent runtime (v0.9.2.1+)**: The sub-agent dispatch supports Claude Code (default), OpenAI Codex, and OpenCode (with OpenRouter / qwen / DeepSeek / 75+ providers). Flip `SUBAGENT_CLI=claude|codex|opencode` in `.env` — see [docs/multi-cli.md](docs/multi-cli.md) for the worked OpenCode + qwen3-coder + OpenRouter recipe.
  53. ## Architecture
  54. ![Architecture](docs/architecture.svg)
  55. > [docs/future-architecture/](docs/future-architecture/) holds design notes for a Kubernetes architecture that was not built in this repository. Docker Compose is the only path this code supports.
  56. ## Ways to try it
  57. | Path | URL | What you need | Best for |
  58. |------|-----|---------------|----------|
  59. | **Free online demo** — Open WebUI + Computer Use, models included | **[ai.lab.widemoat.ai](https://ai.lab.widemoat.ai)** | GitHub or Google sign-in | Trying it end-to-end in 30 seconds |
  60. | **Self-host** | [Quick Start](#quick-start) below | Docker, ~15 min first build | Full control, air-gapped, heavy use |
  61. OAuth only — no email/password, no SMS. On `ai.lab.widemoat.ai` models are bundled as a free convenience. The hosted MCP endpoint is offline; see [docs/CLOUD.md](docs/CLOUD.md).
  62. ## Quick Start
  63. ```bash
  64. git clone https://github.com/Wide-Moat/open-computer-use.git
  65. cd open-computer-use
  66. cp .env.example .env
  67. # Edit .env — set OPENAI_API_KEY (or any OpenAI-compatible provider)
  68. # 1. Start Computer Use Server (builds workspace image on first run, ~15 min)
  69. docker compose up --build
  70. # 2. Start Open WebUI (in another terminal)
  71. docker compose -f docker-compose.webui.yml up --build
  72. ```
  73. Open http://localhost:3000 — Open WebUI with Computer Use ready to go.
  74. > **Note:** Two separate docker-compose files: `docker-compose.yml` (Computer Use Server) and `docker-compose.webui.yml` (Open WebUI). They communicate via `localhost:8081`. This mirrors real deployments where the server and UI run on different hosts.
  75. ### Model Settings (important!)
  76. After adding a model in Open WebUI, go to **Model Settings** and set:
  77. | Setting | Value | Why |
  78. |---------|-------|-----|
  79. | **Function Calling** | `Native` | Required for Computer Use tools to work |
  80. | **Stream Chat Response** | `On` | Enables real-time output streaming |
  81. Without `Function Calling: Native`, the model won't invoke Computer Use tools.
  82. ## What's Inside the Sandbox
  83. ![Sandbox Contents](docs/sandbox-contents.svg)
  84. | Category | Tools |
  85. |----------|-------|
  86. | **Languages** | Python 3.12, Node.js 22, Java 21, Bun |
  87. | **Documents** | LibreOffice, Pandoc, python-docx, python-pptx, openpyxl |
  88. | **PDF** | pypdf, pdf-lib, reportlab, tabula-py, ghostscript |
  89. | **Images** | Pillow, OpenCV, ImageMagick, sharp, librsvg |
  90. | **Web** | Playwright (Chromium), Mermaid CLI |
  91. | **AI** | Claude Code CLI, Playwright MCP |
  92. | **OCR** | Tesseract (configurable languages) |
  93. | **Media** | FFmpeg |
  94. | **Diagrams** | Graphviz, Mermaid |
  95. | **Dev** | TypeScript, tsx, git |
  96. ## Skills
  97. 13 built-in public skills + 14 examples:
  98. | Skill | Description |
  99. |-------|-------------|
  100. | **pptx** | Create/edit PowerPoint presentations with html2pptx |
  101. | **docx** | Create/edit Word documents with tracked changes |
  102. | **xlsx** | Create/edit Excel spreadsheets with formulas |
  103. | **pdf** | Create, fill forms, extract, merge PDFs |
  104. | **sub-agent** | Delegate complex tasks to Claude Code |
  105. | **playwright-cli** | Browser automation and web scraping |
  106. | **describe-image** | Vision API image analysis |
  107. | **frontend-design** | Build production-grade UIs |
  108. | **webapp-testing** | Test web applications with Playwright |
  109. | **doc-coauthoring** | Structured document co-authoring workflow |
  110. | **test-driven-development** | TDD methodology enforcement |
  111. | **skill-creator** | Create custom skills |
  112. | **gitlab-explorer** | Explore GitLab repositories |
  113. **14 example skills**: web-artifacts-builder, copy-editing, social-content, canvas-design, algorithmic-art, theme-factory, mcp-builder, and more.
  114. See [docs/SKILLS.md](docs/SKILLS.md) for details.
  115. ## MCP Integration
  116. The server speaks standard MCP over Streamable HTTP. Point any MCP client at your own deployment.
  117. - **Self-hosted**: `http://localhost:8081/mcp`. Quick sanity check:
  118. ```bash
  119. curl -X POST http://localhost:8081/mcp \
  120. -H "Content-Type: application/json" \
  121. -H "X-Chat-Id: test" \
  122. -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
  123. ```
  124. Full self-host integration guide (LiteLLM, Claude Desktop, custom clients): [docs/MCP.md](docs/MCP.md). The per-chat system prompt rides **six redundant MCP-native channels** (tool descriptions, `/home/assistant/README.md` in the sandbox, `InitializeResult.instructions`, `resources/list` for uploaded files, plus an HTTP `/system-prompt` endpoint for legacy integrations) — full map in [docs/system-prompt.md](docs/system-prompt.md).
  125. ## Configuration
  126. All settings via `.env`:
  127. | Variable | Default | Description |
  128. |----------|---------|-------------|
  129. | `OPENAI_API_KEY` | — | LLM API key (any OpenAI-compatible) |
  130. | `OPENAI_API_BASE_URL` | — | Custom API base URL (OpenRouter, etc.) |
  131. | `MCP_API_KEY` | — | Bearer token for MCP endpoint |
  132. | `DOCKER_IMAGE` | `open-computer-use:latest` | Sandbox container image |
  133. | `COMMAND_TIMEOUT` | `120` | Bash tool timeout (seconds) |
  134. | `SUB_AGENT_TIMEOUT` | `3600` | Sub-agent timeout (seconds) |
  135. | `SINGLE_USER_MODE` | — | `true` = one container, no chat ID needed; `false` = require X-Chat-Id; unset = lenient |
  136. | `PUBLIC_BASE_URL` | `http://computer-use-server:8081` | Browser-reachable URL of the Computer Use server. Baked into `/system-prompt` and returned to the Open WebUI filter in the `X-Public-Base-URL` response header — **single source of truth** for the public URL. [Open WebUI filter URL requirements](docs/openwebui-filter.md#two-url-roles--public-server-env-and-internal-filtertool-valve). |
  137. | `CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS`, `ORCHESTRATOR_URL`, `TOOL_RESULT_MAX_CHARS`, `TOOL_RESULT_PREVIEW_CHARS` | — | Settings on the **`open-webui` container** (not CU-server). Required when embedding — see [Required setup when embedding Open WebUI](#required-setup-when-embedding-open-webui-into-your-own-stack). |
  138. | `POSTGRES_PASSWORD` | `openwebui` | PostgreSQL password |
  139. | `VISION_API_KEY` | — | Vision API key (for describe-image) |
  140. | `ANTHROPIC_AUTH_TOKEN` | — | Anthropic key (for Claude Code sub-agent) |
  141. | `MCP_TOKENS_URL` | — | Settings Wrapper URL (optional, see below) |
  142. | `MCP_TOKENS_API_KEY` | — | Settings Wrapper auth key |
  143. ### Custom Skills & Token Management (optional)
  144. By default, all 13 built-in skills are available to everyone. For per-user skill access and custom skills, deploy the **Settings Wrapper** — see [settings-wrapper/README.md](settings-wrapper/README.md).
  145. **Personal Access Tokens (PATs):** The settings wrapper can also store encrypted per-user PATs for external services (GitLab, Confluence, Jira, etc.). The server fetches them by user email and injects into the sandbox — so each user's AI has access to their repos/docs without sharing credentials. The server-side code for token injection is implemented (`docker_manager.py`), but the Open WebUI tool does not pass the required headers, and that will not be added.
  146. ## MCP Client Integrations
  147. The Computer Use Server speaks standard **MCP over Streamable HTTP** — any MCP-compatible client can connect. Open WebUI is the primary tested frontend, but not the only option.
  148. | Client | Self-hosted URL | Status |
  149. |--------|-----------------|--------|
  150. | [**Open WebUI**](https://github.com/open-webui/open-webui) | Docker Compose stack included, auto-configured | Tested in production |
  151. | [**Claude Desktop**](https://claude.ai/download) | `http://localhost:8081/mcp` — see [docs/MCP.md](docs/MCP.md) | Works |
  152. | [**n8n**](https://n8n.io) | MCP Tool node → `http://computer-use-server:8081/mcp` | Works |
  153. | [**LiteLLM**](https://github.com/BerriAI/litellm) | MCP proxy config — see [docs/MCP.md](docs/MCP.md) | Works |
  154. | **Custom client** | Any HTTP client with MCP JSON-RPC — see curl examples in [docs/MCP.md](docs/MCP.md) | Works |
  155. ## Open WebUI Integration
  156. > **[Open WebUI](https://github.com/open-webui/open-webui)** is an extensible, self-hosted AI interface. We use it as the primary frontend because it supports tool calling, function filters, and artifacts — everything needed for Computer Use.
  157. **Compatibility:** This build is strictly built and verified against Open WebUI 0.11.0. The first 3 segments of our build version (`v0.11.0.X`) always match the Open WebUI base version it targets. If you run a different Open WebUI version, pick the Open Computer Use build whose first 3 version segments match yours — e.g., for Open WebUI 0.8.12 use a `v0.8.12.Y` build.
  158. **Why not a fork?** Computer Use itself is not a fork: it bolts on through the official plugin API — tools and functions — so stock [Open WebUI](https://github.com/open-webui/open-webui) works with just the tool and filter installed. (A separate fork does exist for changes that cannot be expressed as plugins, but nothing in this repository depends on it.)
  159. Running Claude Code through a corporate gateway (LiteLLM, Azure, Bedrock)? See [docs/claude-code-gateway.md](docs/claude-code-gateway.md) for the three-path operator recipe.
  160. The `openwebui/` directory contains:
  161. - **tools/** — MCP client tool (thin proxy to Computer Use Server). **Required** — this is the bridge between Open WebUI and the sandbox.
  162. - **functions/** — System prompt injector + file link rewriter + archive button. **Required** — without it the model doesn't know about skills and file URLs.
  163. - **patches/** — Build-time fixes for artifacts, error handling, file preview. **Optional** but recommended — improves UX significantly.
  164. - **init.sh** — Auto-installs tool + filter on first startup. **Optional** — you can install manually via Workspace UI instead.
  165. - **init.sh** — Installs the tool and filter on first start and sets their valves.
  166. ### How auto-init works
  167. On first `docker compose up`, the init script automatically:
  168. 1. Creates an admin user (`admin@open-computer-use.dev` / `admin`)
  169. 2. Installs the Computer Use tool via `POST /api/v1/tools/create`
  170. 3. Installs the Computer Use filter via `POST /api/v1/functions/create`
  171. 4. Configures tool and filter valves (`ORCHESTRATOR_URL=http://computer-use-server:8081` — internal URL for server↔server, seeded into both Valves)
  172. 5. Marks the tool **public-read** (access grants for both `group:*` and `user:*` wildcards) — so non-admin users see the tool in their workspace
  173. 6. Marks the filter both **active and global** (two separate toggles: `/toggle` and `/toggle/global`) — active-but-not-global is silently inert and a common manual-setup mistake
  174. 7. Merges `{function_calling: "native", stream_response: true}` into `DEFAULT_MODEL_PARAMS` via `POST /api/v1/configs/models` — every model gets the right defaults without per-model Advanced Params clicks
  175. A marker file (`.computer-use-initialized`) prevents re-running on subsequent starts.
  176. > **Note:** Open WebUI doesn't support pre-installed tools from the filesystem — they must be loaded via the REST API. The init script automates this so you don't have to do it manually.
  177. ### Manual setup (if not using docker-compose)
  178. If you run Open WebUI separately, you need to manually:
  179. 1. Go to **Workspace > Tools** → Create new tool → paste contents of `openwebui/tools/computer_use_tools.py`
  180. 2. Set **Tool ID** to `ai_computer_use` (required for filter to work)
  181. 3. Configure **Valves**: `ORCHESTRATOR_URL` = internal URL of your Computer Use Server (`http://computer-use-server:8081` for Docker compose)
  182. 4. Open the tool's **⋯ → Share** menu and set access to **Public** (grants read to both `group:*` and `user:*` wildcards) — otherwise only your admin account sees the tool and non-admin users get an empty tool list with no error
  183. 5. Go to **Workspace > Functions** → Create new function → paste `openwebui/functions/computer_link_filter.py`
  184. 6. Enable the filter: toggle **Active** *and* toggle **Global** in the Functions list — these are two separate switches, and active-but-not-global means the filter loads but is never applied to chats
  185. 7. In your model settings, set **Function Calling** = `Native` and **Stream Chat Response** = `On`. Or set them globally once in **Admin → Settings → Models → Advanced Params** (`function_calling: native`, `stream_response: true`) — that becomes `DEFAULT_MODEL_PARAMS` for every model.
  186. The docker-compose stack handles all of this automatically.
  187. ### Required setup when embedding Open WebUI into your own stack
  188. If you run Open WebUI outside the stock `docker-compose.webui.yml` — your own compose, Kubernetes, Portainer, or a downstream repo — there are **four traps** that will silently break Computer Use. All four hit us in production. Check in this order.
  189. #### Step 1 — A stock upstream image is all this repo needs
  190. Install the tool and the filter and Computer Use works against
  191. `ghcr.io/open-webui/open-webui` as published. Nothing here has to be rebuilt.
  192. This used to be the opposite: the repository carried eight patch scripts and a
  193. Dockerfile that applied them to an already-built image, and pulling upstream silently
  194. skipped all of them. Those patches are gone. Three of the problems they addressed have
  195. since been fixed upstream; the rest live as source commits in a fork, which is a
  196. separate concern from running this integration.
  197. Preview URL detection needs no build-time host configuration either — the iframe origin
  198. is read from the URL the model wrote, which comes from the server's `PUBLIC_BASE_URL`.
  199. #### Step 3 — Two URL settings, two roles (public vs internal)
  200. **v4.0.0:** the old "three `FILE_SERVER_URL` places that must match" footgun is gone. There are now only **two** places and **two** distinct roles — public (browser-reachable) vs internal (Docker-local). The `COMPUTER_USE_SERVER_URL` build-arg was removed in v0.9.2.0 — `fix_preview_url_detection` is now host-agnostic (see Step 2).
  201. | Where | Role | Who reads it | Prod (with domain) | Local dev (Docker Desktop) |
  202. |-------|------|-------------|--------------------|----------------------------|
  203. | `PUBLIC_BASE_URL` env on the **`computer-use-server`** container (`docker-compose.yml` / `.env`) | **PUBLIC** — baked into `/system-prompt` links + returned to filter via `X-Public-Base-URL` response header | Server (single source of truth for public URL) | `https://cu.your-domain.com` | `http://localhost:8081` |
  204. | Filter + Tool Valves `ORCHESTRATOR_URL` (seeded by `init.sh` from `ORCHESTRATOR_URL` env on the open-webui container) | **INTERNAL** — server↔server fetch of `/system-prompt`; MCP `tools/call` forwarding | Filter and tool (Docker network) | `http://computer-use-server:8081` | `http://computer-use-server:8081` |
  205. ⚠️ **Do NOT point `ORCHESTRATOR_URL` at your public domain.** It technically works, but every MCP request then goes browser→CDN→Traefik→container. Any hiccup in that chain kills the stream mid-tool-call and the user sees `MCP call failed: Session terminated`. Stay inside the Docker network.
  206. The filter no longer has a public-URL Valve at all — it reads the public URL from the server's `X-Public-Base-URL` response header and caches it alongside the prompt. One public knob, one internal knob.
  207. See also [docs/openwebui-filter.md](docs/openwebui-filter.md#two-url-roles--public-server-env-and-internal-filtertool-valve).
  208. #### Step 4 — Four env vars on the `open-webui` container
  209. Copy-paste into your downstream compose `environment:` block:
  210. ```yaml
  211. services:
  212. open-webui:
  213. environment:
  214. # --- Computer Use required env vars (read by build-time patches) ---
  215. - CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS=200
  216. - TOOL_RESULT_MAX_CHARS=50000
  217. - TOOL_RESULT_PREVIEW_CHARS=2000
  218. # Internal URL of the Computer Use server — seeded by init.sh into both
  219. # Tool and Filter Valves, and read by the fix_large_tool_results patch.
  220. # Same Docker network: use the service DNS name.
  221. - ORCHESTRATOR_URL=http://computer-use-server:8081
  222. ```
  223. | Variable | Default if unset | Effect when correctly set |
  224. |----------|------------------|---------------------------|
  225. | `CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS` | `256` (upstream) | Tool-call cap per turn; stock repo sets `200`, `-1` disables the cap. Open WebUI reads the pre-0.10 name `CHAT_RESPONSE_MAX_TOOL_CALL_RETRIES` as a fallback. |
  226. | `TOOL_RESULT_MAX_CHARS` | `50000` (patch built-in) | Truncation threshold above which a tool result is truncated or uploaded. `0` disables. |
  227. | `TOOL_RESULT_PREVIEW_CHARS` | `2000` (patch built-in) | Preview size the model sees after truncation or upload. |
  228. | `ORCHESTRATOR_URL` | empty | Seeded into both Tool and Filter Valves by `init.sh`, and read by `fix_large_tool_results` patch as the upload target. If empty, oversized results are **silently truncated** — the model loses the data. |
  229. > Note: the last three are **no-ops if the image is upstream ghcr.io** — they need `fix_large_tool_results` from Step 1.
  230. #### Step 5 — Filter must be global, tool must be public-read
  231. Open WebUI has **two separate switches** for each function (`is_active` and `is_global`) and **two required grants** for each tool (`group:*` + `user:*`). The stock `init.sh` does this for you; manual / custom deployments commonly miss one side and then spend hours wondering why "everything is installed but nothing works."
  232. | Resource | What to flip | UI path | Endpoint | Why |
  233. |----------|--------------|---------|----------|-----|
  234. | Filter `computer_use_filter` | `is_active = true` **AND** `is_global = true` | Admin → Functions → `computer_use_filter` → toggle **Active** + toggle **Global** | `POST /api/v1/functions/id/computer_use_filter/toggle` + `.../toggle/global` | `is_active` only loads the function; `is_global` actually applies it to every chat. Active-but-not-global is silently inert with no log line. |
  235. | Tool `ai_computer_use` | access_grants for `group:*` **AND** `user:*`, `permission: read` | Workspace → Tools → `ai_computer_use` → **⋯ → Share → Public** | `POST /api/v1/tools/id/ai_computer_use/access/update` with `{"access_grants":[{"principal_type":"group","principal_id":"*","permission":"read"},{"principal_type":"user","principal_id":"*","permission":"read"}]}` | Without grants, only the admin account that created the tool sees it. Non-admin users get an empty tool list and no error. The UI "Public" toggle writes both wildcards; writing only one leaves the tool visible to some users and invisible to others depending on Open WebUI version. |
  236. Verify against the database (Postgres used by the stock stack; see `docker-compose.webui.yml:53`):
  237. ```bash
  238. # Filter flags — expect (t, t):
  239. docker exec <postgres-container> psql -U openwebui -d openwebui -c \
  240. "SELECT is_active, is_global FROM function WHERE id='computer_use_filter';"
  241. # Tool grants — expect TWO rows (group|* and user|*, both 'read'):
  242. docker exec <postgres-container> psql -U openwebui -d openwebui -c \
  243. "SELECT principal_type, principal_id, permission FROM access_grant WHERE resource_id='ai_computer_use';"
  244. ```
  245. For SQLite-backed Open WebUI deployments, swap `psql` for `sqlite3 /app/backend/data/webui.db` with the same SQL.
  246. #### Step 6 — Verify everything at once
  247. ```bash
  248. # 1. Env vars reached the container:
  249. docker exec open-webui env | grep -E 'CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS|TOOL_RESULT_|ORCHESTRATOR_URL'
  250. # 4. Tool+Filter Valve (Session-terminated trap) — Admin UI is simplest:
  251. # Workspace → Tools → ai_computer_use → Valves → ORCHESTRATOR_URL
  252. # Admin → Functions → computer_link_filter → Valves → ORCHESTRATOR_URL
  253. # → both must be http://computer-use-server:8081 (internal URL, Docker service DNS),
  254. # NOT your public domain.
  255. # 5. Server env (baked into system prompt AND returned to filter via header):
  256. docker exec computer-use-server env | grep ^PUBLIC_BASE_URL=
  257. # → must be a URL your browser can reach (e.g. http://localhost:8081 for local dev).
  258. # 7. Filter is ACTIVE *and* GLOBAL (see Step 5):
  259. docker exec <postgres-container> psql -U openwebui -d openwebui -c \
  260. "SELECT is_active, is_global FROM function WHERE id='computer_use_filter';"
  261. # → expect (t, t). Two 't's, not one.
  262. # 8. Tool is public-read with both wildcards (see Step 5):
  263. docker exec <postgres-container> psql -U openwebui -d openwebui -c \
  264. "SELECT principal_type, principal_id, permission FROM access_grant WHERE resource_id='ai_computer_use';"
  265. # → expect TWO rows: (group, *, read) and (user, *, read).
  266. ```
  267. > After rebuilding the image, do a **hard reload** in the browser (Cmd+Shift+R / Ctrl+Shift+R). Otherwise it keeps the old cached JS chunks and you'll think the fix didn't work.
  268. #### Symptom → which step is wrong
  269. | Symptom | Step |
  270. |---------|------|
  271. | HTML artifact renders as raw `<iframe ...>` text in chat | 1 (upstream image, `fix_artifacts_auto_show` missing) |
  272. | Preview iframe auto-insertion doesn't happen for file links | 1 (`fix_preview_url_detection` missing) or `PUBLIC_BASE_URL` unreachable from browser |
  273. | `MCP call failed: Session terminated` on every tool call | 3 (tool Valve points at public domain) |
  274. | Tool loop cuts off early; banner *"Model temporarily unavailable"* | 4 (`CHAT_RESPONSE_MAX_TOOL_CALL_ITERATIONS` not set) |
  275. | Large tool outputs silently `...(truncated)`; model makes wrong decisions | 4 (`ORCHESTRATOR_URL` not set or unreachable) OR 1 (`fix_large_tool_results` missing) |
  276. | Tool-loop errors show raw Python exception | 1 (`fix_tool_loop_errors` missing) |
  277. | Tool list is empty for non-admin users (admin sees it) | 5 (tool missing `access_grant`s — not public-read) |
  278. | Filter looks "Active" in UI but preview iframe / archive button never appear | 5 (filter `is_global=false` — only `is_active=true` was flipped) |
  279. | File links in chat go to 404 / white screen | `PUBLIC_BASE_URL` on the server doesn't match what the browser can reach — see [docs/openwebui-filter.md](docs/openwebui-filter.md#two-url-roles--public-server-env-and-internal-filtertool-valve) |
  280. | New behavior didn't appear even after rebuild | Browser cached old JS — hard reload |
  281. ## Security Notes
  282. > **Production tested** with 1000+ users on Open WebUI in a self-hosted environment. It is no longer maintained; the unfixed items are listed below.
  283. ### Current model
  284. - **Docker socket**: The server needs Docker socket access to manage sandbox containers. This grants significant host access — run in a trusted environment only.
  285. - **MCP_API_KEY**: Set a strong random key in production. Without it, anyone with network access to port 8081 can execute arbitrary commands in containers.
  286. - **Sandbox isolation**: Each chat session runs in a separate container with resource limits (2GB RAM, 1 CPU). On Docker Compose, containers use the standard runtime (runc) and share the host kernel. The [Kubernetes Helm chart](docs/kubernetes.md) defaults to rootless Podman — user namespaces plus AppArmor, and no privileged container — and can opt into [Kata Containers](docs/kata-runtime.md) for a hypervisor-grade boundary. On Compose, gVisor was never wired in. Containers have network access by default.
  287. - **POSTGRES_PASSWORD**: Change the default password in `.env` for production.
  288. ### Known limitations
  289. - **Unauthenticated file/preview endpoints**: `/files/{chat_id}/`, `/api/outputs/{chat_id}`, `/browser/{chat_id}/`, `/terminal/{chat_id}/` — accessible to anyone who knows the chat ID. Chat IDs are UUIDs (hard to guess but not a real security boundary).
  290. - **No per-user auth on server**: The MCP server trusts whoever sends a valid `MCP_API_KEY`. User identity (`X-User-Email`) is passed by the client but not verified server-side.
  291. - **Credentials in HTTP headers**: API keys (GitLab, Anthropic, MCP tokens) are passed as HTTP headers from client to server. Safe within Docker network, but use HTTPS if exposing externally.
  292. - **Default admin credentials**: `admin@open-computer-use.dev` / `admin` — change immediately in multi-user setups.
  293. ### Unfixed security items
  294. These will not be addressed in this repository:
  295. - [ ] **Per-session signed tokens** for file/preview/terminal endpoints (replace chat ID as auth)
  296. - [ ] **Server-side user verification** via Open WebUI JWT validation
  297. - [ ] **HTTPS support** with automatic TLS certificates
  298. - [ ] **Audit logging** for all tool calls and file access
  299. - [ ] **Network policies** for sandbox containers (restrict egress by default)
  300. - [ ] **Secret management** — move credentials from headers to encrypted server-side storage
  301. - [ ] **gVisor (runsc) runtime** — optional container sandboxing for stronger isolation (like Claude.ai)
  302. ## Development
  303. ```bash
  304. # Build workspace image locally
  305. docker build --platform linux/amd64 -t open-computer-use:latest .
  306. # Run tests
  307. ./tests/test-docker-image.sh open-computer-use:latest
  308. ./tests/test-no-corporate.sh
  309. ./tests/test-project-structure.sh
  310. # Build and run full stack
  311. docker compose up --build
  312. ```
  313. ## Contributing
  314. The repository is archived and accepts no contributions. See [CONTRIBUTING.md](CONTRIBUTING.md).
  315. ## Community
  316. - **Successor**: [widemoat.ai](https://widemoat.ai), demo at [ai.lab.widemoat.ai](https://ai.lab.widemoat.ai)
  317. - **Contact**: developer@widemoat.ai
  318. ## License
  319. This project uses a multi-license model:
  320. - **Core** (`computer-use-server/`, `openwebui/`, `settings-wrapper/`, Docker configs): [Functional Source License, Version 1.1, Apache 2.0 Future License](LICENSE) (FSL-1.1-Apache-2.0). Free to use, modify, fork, redistribute, and self-host internally. Each release automatically converts to [Apache 2.0](LICENSE-APACHE) two years after publication. Offering a hosted or embedded service that competes with our paid version(s) requires a [commercial agreement](mailto:developer@widemoat.ai).
  321. - **Our skills** (`skills/public/describe-image`, `skills/public/sub-agent`): [MIT](LICENSE-MIT)
  322. - **Third-party skills**: see individual LICENSE.txt files or original sources.
  323. **Attribution required**: include "Open Computer Use" and a link to this repository.
  324. See [NOTICE](NOTICE) for details. For third-party dependency licenses (PyMuPDF AGPL, Anthropic Skill License, Apache 2.0 bundles, etc.), see [THIRD-PARTY-LICENSES.md](THIRD-PARTY-LICENSES.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.