# Open Web UI & Ollama Integration

{% hint style="info" %}
<https://github.com/open-webui/open-webui>
{% endhint %}

<figure><img src="/files/G6JXKhKpA5v5ZhVZz5lS" alt=""><figcaption><p>Open Web UI Interface</p></figcaption></figure>

There are multiple modes of deployment but as we have installed ollama LLMs locally we will use the installation method to use docker UI & host based LLMs

```
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
```

After the docker instance is sucessfullt launched we will have to edit some service configuration to make ollama available on the "everywhere" mode

```
$> systemctl edit ollama.service
```

<figure><img src="/files/mVa6KNygIY0DalzJr8WD" alt=""><figcaption></figcaption></figure>

We will add two lines in the config file to allow "0.0.0.0:11434" interface to access ollama

```
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
```

Save the file & exit and now we will reload the service to make changes reflected&#x20;

```
$> sudo systemctl daemon-reload
$> sudo systemctl restart ollama.service
```

To verify the changes are sucessfully reflected back we will open the following URL

```
curl -l http://localhost:11434

// THE OUTPUT SHOULD BE //
ollama is running
```

***

#### Setting UFW Firewall

```
sudo ufw allow 3000
sudo ufw allow 11434
sudo ufw allow 80
```

***

#### Accessing the web UI

```
http://localhost:3000/auth
```

<figure><img src="/files/QX01GSiCJxmJTla79Sby" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/zeCOBSfkc0hmvONQrLms" alt=""><figcaption></figcaption></figure>

& Here we go , Our local LLM with Open WebUI interface is running .....

***

For other modes of installation we can refer to the ollama & open webUI documentation&#x20;

{% hint style="info" %}
<https://docs.openwebui.com/features/>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ghoulsec.gitbook.io/ghoulsec-vault/dan-the-ai-expert/ollama-ollama-.../ollama/open-web-ui-and-ollama-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
