You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/open-terminal/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
21
21
22
22
Open WebUI gives you the agent front door: models, chats, knowledge, prompts, users, permissions, builtin tools, MCP connections, automations, and shared workflows. Open Terminal adds the missing computer substrate: a working environment with a filesystem, shell, package manager, running processes, document and data handling, generated artifacts, and live previews.
23
23
24
-
This is the difference between a chatbot with tools and an agentic AI workspace. The model can plan, create files, run code, inspect output, install dependencies, start servers, render previews, recover from errors, and continue until there is an artifact you can use: a script, report, patch, chart, website, migration, or organized folder.
24
+
That means the agent can do real work. Not just answer questions about a task, and not just emit code you run somewhere else. It can plan, create files, run code, inspect output, install dependencies, start servers, render previews, recover from errors, and continue until there is an artifact you can use: a script, report, patch, chart, website, migration, or organized folder.
25
25
26
26
Despite the name, Open Terminal is not just a terminal panel. It is the computer-like workspace the agent acts inside. Run it in Docker for isolation, or bare metal when the agent should work directly on the host.
27
27
@@ -43,7 +43,7 @@ Open Terminal is the computer substrate an **AI agent** drives from chat. If you
43
43
| Feedback loop | Tool calls and chat state | Observe the workspace, change it, run it, inspect the result, fix, retry, verify |
44
44
| Boundary | Open WebUI permissions and configuration | Docker sandbox or direct host access |
45
45
46
-
Open WebUI is the control plane. Open Terminal is the agent's computer substrate for work that needs an operating system, not just a prompt.
46
+
Open WebUI is the control plane. Open Terminal is the agent's computer substrate for real work that needs an operating system, not just a prompt.
47
47
48
48
---
49
49
@@ -65,7 +65,7 @@ Different teams describe this stack with different language. Open Terminal fits
65
65
|**Orchestration**| The loop of choosing tools, sequencing steps, handling failures, and verifying results |
66
66
|**Sandbox**| The isolation boundary around the agent's filesystem, processes, and network access |
67
67
68
-
The practical point is simple: models got good enough to use tools, but agents need a computer-shaped place to do work. Open Terminal gives Open WebUI that place.
68
+
The practical point is simple: models got good enough to use tools, but agents need a computer-shaped place to do real work. Open Terminal gives Open WebUI that place.
Copy file name to clipboardExpand all lines: docs/features/open-terminal/terminals/index.mdx
+31-15Lines changed: 31 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,9 @@ import Kubernetes from './tab-deployment/Kubernetes.md';
11
11
12
12
# Terminals (Orchestrator)
13
13
14
-
**Terminals** is an enterprise orchestration layer for [Open Terminal](/features/open-terminal) that provisions a fully isolated terminal container for every user. Instead of sharing a single container, each person gets their own, complete with separate files, processes, resource limits, and network isolation.
14
+
**Terminals** is the enterprise orchestration layer for [Open Terminal](/features/open-terminal). It provisions a dedicated computer substrate for every Open WebUI user: separate files, processes, package environment, resource limits, network boundary, and optional persistent storage.
15
+
16
+
Open Terminal gives one chat an agent workspace where AI can do real work. Terminals turns that into managed fleet infrastructure, so every user or policy can get the right workspace without sharing state or hand-wiring containers.
15
17
16
18
:::tip Quick navigation
17
19
-**Need to operate per-user terminal environments?** → [Orchestration](/features/open-terminal/terminals/orchestration)
@@ -22,9 +24,9 @@ flowchart LR
22
24
OW["Open WebUI"]
23
25
OR["Orchestrator"]
24
26
OW -->|X-User-Id| OR
25
-
OR --> TA["Open Terminal<br/>User A"]
26
-
OR --> TB["Open Terminal<br/>User B"]
27
-
OR --> TC["Open Terminal<br/>User C"]
27
+
OR --> TA["Agent workspace<br/>User A"]
28
+
OR --> TB["Agent workspace<br/>User B"]
29
+
OR --> TC["Agent workspace<br/>User C"]
28
30
29
31
style OW fill:#4a90d9,color:#fff
30
32
style OR fill:#e67e22,color:#fff
@@ -35,17 +37,31 @@ flowchart LR
35
37
36
38
---
37
39
38
-
## How it works
40
+
## How It Works
41
+
42
+
The orchestrator sits between Open WebUI and the per-user Open Terminal workspaces:
43
+
44
+
1. A user activates Open Terminal in Open WebUI.
45
+
2. Open WebUI proxies the request to the **orchestrator**, which manages workspace lifecycle.
46
+
3. The orchestrator resolves the selected policy: image, resources, storage, env vars, security context, and idle timeout.
47
+
4. The orchestrator provisions or reuses a personal Open Terminal workspace for that user and policy.
48
+
5. All traffic is proxied through the orchestrator. The user never connects to the workspace directly.
49
+
6. Idle workspaces are cleaned up after a configurable timeout. Files can persist across sessions when storage is enabled.
50
+
51
+
The orchestrator exposes the same OpenAPI-based tool interface as Open Terminal, so the AI can work with files, run code, execute commands, start servers, and inspect results, all scoped to the requesting user's workspace.
39
52
40
-
The orchestrator sits between Open WebUI and the Open Terminal instances:
53
+
## Why It Matters
41
54
42
-
1. A user activates a terminal in Open WebUI.
43
-
2. Open WebUI proxies the request to the **orchestrator**, a service that manages the lifecycle of terminal containers.
44
-
3. The orchestrator provisions a personal Open Terminal container for that user (or reconnects to an existing one).
45
-
4. All traffic is proxied through the orchestrator. The user never connects to their container directly.
46
-
5. Idle containers are automatically cleaned up after a configurable timeout. Data optionally persists across sessions.
55
+
Terminals is what makes agent computer substrates operable for teams. It lets admins give agents enough environment to do real work while still controlling the boundary:
47
56
48
-
The orchestrator also exposes the same OpenAPI-based tool interface as Open Terminal, so the AI can execute commands, read files, and run code, all scoped to the requesting user's container.
57
+
| Need | What Terminals provides |
58
+
| :--- | :--- |
59
+
| Isolation | One workspace per user and policy, with separate files and processes |
The orchestrator serves a built-in minimal admin UI at `/` for viewing terminal status, active sessions, and policies. It is on by default and toggled with `TERMINALS_ENABLE_UI`; set it to `false` for API-only deployments.
@@ -88,7 +104,7 @@ When deployed via Docker Compose or Helm, the shared API key is configured autom
88
104
89
105
### Terminal won't start
90
106
91
-
1.**Check orchestrator logs.** The orchestrator logs the full provisioning flow, including image pull and container creation. Look for errors related to image availability or resource limits.
107
+
1.**Check orchestrator logs.** The orchestrator logs the full provisioning flow, including image pull and workspace creation. Look for errors related to image availability, policy configuration, or resource limits.
92
108
2.**Verify the API key.** Ensure `TERMINALS_API_KEY` matches between Open WebUI and the orchestrator. A mismatch causes silent auth failures.
93
109
3.**Check image pull access.** If using a private container registry, make sure the orchestrator (Docker) or cluster (Kubernetes) has pull credentials configured.
94
110
@@ -98,9 +114,9 @@ When deployed via Docker Compose or Helm, the shared API key is configured autom
98
114
- If using **API key mode**, confirm the key is set identically on both sides. Check for extra whitespace or newlines.
99
115
- Check the orchestrator logs for `401` or `403` responses.
100
116
101
-
### Container is reaped too quickly
117
+
### Workspace is reaped too quickly
102
118
103
-
Increase `TERMINALS_IDLE_TIMEOUT_MINUTES` (or `idle_timeout_minutes` in a policy). The default is `0` (disabled), but if set too low, containers may be cleaned up while users are still working. A value of `30` is typical.
119
+
Increase `TERMINALS_IDLE_TIMEOUT_MINUTES` (or `idle_timeout_minutes` in a policy). The default is `0` (disabled), but if set too low, workspaces may be cleaned up while users are still working. A value of `30` is typical.
Copy file name to clipboardExpand all lines: docs/features/open-terminal/terminals/orchestration/index.md
+22-20Lines changed: 22 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,19 @@ title: "Orchestration"
5
5
6
6
# Orchestration
7
7
8
-
The Terminals orchestrator gives each Open WebUI user a dedicated Open Terminal container. Open WebUI stores the connection, the orchestrator resolves policy, and Open Terminal runs inside the per-user container.
8
+
The Terminals orchestrator gives each Open WebUI user a dedicated agent workspace backed by Open Terminal. Open WebUI stores the connection, the orchestrator resolves policy, and Open Terminal runs inside the per-user computer substrate where the agent can do real work.
9
+
10
+
Use this when Open Terminal needs to become managed team infrastructure: different users, groups, or workflows need different images, tools, limits, storage behavior, reset schedules, and security boundaries.
9
11
10
12
```mermaid
11
13
flowchart LR
12
14
A["Open WebUI"] --> B["Terminals orchestrator"]
13
-
B --> C["User A Open Terminal container"]
14
-
B --> D["User B Open Terminal container"]
15
-
B --> E["User C Open Terminal container"]
15
+
B --> C["User A agent workspace"]
16
+
B --> D["User B agent workspace"]
17
+
B --> E["User C agent workspace"]
16
18
```
17
19
18
-
When a user opens a terminal, Open WebUI routes through `/p/{policy_id}/...`. The orchestrator provisions or reuses that user's container for the selected policy.
20
+
When a user opens Open Terminal, Open WebUI routes through `/p/{policy_id}/...`. The orchestrator provisions or reuses that user's workspace for the selected policy.
19
21
20
22
## Read This Section
21
23
@@ -33,15 +35,15 @@ When a user opens a terminal, Open WebUI routes through `/p/{policy_id}/...`. Th
33
35
34
36
| Layer | Responsibility |
35
37
| :--- | :--- |
36
-
| Open WebUI | Stores the orchestrator connection, selects the policy, and presents the terminal and file browser UI |
| Policy | Defines the workspace image, env, resources, storage, security context, and idle timeout |
41
+
| Policy lifecycle | Defines maintenance behavior over time, such as scheduled resets of persisted workspace files |
42
+
| Open Terminal workspace| Executes commands, serves files, exposes OpenAPI tools, runs code and servers, and reports file-browser root metadata |
41
43
42
44
## Orchestrator Environment Variables
43
45
44
-
These configure the orchestrator service itself, prefixed with `TERMINALS_` (or set in a `.env` file). They are distinct from the per-container`OPEN_TERMINAL_*` policy variables covered in [Environment Variables](/features/open-terminal/terminals/orchestration/environment-variables), which are forwarded into each user's container.
46
+
These configure the orchestrator service itself, prefixed with `TERMINALS_` (or set in a `.env` file). They are distinct from the per-workspace`OPEN_TERMINAL_*` policy variables covered in [Environment Variables](/features/open-terminal/terminals/orchestration/environment-variables), which are forwarded into each user's Open Terminal workspace.
45
47
46
48
| Variable | Default | Description |
47
49
| :--- | :--- | :--- |
@@ -53,17 +55,17 @@ These configure the orchestrator service itself, prefixed with `TERMINALS_` (or
53
55
|`TERMINALS_ENABLE_UI`|`true`| Serve the built-in minimal admin UI at `/`. Set `false` for API-only deployments |
54
56
|`TERMINALS_LOG_LEVEL`|`INFO`| Minimum log level: `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`|
55
57
|`TERMINALS_DATABASE_URL`|`sqlite+aiosqlite:///<data>/terminals.db`| SQLAlchemy database URL. SQLite is the default; PostgreSQL is optional |
56
-
|`TERMINALS_IMAGE`|`ghcr.io/open-webui/open-terminal:latest`| Default container image when a policy sets none |
57
-
|`TERMINALS_NETWORK`|*(unset)*| Docker network for terminal containers. When set, containers are reached by name instead of published ports |
58
+
|`TERMINALS_IMAGE`|`ghcr.io/open-webui/open-terminal:latest`| Default workspace image when a policy sets none |
59
+
|`TERMINALS_NETWORK`|*(unset)*| Docker network for Open Terminal workspaces. When set, containers are reached by name instead of published ports |
58
60
|`TERMINALS_DOCKER_HOST`|`127.0.0.1`| Address used to reach published container ports (Docker backend) |
|`TERMINALS_IDLE_TIMEOUT_MINUTES`|`0`| Tear down terminals after N minutes of inactivity (`0` = disabled) |
61
-
|`TERMINALS_MAX_CPU`|*(unset)*| Hard cap on CPU per container that policies cannot exceed |
62
-
|`TERMINALS_MAX_MEMORY`|*(unset)*| Hard cap on memory per container that policies cannot exceed |
63
-
|`TERMINALS_MAX_STORAGE`|*(unset)*| Hard cap on storage per container that policies cannot exceed |
63
+
|`TERMINALS_MAX_CPU`|*(unset)*| Hard cap on CPU per workspace that policies cannot exceed |
64
+
|`TERMINALS_MAX_MEMORY`|*(unset)*| Hard cap on memory per workspace that policies cannot exceed |
65
+
|`TERMINALS_MAX_STORAGE`|*(unset)*| Hard cap on storage per workspace that policies cannot exceed |
64
66
|`TERMINALS_ALLOWED_IMAGES`|*(unset)*| Comma-separated list of allowed image patterns (globs). Empty allows any image |
65
67
|`TERMINALS_KUBERNETES_NAMESPACE`|`terminals`| Namespace for terminal pods (Kubernetes backends) |
66
-
|`TERMINALS_KUBERNETES_IMAGE`|`ghcr.io/open-webui/open-terminal:latest`| Default image for terminal pods (Kubernetes backends) |
68
+
|`TERMINALS_KUBERNETES_IMAGE`|`ghcr.io/open-webui/open-terminal:latest`| Default image for Open Terminal pods (Kubernetes backends) |
67
69
|`TERMINALS_KUBERNETES_STORAGE_CLASS`|*(unset)*| StorageClass for PVCs. Empty uses the cluster default |
68
70
|`TERMINALS_KUBERNETES_STORAGE_SIZE`|`1Gi`| Default PVC size when a policy sets none |
69
71
|`TERMINALS_KUBERNETES_STORAGE_MODE`|`per-user`| Storage mode: `per-user`, `shared`, or `shared-rwo`|
@@ -72,14 +74,14 @@ These configure the orchestrator service itself, prefixed with `TERMINALS_` (or
72
74
|`TERMINALS_KUBERNETES_LABELS`|*(unset)*| Extra labels applied to created resources as `k=v,k2=v2`|
73
75
|`TERMINALS_KUBERNETES_RESTRICTED`|`false`| Enable restricted Kubernetes/OpenShift pod defaults globally |
74
76
|`TERMINALS_KUBERNETES_POD_SECURITY_CONTEXT`|`{}`| JSON pod security context merged into terminal pods |
75
-
|`TERMINALS_KUBERNETES_CONTAINER_SECURITY_CONTEXT`|`{}`| JSON container security context merged into terminal containers |
77
+
|`TERMINALS_KUBERNETES_CONTAINER_SECURITY_CONTEXT`|`{}`| JSON container security context merged into Open Terminal containers |
76
78
|`TERMINALS_KUBERNETES_CRD_GROUP`|`openwebui.com`| CRD group watched by the operator backend |
77
79
|`TERMINALS_KUBERNETES_CRD_VERSION`|`v1alpha1`| CRD version watched by the operator backend |
78
80
79
81
Any value omitted here falls back to the default shown. See [`config.py`](https://github.com/open-webui/terminals/blob/main/terminals/config.py) for the authoritative list.
80
82
81
83
## Important Behavior
82
84
83
-
Policy changes apply to newly provisioned terminals. Existing running terminals keep their current image and environment until they are stopped, refreshed, or cleaned up by idle timeout.
85
+
Policy changes apply to newly provisioned workspaces. Existing running workspaces keep their current image and environment until they are stopped, refreshed, or cleaned up by idle timeout.
84
86
85
87
The visual file-browser boundary is for usability. Open Terminal reports a root path that clients can render as `Home` and use to hide parent folders, but it is not a security boundary.
Copy file name to clipboardExpand all lines: docs/features/open-terminal/terminals/orchestration/policies.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,27 +5,29 @@ title: "Policies"
5
5
6
6
# Policies
7
7
8
-
A policy describes what a user's Open Terminal container should look like. It controls the image, resources, storage, environment variables, and idle timeout.
8
+
A policy describes what a user's Open Terminal workspace should look like. It controls the image, tools, resources, storage, environment variables, security context, and idle timeout.
9
+
10
+
Think of policies as agent workspace profiles. A data team might get Python, notebooks, and larger storage. A training lab might get a locked-down image and scheduled resets. A software team might get Git, build tools, language runtimes, and persistent files.
9
11
10
12
In Open WebUI, go to **Settings** -> **Admin** -> **Tools** -> **Integrations** -> Open Terminal**, add an orchestrator connection, verify it, then edit the policy fields.
11
13
12
14
## Policy Fields
13
15
14
16
| Policy field | Example | What it controls |
15
17
| :--- | :--- | :--- |
16
-
|`image`|`ghcr.io/acme/open-terminal:python`| Open Terminal image used for new containers|
18
+
|`image`|`ghcr.io/acme/open-terminal:python`| Open Terminal image used for new workspaces|
17
19
|`cpu_limit`|`2` or `500m`| CPU limit passed to Docker/Kubernetes |
18
20
|`memory_limit`|`4Gi`| Memory limit passed to Docker/Kubernetes |
19
21
|`storage`|`10Gi`| Persistent file storage on Kubernetes; Docker stores files under the orchestrator data dir. On Docker the cap is best-effort: it limits only the writable layer via `StorageOpt` and needs a quota-capable driver (overlay2 on XFS with `pquota`), and `/home/user` is bind-mounted and not quota-limited. Use a Kubernetes backend for hard storage caps |
20
22
|`storage_mode`|`per-user`| Kubernetes storage mode: `per-user`, `shared`, or `shared-rwo`|
21
-
|`env`|`OPENAI_API_KEY=sk-...`| Raw environment variables injected into the user container|
22
-
|`idle_timeout_minutes`|`30`| Idle time before the terminal is stopped and removed |
23
+
|`env`|`OPENAI_API_KEY=sk-...`| Raw environment variables injected into the user workspace|
24
+
|`idle_timeout_minutes`|`30`| Idle time before the workspace is stopped and removed |
23
25
|`restricted`|`true`| Run under a restricted security context (Kubernetes/OpenShift backends) |
24
26
|`pod_security_context`|`{"fsGroup": 1000}`| Kubernetes pod `securityContext` overrides (Kubernetes/OpenShift backends) |
All fields are optional. If a field is omitted, the orchestrator uses its global default, such as `TERMINALS_IMAGE` or `TERMINALS_KUBERNETES_STORAGE_MODE`.
28
30
29
-
Policy changes apply when a terminal is newly provisioned. Existing running terminals keep their current image and environment until they are stopped, refreshed, or cleaned up by idle timeout. Open WebUI is an admin client for this policy state; Terminals remains the source of truth for both policy and lifecycle configuration.
31
+
Policy changes apply when a workspace is newly provisioned. Existing running workspaces keep their current image and environment until they are stopped, refreshed, or cleaned up by idle timeout. Open WebUI is an admin client for this policy state; Terminals remains the source of truth for both policy and lifecycle configuration.
30
32
31
33
Scheduled resets are configured through policy lifecycle, not policy fields. This keeps provisioning settings separate from ongoing maintenance.
0 commit comments