What is Open Terminal?
Open Terminal is a self-hosted shell that AI agents reach over a REST API. It sits in the Code Sandboxes & Isolation category of the Agents & Automation tools and is open-source, written in Python and licensed MIT. To get started: run it with Docker.
Overview
Open Terminal is a lightweight, self-hosted terminal that gives AI agents and automation tools a dedicated environment to run commands, manage files, search and execute code — all through a simple REST API. The premise is that assistants are good at writing code but need somewhere to run it, and a remote shell behind an HTTP endpoint is a smaller, more portable answer than a full agent framework.
It runs two ways. Under Docker it is a sandbox: an isolated container that ships a full toolkit — Python, Node.js, git, build tools, data-science libraries, ffmpeg and more — so an agent gets a playground that never touches the host. On bare metal it installs with pip and runs anywhere Python runs, with commands executing directly against your real files, tools and environment; the README flags that as the explicitly unsandboxed choice, appropriate for local development and personal automation.
Four image variants trade size for capability. `latest` (~4 GB) is aimed at agent sandboxes and bundles Node.js, gcc, ffmpeg, LibreOffice, LaTeX and the Docker CLI, supports runtime package installs via `sudo`, and enables multi-user mode; `slim` (~430 MB, Debian) and `alpine` (~230 MB, musl) are hardened and minimal with git, curl and jq; `openshift` targets restricted non-root pod policies. All but the OpenShift image support an iptables egress firewall. Open Terminal comes from the Open WebUI project and is MIT-licensed.
What it does
- REST API for running commands, managing files, searching and executing code — no SDK required, just HTTP
- Docker mode gives agents an isolated container preloaded with Python, Node.js, git, build tools, data-science libraries and ffmpeg
- Bare-metal mode installs with pip or runs via uvx, executing against your real environment for local automation
- Four image variants — latest, slim, alpine and openshift — spanning ~4 GB down to ~230 MB
- Runtime package installation from environment variables (OPEN_TERMINAL_PACKAGES, _PIP_PACKAGES, _NPM_PACKAGES) with no fork needed
- API-key authentication, an iptables egress firewall, multi-user mode, and optional Docker-socket access so agents can build and run containers
Getting started
Docker is the recommended path because it sandboxes execution. One command brings the API up on port 8000.
Run it with Docker
This starts the full `latest` image with a persistent volume for the working directory. If you omit the API key, one is generated — read it out of the container logs.
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-terminalOr pick a smaller image
slim and alpine share a feature set and stay minimal (git, curl, jq). openshift targets restricted non-root pod policies.
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:alpineOr run it on bare metal
Open Terminal is a standard Python package. Note the README's caution: on bare metal, commands run directly on your machine with your user's permissions.
# One-liner with uvx (no install needed)
uvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key
# Or install globally with pip
pip install open-terminal
open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-keyAdd tools without forking
The latest image installs extra apt, pip and npm packages at container start from environment variables. Packages are reinstalled on every start, so long lists slow startup — build a custom image for heavy customization. slim and alpine do not support these variables.
docker run -d --name open-terminal -p 8000:8000 \
-e OPEN_TERMINAL_PACKAGES="cowsay figlet" \
-e OPEN_TERMINAL_PIP_PACKAGES="httpx polars" \
-e OPEN_TERMINAL_NPM_PACKAGES="typescript tsx" \
ghcr.io/open-webui/open-terminalLet agents use Docker
The image includes the Docker CLI, Compose and Buildx. Mount the host socket to let an agent build images and run containers.
docker run -d --name open-terminal -p 8000:8000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v open-terminal:/home/user \
ghcr.io/open-webui/open-terminalCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give a coding agent somewhere safe to actually run the code it writes, isolated from your host machine
- Back an automation pipeline with a long-lived remote shell that any language can drive over HTTP
- Run a minimal alpine or slim container as a command-execution service in CI or at the edge
- Expose your real local environment to a personal assistant when the point is to act on your actual files and tools
How Open Terminal compares
Open Terminal alongside other open-source code sandboxes & isolation tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Daytona | ★ 71.2k | Daytona is an open-source runtime that spins up isolated sandboxes in under 90ms so agents can safely run and persist AI-generated code. |
| NVIDIA NemoClaw | ★ 23.1k | NVIDIA's reference stack for running OpenClaw, Hermes and LangChain Deep Agents Code inside OpenShell sandboxes, adding managed inference, network policy, snapshots and CLI lifecycle control. |
| OpenShell | ★ 22.1k | NVIDIA's open-source runtime that runs autonomous AI agents in sandboxes, enforcing a declared policy on every file access, syscall and network connection and formally verifying policy changes. |
| OpenSandbox | ★ 18k | OpenSandbox gives AI agents a safe place to run code and commands, with one unified API across Docker and Kubernetes runtimes and SDKs in five languages. |
| E2B | ★ 15.1k | E2B is open-source infrastructure that runs AI-generated code inside secure, isolated cloud sandboxes, controlled from JavaScript or Python SDKs. |
| AX (Agent Executor) | ★ 15k | Google's declarative orchestrator for agent workloads: a Task runs untrusted agent code in a sandbox, while Workspace, Gateway and Model resources wire up its repos, network allowlist and LLM credentials. |
| Astrid | ★ 10.3k | A portable Rust runtime that executes software as sandboxed WebAssembly capsules, where every file, network, process and tool call is gated by a signed, revocable, per-principal capability instead of ambient authority. |
| Open Terminal | ★ 3.7k | A self-hosted shell that AI agents reach over a REST API |
