Two compose files
Both attach to the same external Docker network (
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
Files the model creates under
/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):
These are ceilings, not allocations — idle containers use very little. Chromium + LibreOffice can push against the ceiling.
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
