This commit is contained in:
Timothy Jaeryang Baek committed 2026-11-06 09:10:06 +09:00
1 parent c9e71e8d24
commit a4ecad02de
3 files changed
+108 -12

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
# Open Terminal
**A computer for your AI agents.** Run commands, manage files, execute code, and work with browsers and desktops through a self-hosted API. Connect it to [Open WebUI](https://github.com/open-webui/open-webui), or use it with your own tools.
**A computer for your AI agents.** Run commands, search and manage files, execute code, and work with browsers and desktops through a self-hosted REST API. Connect it to [Open WebUI](https://github.com/open-webui/open-webui), or use it with your own tools.
[Documentation](https://docs.openwebui.com/features/open-terminal/) · [Changelog](CHANGELOG.md) · [Report an issue](https://github.com/open-webui/open-terminal/issues)
@@ -56,7 +56,7 @@ If no API key is configured, one is generated and printed at startup. For Docker
2. Add a URL reachable from the Open WebUI server and your API key.
3. Enable the connection and select the terminal in chat.
Use the dedicated **Open Terminal** section to get the file browser and terminal panel. See the [connection guide](https://docs.openwebui.com/features/open-terminal/setup/connecting/) for Docker networking and personal connections.
Use the dedicated **Open Terminal** section to get the file browser and terminal panel. Compare [connection modes](docs/deployment.md#connecting-to-open-webui), or see the [connection guide](https://docs.openwebui.com/features/open-terminal/setup/connecting/) for Docker networking and personal connections.
## Configuration
+11
View File
@@ -84,6 +84,17 @@ must permit Chromium's sandbox operations. Outside Docker, set the variable to
`yes` (case-insensitive) disable the sandbox. Restart or recreate Open Terminal
after changing this setting.
## Memory management
File and command-output responses stream from disk, uploads are copied in chunks,
and generated ZIP/PDF files are removed after sending or cancellation. Log rotation
retains the newest half without loading the entire log into memory. Search listings
and ranking use temporary disk storage while preserving full matches.
Process, terminal, notebook, and document-worker cleanup releases readers, file
handles, and child processes on completion, cancellation, or server shutdown.
Command-log retention and the notebook idle timeout still apply.
## File Browser Root
Open Terminal reports file-browser root metadata from `GET /files/cwd` so clients can hide parent navigation above a friendly starting point.
+95 -10
View File
@@ -2,6 +2,11 @@
[← README](../README.md)
Docker is the recommended setup for an isolated environment with tools preinstalled.
Bare metal runs directly on your machine, using your files, tools, environment, and
user permissions. Open Terminal is a standard Python package and runs wherever its
Python requirements are met.
## Image variants
| Tag | Base | Runtime package installs | Multi-user mode | Egress firewall |
@@ -12,28 +17,61 @@
| `alpine` | Alpine | No | No | Yes |
| `openshift` | Debian, restricted non-root policies | No | No | No |
The full images include Node.js, build tools, Chromium, a Linux desktop, LibreOffice,
LaTeX, Docker CLI, and data science libraries. The minimal images include git, curl,
and jq. Slim uses glibc; Alpine uses musl, which can affect binary compatibility.
The full images include Python, Node.js, git, gcc and other build tools, ffmpeg,
Chromium, a Linux desktop, LibreOffice, LaTeX, Docker CLI, and data science libraries.
They include `sudo` for runtime package installation. The minimal images include
git, curl, and jq. Slim and Alpine have the same feature set: Slim uses Debian's
glibc for broader binary compatibility; Alpine uses musl for a smaller footprint,
but some C-extension pip packages may need to compile from source.
Use `latest` for AI agent sandboxes, `agents` for coding agents, `slim` for minimal
or hardened production setups, `alpine` for edge/CI deployments, and `openshift`
for OpenShift restricted SCC. The previous README estimated sizes of ~4 GB for
`latest`, ~430 MB for `slim` and `openshift`, and ~230 MB for `alpine`; `agents`
adds the CLIs to the full image. These are historical estimates, not current
measurements; sizes vary by release and architecture.
```bash
docker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io/open-webui/open-terminal:slim
docker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io/open-webui/open-terminal:alpine
docker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io/open-webui/open-terminal:openshift
```
These are alternative commands; run one image per port. Slim, Alpine, and OpenShift
do not support the `OPEN_TERMINAL_PACKAGES`, `OPEN_TERMINAL_PIP_PACKAGES`, or
`OPEN_TERMINAL_NPM_PACKAGES` startup installers.
To add tools to a minimal image, extend [Dockerfile.slim](../Dockerfile.slim),
[Dockerfile.alpine](../Dockerfile.alpine), or [Dockerfile.openshift](../Dockerfile.openshift).
OpenShift also excludes Docker socket access. Use a full image for Office-to-PDF
conversion, or install LibreOffice in a custom image.
OpenShift also excludes Docker socket access, the iptables egress firewall, and
`OPEN_TERMINAL_MULTI_USER=true`. Build custom images ahead of time when extra tools
are needed. Full images include LibreOffice for Word, Excel, and PowerPoint to PDF
conversion; install it in a custom image if a minimal variant needs these tools.
## Coding agents
Use `ghcr.io/open-webui/open-terminal:agents` in the Docker quickstart, then open a shell:
The `agents` image supports AMD64 and ARM64, with the same runtime package installs
and multi-user mode as the full image. Start it and open a shell:
```bash
docker run -d --name open-terminal --restart unless-stopped -p 8000:8000 \
-v open-terminal:/home/user \
-e OPEN_TERMINAL_API_KEY=your-secret-key \
ghcr.io/open-webui/open-terminal:agents
docker exec -it open-terminal bash
```
Run `codex login --device-auth` and then `codex`, or run `claude` and follow its login
prompts. Each user signs in with their own account. See [Codex authentication](https://developers.openai.com/codex/auth)
and [Claude Code setup](https://code.claude.com/docs/en/setup#authenticate) for API keys and other login options.
Run `codex login --device-auth` and then `codex` from your project directory, or run
`claude` and follow its login prompts. Codex device login must be enabled in your
ChatGPT account or workspace. Each user signs in from their own terminal with their
own account. For API-key authentication, provide the provider key at runtime:
Codex supports `printenv OPENAI_API_KEY | codex login --with-api-key`, and Claude
Code accepts `ANTHROPIC_API_KEY`. See [Codex authentication](https://developers.openai.com/codex/auth)
and [Claude Code setup](https://code.claude.com/docs/en/setup#authenticate) for details.
Both CLIs are installed outside home directories. Persist `/home/user` for a single
Both CLIs are installed globally outside home directories, so home mounts do not
hide them. Persist `/home/user` for a single
user or `/home` in multi-user mode to retain configuration and file-based credentials.
Each published build installs the latest CLI releases. Claude Code background updates
are disabled; pull a newer image for updates.
@@ -47,6 +85,24 @@ docker build --target agents --no-cache-filter agents -t open-terminal:agents .
Available tags follow the existing conventions: `agents`, `latest-agents`,
`<version>-agents`, and `<major>.<minor>-agents`.
The container starts the Open Terminal server. Launch the agents from a terminal
or through the command API when needed.
## Bare metal
```bash
# Run without installing globally.
uvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key
# Or install with pip.
pip install open-terminal
open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key
```
Commands run with your user's permissions and access to your real files. Use Docker
for sandboxed execution. See [configuration](configuration.md) for environment and
TOML options that keep the API key out of command arguments.
## Custom packages
The easiest way to add extra packages is with environment variables — no fork needed:
@@ -100,6 +156,28 @@ Then re-run your original `docker run` command with the same volumes and setting
Use the same image tag you installed, such as `:agents` or `:slim`.
## Connecting to Open WebUI
Add the connection under **Open Terminal** in Integrations, not as a tool server.
This enables the terminal panel and file navigation sidebar for browsing directories,
uploading, downloading, and editing files alongside chat.
### Direct connection
Users can connect their own instance through **User Settings → Integrations → Open
Terminal**: add its URL and API key, then enable it. Requests go directly from the
browser, so this works for a terminal on the user's machine or a network only they
can reach. See the [connection guide](https://docs.openwebui.com/features/open-terminal/setup/connecting/)
for availability of personal integrations in your Open WebUI deployment.
### System-level connection
Admins configure connections through **Admin Settings → Integrations → Open
Terminal**: add the URL and API key, then enable the connection. Requests are proxied
through the Open WebUI backend, so the terminal only needs to be reachable from the
server. No additional services are required. Multiple terminals can be configured,
with access controlled per user or group.
## Built-in multi-user mode
> [!CAUTION]
@@ -119,3 +197,10 @@ docker run -d --name open-terminal -p 8000:8000 \
Each user automatically gets a dedicated Linux account with its own home directory, so files, commands, and terminals stay in their own workspace and users do not walk over each other's work. Standard Unix permissions keep the workspaces apart in day-to-day use. They do not protect users from each other, and they are not meant to.
In multi-user mode, requests that access a user's workspace must include `X-User-Id` alongside the API key. Missing user IDs return HTTP 400. `X-Session-Id` tracks the working directory separately for each user, so users can reuse a session ID without changing each other's working directory. Single-user mode does not require `X-User-Id`.
For isolation between users, [Terminals](https://github.com/open-webui/terminals)
provisions and manages a separate container per user, with its own files, processes,
resource limits, and network boundary. Production use requires an
[Open WebUI Enterprise License](https://docs.openwebui.com/enterprise/); see the
[Terminals documentation](https://docs.openwebui.com/features/open-terminal/terminals/)
for deployment and licensing details.