# Add a Browser Interface to Ollama with Open WebUI

Source: https://docs.quake.ai/resources/deployments/add-browser-ui-to-ollama
Markdown: https://docs.quake.ai/resources/deployments/add-browser-ui-to-ollama.md

---

# Add a browser interface to ollama with open webui

Stand up [Open WebUI](https://openwebui.com) on the same Quake AI instance as [Ollama](/resources/deployments/run-local-llm). Open WebUI provides a browser chat UI with conversation history, model switching, and file uploads, backed by models on your instance.

<PricingCompanion
  components={[
    { kind: "primitive", required: true, label: "Open WebUI host instance", vm: { flavor: "m2a.large" } },
  ]}
/>

## Prerequisites

- Ollama running with at least one model on your instance ([Run a local LLM](/resources/deployments/run-local-llm))
- Port 8080 open in your security group (restricted to your IP)

## Step 1: Install Docker

Install Docker if the Ollama host does not already have it:

```bash
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
```

Verify the install:

```bash
docker --version
```

## Step 2: Run Open WebUI

Deploy Open WebUI alongside Ollama using Docker:

```bash
docker run -d \
  --name open-webui \
  --restart unless-stopped \
  --network host \
  -v open-webui-data:/app/backend/data \
  -e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
  ghcr.io/open-webui/open-webui:main
```

The `--network host` flag lets the container reach Ollama directly on `127.0.0.1:11434` without extra networking configuration, and publishes the container's default port 8080 on the host. The security-group rule from the prerequisites covers external access without an additional port mapping. Data (conversations, settings, user accounts) persists in the `open-webui-data` Docker volume.

## Step 3: create your admin account

Open `http://YOUR_FLOATING_IP:8080` in your browser.

On first launch, Open WebUI prompts you to create an admin account. This account controls access for all users. Choose a strong password. Subsequent users who sign up receive a "pending" role until an admin approves them.

## Step 4: start a conversation

Select a model from the dropdown at the top of the chat interface. All models you have pulled with `ollama pull` appear here automatically. Open WebUI polls Ollama's `/api/tags` endpoint on load, so new models appear without restarting anything.

Type a message and verify the response. If the interface shows a connection error:

```bash
docker logs open-webui
```

Common cause: Ollama is not binding to `127.0.0.1:11434`. Confirm with:

```bash
curl http://localhost:11434/api/tags
```

## Step 5: enable file uploads for RAG (optional)

Open WebUI includes a built-in RAG pipeline. To use it:

1. Open **Admin Panel → Documents**
2. Configure the embedding model: select an Ollama model (e.g., `nomic-embed-text`)
3. Upload files from the chat interface using the paperclip icon

Open WebUI chunks, embeds, and stores the documents in its local SQLite database. This is suitable for personal use and small teams. For larger-scale or shared RAG pipelines, use [Qdrant and LangChain](/resources/deployments/deploy-rag-pipeline) instead.

## Managing users

By default, Open WebUI requires all new users to be approved by an admin before they can chat. Navigate to **Admin Panel → Users** to manage roles and approve pending accounts.

For team deployments where you want all users to have immediate access, set the default role to `user` in **Admin Panel → Settings → General**.

## Updating open WebUI

Pull the latest image and recreate the container:

```bash
docker pull ghcr.io/open-webui/open-webui:main
docker stop open-webui
docker rm open-webui
docker run -d \
  --name open-webui \
  --restart unless-stopped \
  --network host \
  -v open-webui-data:/app/backend/data \
  -e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
  ghcr.io/open-webui/open-webui:main
```

The `-v open-webui-data:/app/backend/data` volume preserves all conversations, settings, and user accounts across updates.

## Using Docker compose

If you want to manage Ollama and Open WebUI together, a compose file keeps both services co-located:

```yaml
services:
  ollama:
    image: ollama/ollama
    restart: unless-stopped
    network_mode: host
    volumes:
      - ollama-data:/root/.ollama

  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    restart: unless-stopped
    network_mode: host
    volumes:
      - open-webui-data:/app/backend/data
    environment:
      - OLLAMA_BASE_URL=http://127.0.0.1:11434
    depends_on:
      - ollama

volumes:
  ollama-data:
  open-webui-data:
```

Save as `~/ai-stack/docker-compose.yml` and start with `docker compose up -d`. Pull models through the Open WebUI interface or from the terminal:

```bash
docker exec ollama ollama pull llama3.2
```

## Next steps

- [Run a local LLM with Ollama](/resources/deployments/run-local-llm)
- [Build a RAG pipeline](/resources/deployments/deploy-rag-pipeline): production-grade retrieval with Qdrant
- [Deploy Qdrant](/resources/deployments/deploy-vector-database)

## Clean up

Stop and remove the Open WebUI container when finished:

```bash
docker stop open-webui && docker rm open-webui
```

The `open-webui-data` volume retains conversations until you remove it with `docker volume rm open-webui-data`.
