Skip to content

Open WebUI Open Terminal: Give Your AI a Real Shell (Setup Guide 2026)

7–10 minutes
Woman in a sunny cafe holding a tablet with an OPEN TERMINAL card, hook give your AI a real shell

Open Terminal gives the AI in Open WebUI a real computer to work on. With a machine connected, the model can run shell commands, create and edit files, install packages, start a dev server and show a live preview, all from a normal chat.

It turns Open WebUI from a chat window into a full agent workspace.

You can run Open Terminal safely inside a Docker container, or directly on your own machine when you want the AI to work on your real files. Either way, setup takes one command and a few clicks.

This guide covers what Open Terminal does, installing it with Docker, bare metal or Docker Compose, connecting it to Open WebUI, using it in chat, auth and upload settings, choosing a model, security, running it as an MCP server and fixes. It follows the official Open WebUI documentation as of December 2026.

TL;DR

  • Run: docker run -d --name open-terminal -p 8000:8000 -v open-terminal:/home/user -e OPEN_TERMINAL_API_KEY=your-secret-key ghcr.io/open-webui/open-terminal
  • Check: open http://localhost:8000/docs.
  • Connect: Settings > Integrations (admin) > Machines > Open Terminal > +, add URL and API key, Auth = Bearer.
  • Use: click the cloud icon in the chat input and pick your machine.
  • Model: needs strong agentic tool calling; small models struggle.
  • Safety: Docker isolates it. Bare metal lets the AI do anything your user account can.

What Open Terminal Does

Open WebUI already handles models, chats, knowledge, tools, memory and permissions. Open Terminal adds the missing piece: a workspace where actions actually run. The model plans, runs a command, reads the output, fixes errors and keeps going until it has a finished result.

Capability Examples
Real shell Run scripts, CLIs, tests, build tools and package managers
File workspace Browse, upload, download, edit, rename, convert and organize files
Documents and data PDF, Word, Excel, PowerPoint, EPUB, email, CSV and code files
Live previews Start a local web server and view the site inside Open WebUI
Software work Clone repos, run test suites, debug, refactor and use Git

It is broader than the built-in Open WebUI Code Interpreter, which only runs Python. Open Terminal includes the filesystem, shell, packages, processes and previews.

Choose an Install Method

Method When to use
Docker Isolated container, separate from your host. Best default.
Bare metal The AI works directly on your machine, real files and tools
Docker Compose You already run Open WebUI with Compose
SSH or local machine Let Open WebUI install it on a server for you (see the docs)

Install With Docker

  1. Install Docker if you have not already.
  2. Start the container, replacing your-secret-key with your own password:
    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
  3. Open http://localhost:8000/docs. You should see the Open Terminal API page.

The -v open-terminal:/home/user volume keeps files across restarts. If you skip the API key, one is generated; find it with docker logs open-terminal. OpenShift users can use the :openshift image, which drops some features such as runtime package installs.

Install on Bare Metal

Warning: in this mode the AI can do anything your user account can do, including deleting files.

  1. Run without installing, using uv:
    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
  2. Note the Local and Network addresses and the API key it prints.
  3. To limit it to one project, start it inside that folder, or add --cwd /path/to/your/project.

Windows is supported through pywinpty, with full PowerShell support. Use the Local address when Open WebUI is on the same machine and the Network address otherwise.

Add It to Docker Compose

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: open-webui
    ports:
      - "3000:8080"
    volumes:
      - open-webui:/app/backend/data
  open-terminal:
    image: ghcr.io/open-webui/open-terminal
    container_name: open-terminal
    volumes:
      - open-terminal:/home/user
    environment:
      - OPEN_TERMINAL_API_KEY=your-secret-key
volumes:
  open-webui:
  open-terminal:

Run docker compose up -d and check both with docker compose ps. Inside the Compose network, connect with http://open-terminal:8000; localhost does not resolve between containers. New to the Docker setup? See our Open WebUI with Ollama setup guide.

Connect It to Open WebUI

The admin connection is recommended even for single users, because it keeps the API key on the server.

  1. Click your name at the bottom of the sidebar and open Settings.
  2. In the Admin section, open Integrations.
  3. Scroll to Machines and the Open Terminal connections. Do not add it under Tools > External Tool Servers.
  4. Click + and enter the URL (http://localhost:8000 or http://open-terminal:8000) and the API Key.
  5. Leave Auth as Bearer.
  6. Click Save. The connection appears with its toggle on.
  7. Optional: expand Access to limit the machine to certain users or groups.

Without admin rights, you can add your own machine in the Tether app, which keeps the URL and key on your computer. Docker deployments can preconfigure machines with the MACHINE_CONNECTIONS environment variable. Access groups are covered in our Open WebUI users and groups guide.

Use Open Terminal in a Chat

  1. In the chat input, click the cloud icon. Your machines appear under Machines.
  2. Select one. Its name shows next to the cloud icon.
  3. Check the model’s Function Calling is Default or Native, not Legacy (Workspace > Models > edit).
  4. Test it: “What operating system are you running on?” The model should run a command and answer.
  5. Give a real job: “Analyse sales.csv, make a chart of monthly revenue and save a summary report.”

Hover a machine in the menu, click More and choose System info to see CPU, memory, disk, network, uptime and top processes, refreshed every 5 seconds. You can switch machines anytime except while a reply is generating.

The model’s Terminal feature must be on (it is by default); see our Open WebUI custom models guide.

Auth and Connection Settings

Auth Result
Bearer (default) Sends the API key on HTTP and websocket. The only option that makes everything work.
None No key sent
Session Sends the user’s Open WebUI token on HTTP; websocket features get an empty token
OAuth Sends the user’s OAuth token on HTTP; websocket features get an empty token

Websocket features include the shell in a New Terminal tab, live file refresh, the Desktop tab and streamed command output. Other settings: Chat Uploads (starts on Filesystem, sending chat attachments to the machine), Working Directory Context (on by default), User Shell Tools (leave Automatic) and Forward cookies (off; turn on only for cookie-authenticated machines).

Models That Work Well

Terminal work is the most demanding agentic task in Open WebUI: many turns of acting, reading output and recovering from errors.

The docs name GPT-5.6 Sol, Claude Opus 5 or Gemini 3.5 Pro as top picks, and GPT-5.6 Terra, Claude Sonnet 5, Gemini 3.6 Flash and MiniMax M3 as the practical minimum. Small local models often emit valid tool calls but fail the loop. See our Open WebUI Tools guide for local model advice.

Run It as an MCP Server

Open Terminal can also serve MCP clients:

uvx --from "open-terminal[mcp]" open-terminal mcp
# or
pip install "open-terminal[mcp]"
open-terminal mcp

It uses stdio by default. For HTTP, add --transport streamable-http --host 127.0.0.1 --port 8000. More on MCP in our Open WebUI MCP guide.

Security Tips

  • Prefer Docker unless you deliberately want the AI on your host.
  • On bare metal, use --cwd to keep it inside one project folder, and run it as a low-privilege user.
  • Use a long random API key and keep it in the admin connection, not in prompts.
  • Restrict the machine to trusted groups with Access.
  • Do not expose port 8000 to the internet.
  • Back up the open-terminal volume if files there matter.

Troubleshooting

The Machines section is greyed out

ENABLE_TOOL_SERVERS is set to False. Turn it on and restart.

Connection fails from Open WebUI in Docker

localhost inside the Open WebUI container points to itself. Use the Compose service name, host.docker.internal:8000 or the Network address.

The AI never runs commands

Select the machine with the cloud icon, set Function Calling to Native, and use a stronger model.

Terminal tab or live refresh does not work

Auth is set to Session, OAuth or None. Switch to Bearer.

No file browser or terminal sidebar

You added it under External Tool Servers. Remove it and add it under Machines.

I lost the API key

Run docker logs open-terminal if it was auto-generated, or restart the container with a new OPEN_TERMINAL_API_KEY.

API calls to /api/v1/terminals fail

Terminals were renamed machines. Use /api/v1/machines.

FAQ

Is Open Terminal free?

Yes. It is an open-source project from the Open WebUI team.

Is it safe?

In Docker it is isolated from your host. On bare metal it has your user’s full permissions, so be careful.

Does it work on Windows?

Yes, bare metal works on Windows with PowerShell, and Docker works anywhere Docker runs.

Can several users share one machine?

Yes, with Access controls. Orchestrator connections can give each user their own machines.

Can it use local Ollama models?

Yes, but small models often fail multi-step terminal tasks. Use the strongest model you can.

How is it different from the code interpreter?

The code interpreter runs Python snippets. Open Terminal is a full workspace with a shell, files, packages and servers.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a sunny cafe holding a tablet with an OPEN TERMINAL card, hook give your AI a real shell