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: README.md
+67-47Lines changed: 67 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,32 +5,21 @@
5
5
6
6
Per-user [Open Terminal](https://github.com/open-webui/open-terminal) orchestration for Docker and Kubernetes.
7
7
8
-
Giving terminal access to users on Open WebUI requires per-user isolation: separate containers, each with their own credentials and resource constraints. Terminals handles the full lifecycle: provisioning containers on demand, proxying traffic per user, enforcing resource and network policies, validating Open WebUI JWTs natively, and cleaning up idle instances.
9
-
10
-
| Capability ||
11
-
|---|---|
12
-
|**Backends**| Docker, Kubernetes, K8s Operator |
13
-
|**Provisioning**| On-demand per user, transparent to the client |
14
-
|**Policies**| Per-environment image, CPU, memory, network, env vars via REST API |
15
-
|**Auth**| Open WebUI JWT validation or static API key |
16
-
|**Hard caps**| Admin-enforced limits on CPU, memory, storage, and allowed images |
17
-
|**Multi-environment**| Named policies with routing via `/p/{policy_id}/`|
18
-
|**Network control**| Egress filtering via `env.OPEN_TERMINAL_ALLOWED_DOMAINS`|
19
-
|**Idle cleanup**| Automatic teardown of inactive instances |
20
-
|**Runtime changes**| Update policies via API without redeployment |
8
+
Terminals gives every Open WebUI user their own isolated container — with separate credentials, resource limits, and network rules. It handles the full lifecycle automatically: spinning up containers when a user connects, proxying traffic, enforcing limits, and cleaning up when they're done.
9
+
10
+
```
11
+
Open WebUI → Terminals service → per-user containers
12
+
(this project) (Open Terminal images)
13
+
```
21
14
22
15
> [!IMPORTANT]
23
16
> **Production use requires an [Open WebUI Enterprise License](LICENSE) with Terminals access.** Contact the Open WebUI team to get started.
24
17
25
-
26
18
## Quick Start
27
19
28
-
```bash
29
-
pip install -e .
30
-
terminals serve
31
-
```
20
+
The fastest way to get running is with Docker. Terminals will manage sibling containers through the Docker socket.
32
21
33
-
Or with Docker:
22
+
### Docker (recommended for single-node)
34
23
35
24
```bash
36
25
docker run -p 3000:3000 \
@@ -39,24 +28,61 @@ docker run -p 3000:3000 \
39
28
terminals
40
29
```
41
30
31
+
**Prerequisites:** Docker running on the host.
32
+
33
+
### Kubernetes Operator (recommended for clusters)
34
+
35
+
For Kubernetes deployments, the operator manages `Terminal` custom resources automatically — handling pod creation, storage, and cleanup through CRDs.
Set `TERMINALS_BACKEND=kubernetes-operator` when deploying the Terminals service.
44
+
45
+
### From source (development)
46
+
47
+
```bash
48
+
pip install -e .
49
+
terminals serve
50
+
```
51
+
52
+
## Choosing a Backend
53
+
54
+
| Backend | Best for | How it works |
55
+
|---------|----------|-------------|
56
+
|`docker`| Single-node, local dev | One container per user via Docker socket |
57
+
|`kubernetes-operator`| Production K8s clusters | Operator watches `Terminal` CRDs for automated lifecycle |
58
+
|`kubernetes`| K8s without CRDs | Direct Pod + PVC + Service per user (you manage resources) |
59
+
60
+
Set the backend with `TERMINALS_BACKEND` (defaults to `docker`).
61
+
42
62
## Policies
43
63
44
-
Policies define per-environment configuration. Manage via REST API:
64
+
Policies let you define different environments — for example, a "data-science" environment with extra CPU and specific Python packages, or a "sandbox" environment with restricted network access.
65
+
66
+
Without any policies, Terminals uses the defaults from your configuration. Once you're ready to customize, manage policies through the REST API:
45
67
46
68
```bash
69
+
# Create a "data-science" policy
47
70
curl -X PUT http://localhost:3000/api/v1/policies/data-science \
0 commit comments