Two compose files
| File | Runs | Purpose |
|---|---|---|
docker-compose.yml | computer-use-server, Postgres | The MCP orchestrator; talks to the Docker socket to spawn per-chat sandbox containers. |
docker-compose.webui.yml | open-webui (patched), watchtower | Open WebUI, built from openwebui/Dockerfile with the Computer Use patches applied. |
computer-use-net) that the server creates on first up, so the Open WebUI container can reach computer-use-server:8081 without DNS gymnastics.
Sandbox image layout
Theopen-computer-use:latest image uses a multi-stage build for layer caching:
- base — environment variables
- system-packages — 108 APT packages (LibreOffice, Java 21, ffmpeg, ImageMagick, Tesseract, fonts, …)
- python-deps — 107 Python packages (python-docx, python-pptx, openpyxl, pypdf, Pillow, OpenCV, pandas, playwright, …)
- node-deps — 21 Node packages (TypeScript, pdf-lib, mermaid-cli, marked, …)
- playwright-setup — Chromium
- final — directory structure + permissions
Mounts inside each sandbox
| Host path | Container path | Mode | Purpose |
|---|---|---|---|
./data/uploads/{chat_id} | /mnt/user-data/uploads | read-only | User uploads for this chat |
./data/outputs/{chat_id} | /mnt/user-data/outputs | read-write | Files the model writes; served via /files/{chat_id}/... |
./skills | /mnt/skills | read-only | Built-in skills |
| chat-scoped Docker volume | /home/assistant | read-write | Per-chat workspace; survives container restarts until GC |
/mnt/user-data/outputs/... get public URLs — no extra upload step.
Lifecycle
- Request arrives with
X-Chat-Id: ABC. - Server checks for container
chat-ABC:- If present, reuses it.
- If not, creates it from
DOCKER_IMAGE, writes/home/assistant/README.mdwith the system prompt, mounts skills and data volumes.
- Tool call runs inside the container.
- After
CONTAINER_MAX_AGE_HOURSof idleness, the cleanup cron GCs the container; the workspace volume survives forDATA_MAX_AGE_DAYS.
Docker socket
computer-use-server needs /var/run/docker.sock mounted so it can create and manage sandboxes. This gives the container effective root on the host — treat the Docker network as privileged and put a reverse proxy / auth in front of 8081.
Networking
The sandbox is not on the public network. Everything external flows throughcomputer-use-server.
Resource limits
Per-sandbox defaults (change in.env):
| Limit | Default | Env var |
|---|---|---|
| Memory | 2 GB | CONTAINER_MEM_LIMIT |
| CPU | 1.0 | CONTAINER_CPU_LIMIT |
Security flags
--security-opt=no-new-privileges:true- Non-root user with passwordless sudo inside the sandbox
- Read-only skill and upload mounts
See also
- Configuration — every env var
- Known bugs — multi-user file auth caveats
