Self-host Open Terminal
v0.17.4Remote shell API that gives AI agents a place to run code
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- Stars
- 3 514
- Port
- 8000 (HTTP API server)
ghcr.io/open-webui/open-terminalWhat is Open Terminal?
Open Terminal is a lightweight, open-source terminal server that exposes a real shell over a REST API, aimed at AI agents and automation tools that need somewhere to actually run code. It can execute commands, manage and search files, install packages, and start servers. The default Docker image is a sandboxed environment preloaded with Python, Node.js, git, build tools, ffmpeg and data-science libraries, while a plain Python package lets commands run directly on the host where that is intentional. Operators secure it with an API key (auto-generated if unset), extend the image at startup through package environment variables, optionally mount the Docker socket, use an egress firewall, or enable a built-in multi-user mode that gives each user their own Linux account inside one shared container — which the project itself warns is not a real security boundary. Self-hosting is a single docker run listening on port 8000, with pip or uvx as alternatives, and interactive API docs are served at /docs. It is MIT-licensed, maintained by the Open WebUI organisation, and connects to Open WebUI's integration settings; the separate Terminals orchestrator that provisions one container per user is licensed commercially by that organisation.
Open Terminal alternatives
WebterminalSelf-hosted open-source bastion host unifying SSH, RDP, VNC, database and Kubernetes access via browser or native clients with fine-grained auth and full audit.CompareWebterminal with Open Terminal
OpenshipSelf-hosted open-source PaaS: hand it a repo, a folder or an artifact and it detects your stack, builds it, then serves it on your domain with free certificates.CompareOpenship with Open Terminal
Open ResponsesA self-hosted, open-source server implementing the OpenAI Responses API specification with support for multiple LLM providers and the Agents SDK.CompareOpen Responses with Open Terminal
AizenAizen is a self-hosted AI coding agent as a single 34 MB Rust binary. Connects to any OpenAI-compatible endpoint, reads/edits code, runs tests, verifies work.CompareAizen with Open Terminal
poolPool is a self-hosted AI coding agent for terminal and ACP-compatible editors, supporting Poolside Platform, OpenRouter, Ollama, and OpenAI-compatible APIs.Comparepool with Open Terminal
open-assistant-apiOpen-source, self-hosted AI assistant API compatible with OpenAI Assistants API. Supports RAG, web search, tools, multimodal, streaming — deployable via Docker Compose.Compareopen-assistant-api with Open Terminal
electerm-webelecterm-web is a self-hosted, open-source web terminal and SSH/SFTP client with AI assistance, multi-language support, cloud sync, and responsive mobile design.Compareelecterm-web with Open Terminal
openlegionSelf-hosted platform for isolated AI agent teams with credential vaulting, spend limits, and a web dashboard — free for internal use under a source-available license.Compareopenlegion with Open Terminal
Should you self-host Open Terminal?
Open Terminal scores 65/100 on selfhost.directory (how scoring works) and ranks #45 of 209 in AI Agents. It has 3 514 GitHub stars, +70 in the last 30 days.
It shipped 32 stable releases in the past year. The latest, v0.17.4, came out on 7 November 2026.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is Orca (91/100, 118 573 stars). It scores higher overall, so compare the two before you pick. See Open Terminal vs Orca side by side.
Features
- API Key Authentication
- Bare-metal execution
- Configuration via TOML, env vars, and CLI flags
- Docker Socket AccessGives effectively root-level control of the host Docker daemon.
- Egress firewallNot available in the openshift variant.
- File Management
- Interactive API Documentation
- Multi-User ModeProject states it is not a security boundary and not for production multi-user deployments.
- Office document previewsOnly the full 'latest' image bundles LibreOffice.
- Remote shell over REST API
- Runtime package installationNot supported in slim/alpine/openshift images.
- Sandboxed Docker execution
Open Terminal README
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, or use it with your own tools.
Documentation · Changelog · Report an issue
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:latest
The API is available at http://localhost:8000, with interactive docs at /docs. The volume keeps your files between container updates. Replace your-secret-key with your own key.
| Image tag | Includes |
|---|---|
latest |
Full toolkit: Python, Node.js, build tools, browser, desktop, and document tools |
agents |
Everything in latest, plus the latest Codex and Claude Code CLIs |
cuda |
Full environment with CUDA toolkit and GPU-enabled PyTorch |
slim |
Minimal Debian environment with git, curl, and jq |
alpine |
Minimal Alpine environment with git, curl, and jq |
openshift |
Minimal image for OpenShift restricted non-root policies |
Use :agents to run codex or claude from a terminal, signing in with your own account. See the deployment guide for agent setup, image capabilities, custom packages, and updates.
Requires Python 3.11+.
pip install open-terminal open-terminal run --host 0.0.0.0 --port 8000
Or run without installing: uvx open-terminal run --host 0.0.0.0 --port 8000.
If no API key is configured, one is generated and printed at startup. For Docker, find it with docker logs open-terminal.
Caution
The API key grants command and file access. On bare metal, commands run with your user's permissions. Give access only to people and agents you trust.
Desktop clients can use the existing HTTP/WebSocket API without opening a TCP listener:
# macOS/Linux: use a socket inside a directory owned by the current user (mode 0700).
open-terminal run --isolated --ipc /path/to/private-directory/api.sockOn Windows, use a local named pipe, for example
open-terminal run --isolated --ipc \\.\pipe\open-terminal-private.
API-key authentication still applies. --port 8000 adds a TCP listener;
it binds to 127.0.0.1 unless --host 0.0.0.0 is explicitly supplied.
Use port 0 to select an available port. The bind address and port are logged at startup.
With --ipc, --host requires an explicit --port; --cftunnel is not supported.
- Open Settings → Admin → Integrations → Open Terminal.
- Add a URL reachable from the Open WebUI server and your API key.
- Enable the connection and select the terminal in chat.
Use the dedicated Open Terminal section to get the file browser and terminal panel. Compare connection modes, or see the connection guide for Docker networking and personal connections.
Install and sign in to the agent CLIs as the user running Open Terminal. In a compatible Open WebUI checkout, selecting this terminal adds its discovered models to the existing model selector as <agent>/<model>. Agent conversations run in the terminal's current directory, with streaming output, native tool/extension approvals, attachments, Stop, and conversation continuation.
| Agent | Native interface | Executable override |
|---|---|---|
| Codex | codex app-server --listen stdio:// |
OPEN_TERMINAL_CODEX_COMMAND |
| Claude Code | claude --input-format stream-json --output-format stream-json |
OPEN_TERMINAL_CLAUDE_COMMAND |
| Cursor | agent acp |
OPEN_TERMINAL_CURSOR_COMMAND |
| Grok | grok --no-auto-update agent stdio |
OPEN_TERMINAL_GROK_COMMAND |
| OpenCode | opencode acp |
OPEN_TERMINAL_OPENCODE_COMMAND |
| Cline | cline --acp |
OPEN_TERMINAL_CLINE_COMMAND |
| Gemini CLI | gemini --acp |
OPEN_TERMINAL_GEMINI_COMMAND |
| Pi | pi --mode rpc |
OPEN_TERMINAL_PI_COMMAND |
These adapters target current CLI protocols. ACP model discovery prefers session config options and also reads the native models field still advertised by current agents such as Gemini. Pi requires the current RPC agent_settled completion event and --session-id support. There are no hardcoded model lists. Log in through the CLI before using WebUI; the integration does not run interactive login flows. ACP agents execute their own filesystem and terminal tools in this environment. Pi follows its native tool policy; WebUI forwards extension confirmation dialogs but does not add a separate per-tool permission layer.
ACP history replay is suppressed when resuming an already saved WebUI conversation. If an agent does not advertise native resume, the next turn receives the saved conversation text instead. Agent-specific editor extensions beyond ACP's standard permissions and form elicitation are not implemented.
The same flow works through Tether's saved connection and outbound relay; the hosted server does not need to reach the local machine's IP. All three applications need the agent-capable changes. Provider CLIs and their login credentials stay in the terminal environment; no provider SDK is required in WebUI. Executable overrides above accept a path to the installed CLI.
The authenticated /agents catalog advertises installed providers and models. POST /agents/{provider}/sessions starts an owned process; /agents/sessions/{id} inspects or deletes it. Its /connect WebSocket carries native JSONL inside sequenced input/output frames with acknowledgements and replay. Sessions require X-User-Id and X-Session-Id ownership headers (single-user clients may omit X-User-Id). WebSocket clients send an initial { "type": "auth", "token": "<API key>", "cursor": 0 } frame. Agent turns use a single backend task and resume the provider's saved conversation on the next turn; branching/regeneration requires a new chat.
Configure Open Terminal with CLI flags, environment variables, or a TOML file. CLI flags take precedence.
| Guide | Covers |
|---|---|
| Configuration | Config files, browser sessions, storage, and file previews |
| Deployment | Docker variants, coding agents, custom packages, updates, and multi-user setup |
| Temporary public access | Cloudflare tunnels and troubleshooting |
| API reference | Interactive endpoints on your running instance |
Built-in multi-user mode separates workspaces inside one shared container; it does not isolate users and is intended for small, trusted deployments.
For separate containers per user, use Terminals. Production use requires an Open WebUI Enterprise License. See the security policy for the trust model.
Open an issue for bugs or setup problems. Report vulnerabilities privately through GitHub Security Advisories.
More in AI Agents
OpenVikingOpenViking gives AI agents one self-hosted, browsable viking:// filesystem for memory, knowledge RAG and skills; open-source (AGPL-3.0), deployed via Docker or pip.
OpenWorkSelf-hosted and open-source, this Electron workspace puts AI agents to work on local files; over 50 providers, Ollama support, and a self-hosted Den control plane.
OperantOperant is a self-hosted AI agent runtime for macOS/Linux that lets multiple LLMs collaborate on coding with hierarchical approval, memory, and a visual workflow editor.
OpikOpik is an open-source, self-hostable LLM observability platform with tracing, evaluation, and production monitoring.
OrcaSelf-hosted, open-source agent IDE that runs Claude Code, Codex, or any CLI coding agent in parallel git worktrees on desktop or a headless orca serve server.
ORG-2Open-source, self-hosted desktop app that records coding-agent sessions as replayable trajectories, with a Rust harness, launchers for 20+ CLIs, and team review.
os1OS1 is a self-hosted, open-source AI platform with autonomous agents, deep research, real-time collaborative chats, and a PWA workspace. Full data control, extensible.
os-modaA self-hosted NixOS operating system where an AI agent manages your server through structured tools, with tamper-proof audit logs and instant rollback.
OtoDockOtoDock is a self-hosted platform for AI agents with departments, RBAC, phone, apps, and sandboxed execution — free for 5 users.
OuroborosA locally-run AI agent that preserves its identity across sessions, spawns specialist sub-agents, and rewrites its own codebase.
OverClickOverClick is a self-hosted, open-source Kanban board for hybrid human-AI teams where AI agents claim and execute tasks via MCP, reporting token usage and time per card.
pacaSelf-hosted and open-source Scrum tooling: AI agents share the board and the sprint with people, plus IAM-style role policies and WASM plugins.
0 comments