Skip to content
FossShelf
Home / Categories / For AI Engineers

Open Terminal

Remote shell API for AI agents; MIT licensed, deploys via Docker

Replaces E2b, Modal, Daytona

3.60K starsMITlast commit 16 Nov 2026
Screenshot of Open Terminal

Who it's for

AI engineers building agent execution backends

Open Terminal gives an AI agent a persistent shell environment accessible over HTTP. The agent can run generated code, read file output, install dependencies, and manage directories without a cloud execution service. The Docker sandbox keeps agent activity isolated from the host system, and the pre-installed toolset covers most Python, Node.js, and data science workflows out of the box.

If your agents only need to call external APIs and produce text output, a shell execution environment adds unnecessary infrastructure. Open Terminal's value is for agents that generate and run code or need to manage files.

Developers automating personal or team workflows

The pip-based bare metal install lets an AI assistant or automation script run commands against real project files, tools, and credentials on a developer's machine. The TOML config and file browser root setting let you expose a specific project directory as the visual root without navigating to it every time.

Skip the bare metal path if you need any isolation between the shell environment and your host. Bare metal commands run as your user with your full permissions. Use the Docker path instead if the automation accesses sensitive files or runs untrusted generated code.

Open WebUI users adding terminal access to AI chat

Open Terminal connects to Open WebUI as a first-class integration, adding a file navigation sidebar to the AI chat interface. Admins can share one terminal across an entire Open WebUI deployment with per-group access controls, or individual users can connect their own instance from user settings. Requests go through the Open WebUI backend, so the terminal only needs to be reachable from the server.

Full process isolation between users requires Open WebUI Terminals, an enterprise feature that provisions a separate container per user. The built-in multi-user mode shares one kernel and is not a security boundary between users.

The problem

AI assistants write code fluently, but writing code and running it are different problems. Without a dedicated execution environment, an AI agent has no place to test its output, manage files, or run shell commands against a real system. Cloud code execution services charge per second or per invocation. For teams building internal AI agents or automation pipelines that run commands frequently, those costs scale faster than the workloads they support. The data also leaves your infrastructure on every call, which matters when the agent has access to internal files or credentials.

How it works

Docker sandbox with pre-installed tooling

The default Docker image ships Python, Node.js, git, gcc, ffmpeg, LibreOffice, LaTeX, and data science libraries pre-installed at roughly 4 GB. Agents get a full development environment without touching the host system. Commands run inside the container; the host stays clean. The Docker CLI, Compose, and Buildx are also bundled so agents can build and run containers when the host socket is mounted.

REST API for shell commands and file management

Every operation goes through HTTP: run a command, read a file, upload an archive, browse a directory. The API is documented at /docs on every running instance. Any tool that can send an HTTP request can drive a terminal session, which makes Open Terminal compatible with any AI framework that supports tool calling.

Four Docker image variants for different footprints

Choose from latest (~4 GB, full tooling with sudo and multi-user support), slim (~430 MB, Debian, git/curl/jq), alpine (~230 MB, musl libc, minimal), or openshift (~430 MB, restricted non-root policy for OpenShift). Add packages at startup via OPEN_TERMINAL_PACKAGES, OPEN_TERMINAL_PIP_PACKAGES, or OPEN_TERMINAL_NPM_PACKAGES env vars on the latest image without forking the Dockerfile.

Bare metal deployment via pip or uvx

Install with pip install open-terminal or run without installing via uvx. Commands execute directly on the host with the user's permissions, giving an AI assistant access to real project files and tools. Suited for personal automation or local development workflows. The README explicitly notes this path is not sandboxed; use Docker when isolation matters.

Open WebUI first-class integration

Open Terminal connects to Open WebUI as a dedicated integration, not a generic tool server. The connection adds a file navigation sidebar to the AI chat interface with directory browsing, upload, download, and file editing. Admins can configure a system-level terminal shared across all users, with per-user or per-group access controls proxied through the Open WebUI backend.

Layered configuration via TOML, env vars, and CLI flags

Settings resolve in priority order: CLI flags beat env vars beat user config beat system config at /etc/open-terminal/config.toml. API key, CORS origins, log directory, execute timeout, and file browser root are all configurable without editing code. The system config sets site-wide defaults; the user config at ~/.config/open-terminal/config.toml handles personal overrides.

Features

  • Docker sandbox with pre-installed tooling
  • REST API for shell commands and file management
  • Four Docker image variants for different footprints
  • Bare metal deployment via pip or uvx
  • Open WebUI first-class integration
  • Layered configuration via TOML, env vars, and CLI flags

How to install

Deploy with Docker for an isolated environment, or install via pip for bare metal use.

# Docker (recommended)
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

# Bare metal
pip install open-terminal
open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key

Recommended for this setup

Strengths

  • MIT license with zero per-execution fees: The MIT license means you can run Open Terminal commercially, fork it, and modify it without restriction. Unlike E2B or Modal, there are no per-second or per-invocation charges. The only cost is the server it runs on, which makes the economics predictable regardless of how many commands an agent runs.
  • One command to start, no database or orchestration required: The Docker path starts with a single docker run command and is up on port 8000 in seconds. The bare metal path needs only pip install open-terminal. Neither path requires a database, a message broker, or a Kubernetes cluster. An API key can be auto-generated from docker logs if you skip setting one.
  • Active development from the Open WebUI project: Open Terminal has 3,381 GitHub stars and 310 forks, with the last commit in October 2026. It comes from the same team behind Open WebUI, giving it a direct feedback loop with a large community of AI practitioners who use it in production agent workflows.
  • Egress firewall on major Docker variants: The latest, slim, and alpine images include an iptables-based egress firewall. Administrators can control which external hosts the container can reach, restricting an AI agent's outbound network access without a separate network policy layer. The openshift variant omits this due to its restricted non-root policy.

Trade-offs

  • Multi-user mode is not a security boundary: OPEN_TERMINAL_MULTI_USER=true gives each user a separate home directory, but everyone shares one kernel, one process list, and one network stack. Users can observe each other's running commands, exhaust shared resources, and reach ports others have opened. The README explicitly recommends separate container instances when users cannot be fully trusted with each other.
  • Default image is roughly 4 GB: The latest image ships LibreOffice, LaTeX, ffmpeg, and data science libraries, putting the image size at roughly 4 GB. Cold starts take longer and storage costs add up in environments that pull the image frequently. Slim (~430 MB) and alpine (~230 MB) variants exist but lack runtime package installs, multi-user mode, and the egress firewall is absent from the openshift variant.
  • Bare metal mode runs commands as the current user: When installed via pip and run without Docker, commands execute directly on the host machine with the full permissions of the account running the server. There is no sandboxing. The README recommends Docker for any scenario requiring isolation from the host, and explicitly marks the bare metal path as unsuitable for untrusted agent activity.

Tech stack

Languages
Python, Shell, JavaScript, Dockerfile, Slim
Frameworks
FastAPI
Databases
—
Tooling
—

FAQ

Does Open Terminal run sandboxed by default?

The Docker path runs commands inside an isolated container, so agent activity stays off the host. The bare metal pip path runs commands directly on the host machine as the current user, with no sandboxing. For AI agent use cases the README recommends the Docker path. If you also mount the host Docker socket, the container gains full control over the host's Docker daemon, which the README flags as effectively root access.

Can multiple users share one Open Terminal instance?

Yes, using OPEN_TERMINAL_MULTI_USER=true gives each user a separate home directory inside one container. However, the README explicitly states this is not a security boundary: users share one kernel and process list, can observe each other's running commands, and can exhaust shared CPU, memory, and disk. For true isolation between users, each person should get their own container instance. The enterprise Open WebUI Terminals product handles per-user container provisioning.

How do I add custom packages to the Docker image?

Set OPEN_TERMINAL_PACKAGES for apt packages, OPEN_TERMINAL_PIP_PACKAGES for pip packages, or OPEN_TERMINAL_NPM_PACKAGES for npm globals as environment variables on docker run. Packages install each time the container starts, which slows startup for large lists. For heavy customization, extend Dockerfile.slim or Dockerfile.alpine and build a custom image instead. Note that slim and alpine images do not support these env vars at all.

Does Open Terminal integrate with Open WebUI?

Yes. Add the terminal URL and API key under Open Terminal in Open WebUI's integrations settings, not as a generic tool server. This adds a file browser sidebar to the AI chat interface. Admins can configure a system-level connection from the admin panel with per-user or per-group access controls; users can add their own instance from user settings for terminals running on their local machine.

What is the difference between the Docker image variants?

The latest image (~4 GB) includes the full toolset: Python, Node.js, gcc, ffmpeg, LibreOffice, LaTeX, Docker CLI, data science libs, sudo, multi-user support, and the egress firewall. Slim (~430 MB, Debian) and alpine (~230 MB, musl libc) are minimal with git, curl, and jq; both include the egress firewall but cannot install packages at runtime. The openshift variant (~430 MB) targets restricted non-root pod policies and omits runtime package installs, Docker socket access, the egress firewall, and multi-user mode.

Similar tools

More in AI Engineers