Skip to content
Merged

sync #1300

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/features/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ Connect a real computing environment to Open WebUI. The AI writes code, executes

[**Learn about Open Terminal →**](/features/open-terminal)

:::tip
Want the whole machine in a browser tab? See [**cptr**](https://github.com/open-webui/computer) (Open WebUI Computer).
:::

---

## 🔌 Extensibility
Expand Down
4 changes: 4 additions & 0 deletions docs/features/open-terminal/file-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ If you have more than one terminal connected, switching between them in the drop
- **[Analyze documents & data →](./use-cases/file-analysis)** — drag in a spreadsheet or PDF and ask about it
- **[Run code from chat →](./use-cases/code-execution)** — the AI creates files you can see here
- **[Build & preview websites →](./use-cases/web-development)** — the files the AI creates appear in the browser

:::tip
Want to browse and edit your real files from any device? [**cptr**](https://github.com/open-webui/computer) puts your entire machine in a browser tab, with a full file browser, terminal, git, and editor.
:::
6 changes: 6 additions & 0 deletions docs/features/open-terminal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,9 @@ Open Terminal requires models with **native function calling** support. Frontier
## Enterprise Multi-User

Need isolated, per-user terminal containers for your team? **[Terminals](./terminals/)** provisions a dedicated Open Terminal instance for every user with automatic lifecycle management, resource controls, and policy-based environments.

---

## Your Whole Machine

Open Terminal adds a computing environment to Open WebUI. [**cptr**](https://github.com/open-webui/computer) (Open WebUI Computer) is the computer itself: files, terminal, git, editor, and AI in a browser tab, accessible from any device.
4 changes: 4 additions & 0 deletions docs/features/open-terminal/setup/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ http://open-terminal:8000

---

:::tip Looking for the whole machine?
[**cptr**](https://github.com/open-webui/computer) (Open WebUI Computer) is your entire computer in a browser tab: files, terminal, git, editor, and AI, accessible from any device. It also connects to Open WebUI via its gateway API.
:::

## Next step

[**Connect to Open WebUI →**](./connecting)
4 changes: 4 additions & 0 deletions docs/features/open-terminal/use-cases/code-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ Additional languages (Rust, Go, Java, etc.) can be installed on the fly.
- **[Document & data analysis →](./file-analysis)** — spreadsheets, PDFs, Word docs
- **[Web development →](./web-development)** — build and preview websites
- **[System automation →](./system-automation)** — file management, backups, batch operations

:::tip
Want a persistent environment on your real machine? [**cptr**](https://github.com/open-webui/computer) puts your computer in a browser tab, accessible from any device.
:::
4 changes: 4 additions & 0 deletions docs/features/open-terminal/use-cases/software-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ title: "Software Development"

Open Terminal enables the AI to interact with real codebases — cloning repos, running tests, reading errors, installing dependencies, and iterating on fixes.

:::tip
For a full development environment accessible from any device, see [**cptr**](https://github.com/open-webui/computer). Your computer in a browser tab.
:::

---

## Clone and explore a repo
Expand Down
4 changes: 4 additions & 0 deletions docs/features/open-terminal/use-cases/system-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ If a tool isn't installed, the AI can install it on the fly (`sudo apt install .
- **[Run code from chat →](./code-execution)** — the AI writes, runs, and debugs code
- **[Analyze documents & data →](./file-analysis)** — spreadsheets, PDFs, Word docs, emails
- **[Build & preview websites →](./web-development)** — create and iterate on web pages

:::tip
Want to automate tasks on your real machine from anywhere? [**cptr**](https://github.com/open-webui/computer) puts your computer in a browser tab, accessible from any device.
:::
4 changes: 4 additions & 0 deletions docs/features/open-terminal/use-cases/web-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ If the AI starts more than one server (say, a frontend on port 3000 and a backen
- **[Run code from chat →](./code-execution)** — the AI writes, runs, and debugs code
- **[Analyze documents & data →](./file-analysis)** — spreadsheets, PDFs, Word docs, emails
- **[Automate tasks →](./system-automation)** — file management, backups, batch operations

:::tip
Want to preview and iterate on websites from your phone? [**cptr**](https://github.com/open-webui/computer) gives you your whole machine in a browser tab, accessible from any device.
:::
57 changes: 36 additions & 21 deletions docs/getting-started/advanced-topics/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,27 +326,42 @@ For the full setup guide, see [OpenTelemetry Monitoring](/reference/monitoring/o

Here's what a production-ready scaled deployment typically looks like:

```
┌─────────────────────────────────────────────────────┐
│ Load Balancer │
│ (Nginx, HAProxy, Cloud LB) │
└──────────┬──────────┬──────────┬────────────────────┘
│ │ │
┌─────▼──┐ ┌─────▼──┐ ┌────▼───┐
│ WebUI │ │ WebUI │ │ WebUI │ ← Stateless containers
│ Pod 1 │ │ Pod 2 │ │ Pod N │
└───┬────┘ └───┬────┘ └───┬────┘
│ │ │
┌────▼──────────▼──────────▼────┐
│ PostgreSQL │ ← Shared database
│ (+ PGVector for RAG) │ ← Vector DB (or other Vector DB)
└───────────────────────────────┘
┌───────────────────────────────┐
│ Redis │ ← Shared state & websockets
└───────────────────────────────┘
┌───────────────────────────────┐
│ Shared Storage (NFS or S3) │ ← Shared file storage
└───────────────────────────────┘
```mermaid
flowchart TD
%% Main Flow
LB["Load Balancer<br/>(Nginx, HAProxy, Cloud LB)"]

subgraph Pods ["Stateless Containers"]
direction LR
P1["WebUI<br/>Pod 1"]
P2["WebUI<br/>Pod 2"]
PN["WebUI<br/>Pod N"]
end

subgraph Shared ["Shared Infrastructure"]
direction LR
DB[("PostgreSQL<br/>(+ PGVector for RAG)")]
Redis{{"Redis"}}
Storage[/"Shared Storage<br/>(NFS or S3)"/]
end

%% Annotations
DBNote["Shared database<br/>+ Vector DB"]
RedisNote["Shared state & websockets"]
StoreNote["Shared file storage"]

%% Connections
LB --> P1
LB --> P2
LB --> PN
P1 --> Shared
P2 --> Shared
PN --> Shared

%% Alignment Links
DB -.-> DBNote
Redis -.-> RedisNote
Storage -.-> StoreNote
```

**Running into issues?** The [Scaling & HA Troubleshooting](/troubleshooting/multi-replica) guide covers common problems (login loops, WebSocket failures, database locks, worker crashes) and their solutions. For performance tuning at scale, see [Optimization, Performance & RAM Usage](/troubleshooting/performance).
Expand Down
4 changes: 4 additions & 0 deletions docs/getting-started/essentials.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ More detail:
- [Open Terminal: give your AI a real computer](/features/open-terminal)
- [Use cases: software development, data reports, app builder, research assistant, and more](/features/open-terminal/use-cases/advanced-workflows/)

:::info
[**cptr**](https://github.com/open-webui/computer) (Open WebUI Computer) by the Open WebUI team is your entire computer in a browser tab: files, terminal, git, editor, and AI, accessible from any device. It connects to Open WebUI via its gateway API.
:::

---

## What to do next
Expand Down
16 changes: 16 additions & 0 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ Everything you need for a working setup. Choose Docker for the fastest path, Pyt

---

## 📱 Open WebUI as an App

**Already running Open WebUI? Install it as an app on any device.**

Open WebUI is a Progressive Web App (PWA). Add it to your phone's home screen, your desktop taskbar, or your dock. No separate download required. Get a full-screen, native-feeling experience from any browser.

| | |
| :--- | :--- |
| 📱 **iPhone / iPad** | Share → Add to Home Screen |
| 🤖 **Android** | Menu → Install app |
| 🖥️ **Chrome / Edge** | Address bar install icon |

[**Install as an app →**](/getting-started/open-webui-as-app)

---

## Essentials for Open WebUI

**Installed and chatting — now what?**
Expand Down
56 changes: 56 additions & 0 deletions docs/getting-started/open-webui-as-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
sidebar_position: 3
title: "Open WebUI as an App"
---

# Open WebUI as an App

Every Open WebUI instance is a **Progressive Web App (PWA)**. You can install it as a standalone app on your phone, tablet, or desktop, directly from the browser. No separate download required.

## What You Get

- **App icon** on your home screen, taskbar, or dock
- **Full-screen experience** with no browser toolbar or address bar
- **Standalone window** on desktop, full-screen on mobile
- **Separate from the browser** with its own window and task entry
- **Push notifications** (when enabled by your admin)

---

## Install on Your Device

### Chrome / Edge (Desktop)

1. Open your Open WebUI instance in Chrome or Edge.
2. Click the **install icon** (⊕) in the address bar, or go to **Menu → Install Open WebUI**.
3. Click **Install**.

Open WebUI now appears in your app launcher and runs in its own window.

### Chrome (Android)

1. Open your Open WebUI instance in Chrome.
2. Tap **Menu (⋮) → Add to Home Screen** or **Install app**.
3. Tap **Install**.

### Safari (iPhone / iPad)

1. Open your Open WebUI instance in Safari.
2. Tap the **Share button** (↑).
3. Scroll down and tap **Add to Home Screen**.
4. Tap **Add**.

:::info
Safari is the only browser that supports PWA installation on iOS. Chrome and Firefox on iOS cannot install PWAs.
:::

### Firefox (Android)

1. Open your Open WebUI instance in Firefox.
2. Tap **Menu (⋮) → Install**.

---

## Customizing the PWA (Admins)

Admins can white-label the PWA by pointing to a custom manifest with the [`EXTERNAL_PWA_MANIFEST_URL`](/reference/env-configuration#external_pwa_manifest_url) environment variable. This lets you set a custom app name, icon, and theme color.
160 changes: 160 additions & 0 deletions docs/getting-started/quick-start/connect-an-agent/cptr.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
---
sidebar_position: 0
title: "Open WebUI Computer (cptr)"
sidebar_label: "Open WebUI Computer (cptr)"
---

# Open WebUI Computer (cptr)

**Open WebUI Computer. Connect `cptr` to Open WebUI.**

[**cptr**](https://github.com/open-webui/computer) puts your computer in a browser tab. Files, terminal, git, editor, AI, accessible from any device. It runs on your machine and serves it to you over HTTP.

cptr exposes an **OpenAI-compatible gateway API** (`/v1/chat/completions`). Each workspace appears as a model in Open WebUI with full tool access: file operations, terminal commands, web search, and more.

:::info What You'll Need
- **cptr** installed on your machine (`pip install cptr` or `uvx cptr@latest run`)
- **Open WebUI** running (via Docker, pip, or desktop app)
- **~5 minutes** to complete this setup
:::

---

## Step 1: Install and Start cptr

If you haven't installed cptr yet:

```bash
pip install cptr
cptr run
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uvx cptr@latest run
```

cptr starts on port **8000** by default and opens in your browser.

To allow access from other devices on the network:

```bash
cptr run --host 0.0.0.0
```

---

## Step 2: Create an API Key

1. Open cptr in your browser.
2. Go to **Settings > Gateway**.
3. Enter a name for the key and click **Create Key**.
4. Copy the key (`sk-cptr-...`). You will only see it once.

The Gateway settings page also shows the **Base URL** for your instance (e.g., `http://localhost:8000/v1`).

---

## Step 3: Add the Connection in Open WebUI

1. Open Open WebUI in your browser.
2. Go to ⚙️ **Admin Settings** > **Connections** > **OpenAI**.
3. Click ➕ **Add Connection**.
4. Enter the following:

| Setting | Value |
|---|---|
| **URL** | `http://localhost:8000/v1` |
| **API Key** | The `sk-cptr-...` key from Step 2 |

5. Click the ✅ checkmark to verify, then **Save**.

:::tip Running Open WebUI in Docker?
Replace `localhost` with `host.docker.internal`:

```
http://host.docker.internal:8000/v1
```
:::

---

## Step 4: Configure Custom Headers (Recommended)

For the best experience, set up custom request headers so that Open WebUI passes conversation metadata to cptr. This enables proper session mapping (conversations stay in sync between both interfaces) and ensures background tasks like title generation are handled efficiently.

1. In Open WebUI, go to **Admin Settings > Connections**.
2. Find the cptr connection and click the **⋮** menu, then **Custom Headers**.
3. Paste the following:

```json
{
"X-OpenWebUI-Chat-Id": "{{CHAT_ID}}",
"X-OpenWebUI-Message-Id": "{{MESSAGE_ID}}",
"X-OpenWebUI-User-Message-Id": "{{USER_MESSAGE_ID}}",
"X-OpenWebUI-User-Message-Parent-Id": "{{USER_MESSAGE_PARENT_ID}}",
"X-OpenWebUI-Task": "{{TASK}}"
}
```

:::tip
You can copy these headers directly from cptr's **Settings > Gateway** page.
:::

---

## Step 5: Start Chatting

Your cptr workspaces should now appear in the model dropdown as `cptr/<workspace-name>`. Select one and start chatting. The AI has full access to that workspace: files, terminal, web search, and any configured tools.

Conversations are synced. Work done through Open WebUI appears in cptr's sidebar, and vice versa.

---

## Choosing a Gateway Model

By default, cptr uses the first available model connection for gateway requests. To use a specific model:

1. In cptr, go to **Settings > Gateway**.
2. Select a model from the dropdown.
3. Click **Save**.

You can also set a per-workspace model by creating a `.cptr/model` file in the workspace root:

```bash
echo "anthropic/claude-sonnet-4-20250514" > /path/to/workspace/.cptr/model
```

---

## Troubleshooting

### No models appear in the dropdown

- Verify the URL includes `/v1`: `http://localhost:8000/v1` (not just `:8000`)
- Check that cptr is running and accessible
- Confirm the API key is correct

### Connection test passes but no models load

Almost always the missing `/v1` suffix. Open WebUI's connection test checks basic connectivity, not model discovery.

### Docker networking issues

If Open WebUI runs in Docker, `localhost` points to the container itself. Use `host.docker.internal` instead. On Linux without Docker Desktop:

```bash
docker run --add-host=host.docker.internal:host-gateway ...
```

### Conversations not syncing

Make sure the custom headers from Step 4 are configured. Without them, cptr creates a new chat for each request instead of continuing the existing conversation.

---

## Learn More

- [cptr on GitHub](https://github.com/open-webui/computer)
- [Open WebUI Connections](/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible)
Loading
Loading