Installation of Open WebUI with Ollama
Open WebUI provides a browser-based user interface for local KI-models. In connection with Ollama, user can select models and use them via webbrowser.
This article shows the installation of Open WebUI as docker container. Ollama is operated natively on the same Ubuntu server.
Requirements
These instructions are designed for Ubuntu server 24.04 LTS. The following components must already be installed:
- Ollama in accordance with the article Installation of Ollama
- Docker in accordance with the article Docker Installation under Ubuntu 24.04
- At least one locally installed Ollama model
- User with
sudo-rights - Free TCP-Port
8080
Check the Ollama service:
sudo systemctl status ollama
If the connection is successful, a JSON response containing the installed models is returned.
If no model is available, download, for example, gemma3:4b:
ollama pull gemma3:4b
Check the docker installation:
sudo docker version
Install WebUI
Open WebUI runs in a docker container. As Ollama is natively installed on the same server, the container with the host network is started.
Start WebUI:
sudo docker run -d \
--network=host \
-v open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
The Docker volume open-webui stores user accounts, settings and chat histories permanently.
The main tag refers to the current version. For the productive operation, a fixed version number should be used after the test has been successful.
Check the container status:
sudo docker ps --filter name=open-webui
If necessary, view the startup logs:
sudo docker logs --tail=100 open-webui
Open web interface
Open the following address in a browser:
http://<IP-DES-SERVERS>:8080
The first user account created on a new installation is granted administrator privileges.
Log in and select gemma3:4b from the model selection.
Send, for example, the following request:
- Explain the difference between RAID 5 und RAID 6.
If the model responds, the connection between Open WebUI and Ollama functions.
Check Ollama connection
If no models are displayed, open the following in Open WebUI:
Admin Panel > Settings > Connections
The Ollama address should point to the following URL:
In addition, check the Ubuntu server:
curl http://127.0.0.1:11434/api/tags
As Open WebUI is started with --network=host, the container can use the local Ollama address directly.
Update Open WebUI
Load the current container image:
sudo docker pull ghcr.io/open-webui/open-webui:main
Stop and remove the previous container:
sudo docker stop open-webui
sudo docker rm open-webui
After that, restart Open WebUI:
sudo docker run -d \
--network=host \
-v open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
The data in the docker volume open-webui is retained.
Secure access
Open WebUI uses user accounts. Nevertheless, port 8080 should not be accessible from the Internet without protection.
A VPN or a reverse proxy with HTTPS is recommended for the access from the Internet. For a reverse proxy, WebSockets support must be enabled.
For purely internal use, access can be restricted to the local network using UFW:
sudo ufw allow from 192.168.1.0/24 to any port 8080 proto tcp
Adapt the subnet to your own environment:
Troubleshooting
Websurface is not available
Check the container status:
sudo docker ps -a --filter name=open-webui
View the logs:
sudo docker logs open-webui
Verify, if port 8080 is already used:
sudo ss -tulpn | grep 8080
No models are displayed
Check the installed Ollama models:
ollama ls
Check Ollama API:
curl http://127.0.0.1:11434/api/tags
Restart both services if necessary:
sudo systemctl restart ollama
sudo docker restart open-webui
Page is not displayed correctly after an update
Open the web interface in a private browser window to test it. If it works there, delete the cache and the website data for the Open-WebUI-address.
Deinstallation
Stop and remove the container:
sudo docker stop open-webui
sudo docker rm open-webui
The stored data remains in the Docker volume for the time being.
Remove the volume to delete all Open-WebUI-data completely:
sudo docker volume rm open-webui
Attention: User accounts, settings and chat histories are completely deleted.
Sources
- Open WebUI Documentation – Quick Start (en)
- Open WebUI Documentation – Ollama (en)
- Open WebUI Documentation – Connection Errors (en)
- Docker Installation on Ubuntu 24.04
- Ollama Documentation – API Introduction (en)
Author: Florian Müller
|
Translator: Alina Ranzinger Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.
|

