{"id":46180871,"url":"https://github.com/open-webui/open-terminal","last_synced_at":"2026-04-01T18:56:28.601Z","repository":{"id":338093266,"uuid":"1154879377","full_name":"open-webui/open-terminal","owner":"open-webui","description":"A computer you can curl ⚡","archived":false,"fork":false,"pushed_at":"2026-03-25T22:23:42.000Z","size":286,"stargazers_count":2105,"open_issues_count":3,"forks_count":155,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-03-29T22:24:07.765Z","etag":null,"topics":["agentic-ai","ai","ai-agents","ai-tools","open-webui"],"latest_commit_sha":null,"homepage":"https://openterminal.sh/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-webui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T21:57:30.000Z","updated_at":"2026-03-29T21:55:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/open-webui/open-terminal","commit_stats":null,"previous_names":["open-webui/open-terminal"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/open-webui/open-terminal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fopen-terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fopen-terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fopen-terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fopen-terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-webui","download_url":"https://codeload.github.com/open-webui/open-terminal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fopen-terminal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31271649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T06:57:45.811Z","status":"ssl_error","status_checked_at":"2026-04-01T06:57:42.389Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai","ai-agents","ai-tools","open-webui"],"created_at":"2026-03-02T20:06:12.286Z","updated_at":"2026-04-01T18:56:28.583Z","avatar_url":"https://github.com/open-webui.png","language":"Python","funding_links":[],"categories":["Python","\u003cimg src=\"./assets/satellite.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\"\u003e Satellites"],"sub_categories":[],"readme":"# ⚡ Open Terminal\n\nA lightweight, self-hosted terminal that gives AI agents and automation tools a dedicated environment to run commands, manage files, and execute code — all through a simple API.\n\n## Why Open Terminal?\n\nAI assistants are great at writing code, but they need somewhere to *run* it. Open Terminal is that place — a remote shell with file management, search, and more, accessible over a simple REST API.\n\nYou can run it two ways:\n\n- **Docker (sandboxed)** — runs in an isolated container with a full toolkit pre-installed: Python, Node.js, git, build tools, data science libraries, ffmpeg, and more. Great for giving AI agents a safe playground without touching your host system.\n- **Bare metal** — install it with `pip` and run it anywhere Python runs. Commands run directly on your machine with access to your real files, your real tools, and your real environment, perfect for local development, personal automation, or giving an AI assistant full access to your actual projects.\n\n## Getting Started\n\n### Docker (recommended)\n\n```bash\ndocker 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\n```\n\nThat's it — you're up and running at `http://localhost:8000`.\n\n\u003e [!TIP]\n\u003e If you don't set an API key, one is generated automatically. Grab it with `docker logs open-terminal`.\n\n#### Image Variants\n\n| | `latest` | `slim` | `alpine` |\n|---|---|---|---|\n| **Best for** | AI agent sandboxes | Production / hardened | Edge / CI / minimal footprint |\n| **Size** | ~4 GB | ~430 MB | ~230 MB |\n| **Bundled tooling** | Node.js, gcc, ffmpeg, LaTeX, Docker CLI, data science libs | git, curl, jq | git, curl, jq |\n| **Install packages at runtime** | ✔ (has `sudo`) | ✘ | ✘ |\n| **Multi-user mode** | ✔ | ✘ | ✘ |\n| **Egress firewall** | ✔ | ✔ | ✔ |\n\n**`slim`** and **`alpine`** have the same feature set. Slim uses Debian (glibc) for broader binary compatibility; Alpine uses musl libc and is smaller, but some C-extension pip packages may need to compile from source.\n\n```bash\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io/open-webui/open-terminal:slim\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io/open-webui/open-terminal:alpine\n```\n\n\u003e [!NOTE]\n\u003e Slim and Alpine don't support `OPEN_TERMINAL_PACKAGES` / `OPEN_TERMINAL_PIP_PACKAGES` / `OPEN_TERMINAL_NPM_PACKAGES`. To add packages, extend [Dockerfile.slim](Dockerfile.slim) or [Dockerfile.alpine](Dockerfile.alpine).\n\n#### Updating\n\n```bash\ndocker pull ghcr.io/open-webui/open-terminal\ndocker rm -f open-terminal\n```\n\nThen re-run the `docker run` command above.\n\n### Bare Metal\n\nNo Docker? No problem. Open Terminal is a standard Python package:\n\n```bash\n# One-liner with uvx (no install needed)\nuvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n\n# Or install globally with pip\npip install open-terminal\nopen-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n```\n\n\u003e [!CAUTION]\n\u003e On bare metal, commands run directly on your machine with your user's permissions. Use Docker if you want sandboxed execution.\n\n#### Customizing the Docker Environment\n\nThe easiest way to add extra packages is with environment variables — no fork needed:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -e OPEN_TERMINAL_PACKAGES=\"cowsay figlet\" \\\n  -e OPEN_TERMINAL_PIP_PACKAGES=\"httpx polars\" \\\n  -e OPEN_TERMINAL_NPM_PACKAGES=\"typescript tsx\" \\\n  ghcr.io/open-webui/open-terminal\n```\n\n| Variable | Description |\n|---|---|\n| `OPEN_TERMINAL_PACKAGES` | Space-separated list of **apt** packages to install at startup |\n| `OPEN_TERMINAL_PIP_PACKAGES` | Space-separated list of **pip** packages to install at startup |\n| `OPEN_TERMINAL_NPM_PACKAGES` | Space-separated list of **npm** packages to install globally at startup |\n\n\u003e [!NOTE]\n\u003e Packages are installed each time the container starts, so startup will take longer with large package lists. For heavy customization, build a custom image instead.\n\n#### Docker Access\n\nThe image includes the Docker CLI, Compose, and Buildx. To let agents build images, run containers, etc., mount the host's Docker socket:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\\n  -v open-terminal:/home/user \\\n  ghcr.io/open-webui/open-terminal\n```\n\n\u003e [!CAUTION]\n\u003e Mounting the Docker socket gives the container **full control over the host's Docker daemon**, which is effectively root access on the host machine. Anyone with access to the terminal can pull/run arbitrary containers (including `--privileged` ones), mount host directories, access host networking, and manage all containers on the host. Only do this in fully trusted environments.\n\nFor full control, fork the repo, edit the [Dockerfile](Dockerfile), and build your own image:\n\n```bash\ndocker build -t my-terminal .\ndocker run -d --name open-terminal -p 8000:8000 my-terminal\n```\n\n\n## Configuration\n\nOpen Terminal can be configured via a TOML config file, environment variables, and CLI flags. Settings are resolved in this order (highest priority wins):\n\n1. **CLI flags** (`--host`, `--port`, `--api-key`, etc.)\n2. **Environment variables** (`OPEN_TERMINAL_API_KEY`, etc.)\n3. **User config** — `$XDG_CONFIG_HOME/open-terminal/config.toml` (defaults to `~/.config/open-terminal/config.toml`)\n4. **System config** — `/etc/open-terminal/config.toml`\n5. **Built-in defaults**\n\nCreate a config file at either location with any of these keys (all optional):\n\n```toml\nhost = \"0.0.0.0\"\nport = 8000\napi_key = \"sk-my-secret-key\"\ncors_allowed_origins = \"*\"\nlog_dir = \"/var/log/open-terminal\"\nbinary_mime_prefixes = \"image,audio\"\nexecute_timeout = 5  # seconds to wait for command output (unset by default)\n```\n\n\u003e [!TIP]\n\u003e Use the system config at `/etc/open-terminal/config.toml` to set site-wide defaults for host and port, and the user config for personal settings like the API key — this keeps the key out of `ps` / `htop`.\n\nYou can also point to a specific config file:\n\n```bash\nopen-terminal run --config /path/to/my-config.toml\n```\n\n## Using with Open WebUI\n\nOpen Terminal integrates with [Open WebUI](https://github.com/open-webui/open-webui), giving your AI assistants the ability to run commands, manage files, and interact with a terminal right from the AI interface. Make sure to add it under **Open Terminal** in the integrations settings, not as a tool server. Adding it as an Open Terminal connection gives you a built-in file navigation sidebar where you can browse directories, upload, download, and edit files. There are two ways to connect:\n\n### Direct Connection\n\nUsers can connect their own Open Terminal instance from their user settings. This is useful when the terminal is running on their local machine or a network only they can reach, since requests go directly from the **browser**.\n\n1. Go to **User Settings → Integrations → Open Terminal**\n2. Add the terminal **URL** and **API key**\n3. Enable the connection\n\n### System-Level Connection (Multi-User)\n\nAdmins can configure Open Terminal connections for all their users from the admin panel. No additional services required. Multiple terminals can be set up with access controlled at the user or group level. Requests are proxied through the Open WebUI **backend**, so the terminal only needs to be reachable from the server.\n\n1. Go to **Admin Settings → Integrations → Open Terminal**\n2. Add the terminal **URL** and **API key**\n3. Enable the connection\n\n#### Built-in Multi-User Isolation\n\n\u003e [!CAUTION]\n\u003e Single-container multi-user mode is **not designed for production multi-user deployments**. All users share the same kernel, network, and system resources with no hard isolation boundaries between them. If one user's process misbehaves, it can affect every other user on the system. This mode exists as a lightweight convenience for small, trusted groups — not as a security model you should rely on.\n\nFor small, trusted deployments you can enable per-user isolation inside a single container:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v open-terminal:/home \\\n  -e OPEN_TERMINAL_MULTI_USER=true \\\n  -e OPEN_TERMINAL_API_KEY=your-secret-key \\\n  ghcr.io/open-webui/open-terminal\n```\n\nEach user automatically gets a dedicated Linux account with its own home directory. Files, commands, and terminals are isolated between users via standard Unix permissions.\n\n## API Docs\n\nFull interactive API documentation is available at [http://localhost:8000/docs](http://localhost:8000/docs) once your instance is running.\n\n## Star History\n\n\u003ca href=\"https://star-history.com/#open-webui/open-terminal\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=open-webui/open-terminal\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=open-webui/open-terminal\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=open-webui/open-terminal\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n\u003e [!TIP]\n\u003e **Need container-per-user isolation?** Check out **[Terminals](https://github.com/open-webui/terminals)**, which provisions and manages separate Open Terminal containers per user. For lighter deployments, built-in multi-user mode (`OPEN_TERMINAL_MULTI_USER=true`) provides per-user isolation inside a single container.\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-webui%2Fopen-terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-webui%2Fopen-terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-webui%2Fopen-terminal/lists"}