This tutorial will guide you through installing Open WebUI connected to a PostgreSQL database (with the "vector" extension) and an Olama server.
He also explains how to install caddy, docling and glances It uses Docker images and stores data on disk in separate directories within /var/lib/owebui.
-
Add ppa to your system
sudo add-apt-repository ppa:sgallet/open-webui-tools
sudo apt update
-
Remove Docker installed by Ubuntu
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
-
Install dependency package.
This will add the Docker, AMD Container Toolkit and NVIDIA Container Toolkit APT sources to your system.
This package must be installed separately before installing other packages.
sudo apt install open-webui-deps
-
Now you can installs main components.
sudo apt install open-webui
Check status
sudo owebui status
open-webui-postgresql : activating open-webui-ollama : activating open-webui-app : inactive -
Configure.
Modify the Docker images and configuration settings according to your hardware and needs.
You can edit the files open-webui-app.conf, open-webui-ollama.conf, open-webui-postgresql.conf directly or put your changes in open-webui-local.conf(this file has priority and is recommended) in /etc/open-webui.
You can define environment variable to pass to docker container by prefixing them with (service)_. For example, to change the logging level for the Open WebUI application, set app_GLOBAL_LOG_LEVEL=WARNING
Look at documentations for environment Variables of OpenWeb UI, Ollama and Postgresql
-
Update and start.
Update your installation. Following command will download all docker images and models defined in configuration.
sudo owebui update --force --models --restart
Update POSTGRES_IMAGE for open-webui-postgresql Image pgvector/pgvector:pg18-trixie not found. Download it Id for pgvector/pgvector:pg18-trixie : 'sha256:cdc8b3de66a0fbffceef90077fde8845a2346034ad8f309f4022a84039fed955 Service open-webui-postgresql restarted after update Update OLLAMA_IMAGE for open-webui-ollama Image ollama/ollama not found. Download it Id for ollama/ollama : 'sha256:f2de8ed54c7b02ee05e42abaa454978c76fb552a883877b37588ebb62f31e41a Service open-webui-ollama restarted after update Install ollama models Install model llama3.2 Update OWEBUI_IMAGE for open-webui-app Image ghcr.io/open-webui/open-webui:cuda not found. Download it Id for ghcr.io/open-webui/open-webui:cuda : 'sha256:a301ed36e18a3507ec4f6edcdbff67bc7ef7a9f07824ac4c240799371dc75dfe Service open-webui-app restarted after update -
That's all
All services should be operational
sudo owebui status
open-webui-postgresql : active open-webui-ollama : active open-webui-app : activeYou can now connect to http://127.0.0.1:8080
-
Automatic update of the docker images
You can enable them using :
sudo owebui update-enable
Started open-webui-postgresql-update timer Started open-webui-ollama-update timer Started open-webui-app-update timerAnd check status using :
sudo owebui update-status
open-webui-postgresql : active (inactive) - Last run at Sun 2026-03-08 03:18:48 CET; 30s ago open-webui-ollama : active (inactive) - Last run at Sun 2026-03-08 03:18:48 CET; 30s ago open-webui-app : active (inactive) - Last run at Sun 2026-03-08 03:18:48 CET; 30s ago -
If you plan to connect from outside, it is recommended to use a frontend like Caddy.
sudo apt install open-webui-caddy
Update the Caddyfile in /etc/open-webui. {APP_IP} and {APP_PORT} will be replaced with the appropriate values when the service starts.
If you want to proxy glances server, {GLANCES_IP} and {GLANCES_PORT} will be replaced too.
You can find more documentation here : https://caddyserver.com/docs/caddyfile
Download docker image and start service
sudo owebui update --restart caddy
Check status
sudo owebui status
open-webui-postgresql : active open-webui-ollama : active open-webui-app : active open-webui-caddy : active -
If you plan to do OCR, it is possible to install Docling.
sudo apt install open-webui-docling
By default, only english language is supported
If you need other language, add the following conf :
DOCLING_IMAGE_SRC=ghcr.io/docling-project/docling-serve-cpu:latest DOCLING_IMAGE_LANGS="eng,fra,deu" DOCLING_IMAGE=open-webui-docling-localThis will update the DOCLING_IMAGE_SRC image adding needed files needed by tesseract for your langs (DOCLING_IMAGE_LANGS) and update your local image (DOCLING_IMAGE).
Update your system to apply your changes
sudo owebui update --restart --force docling
This will create a basic DOCLING_PARAMS environment variable. You can define more complex defining app_DOCLING_PARAMS yourself.
Check status
sudo owebui status
open-webui-postgresql : active open-webui-ollama : active open-webui-app : active open-webui-docling : active -
Customize your installation.
You can change user/group and directories creating a /etc/default/open-webui before installing anything (before owebui-deps). Use the one in sources as a template
For example :
sudo vim /etc/default/open-webui
# Defaults for open-webui OWEBUI_USER=owebui OWEBUI_GROUP=owebui OWEBUI_HOME=/home/owebui OWEBUI_APP=/home/owebui/app OWEBUI_OLLAMA=/home/owebui/ollama OWEBUI_CADDY=/home/owebui/caddy OWEBUI_POSTGRESQL=/home/owebui/postgresql OWEBUI_SHARE=/home/owebui/share OWEBUI_NAME="Open WebUI"After installing installinf owebui-deps, create /etc/open-webui/open-webui-local.conf
For example :
sudo vim /etc/default/open-webui
# Local configuration for open-webui # You can overwrite all configutation parameters in this file # Add environment variables here app_DEFAULT_LOCALE=fr app_PDF_EXTRACT_IMAGES=true app_RAG_TEXT_SPLITTER=token app_CHUNK_SIZE=1024 app_CHUNK_OVERLAP=200 app_CHUNK_MIN_SIZE_TARGET=500 app_RAG_TOP_K=10 app_ENABLE_RAG_HYBRID_SEARCH=true app_RAG_EMBEDDING_MODEL=BAAI/bge-m3 app_RAG_RELEVANCE_THRESHOLD=0.3 app_RAG_RERANKING_MODEL=BAAI/bge-reranker-v2-m3 app_API_KEYS=true OLLAMA_MODELS=llama3.2 DOCLING_IMAGE_SRC=ghcr.io/docling-project/docling-serve-cpu:latest DOCLING_IMAGE_LANGS="eng,fra,deu" DOCLING_IMAGE=open-webui-docling-local DOCLING_DEVICE= OWEBUI_IMAGE=ghcr.io/open-webui/open-webui:main-slim OWEBUI_DEVICE= -
You can monitor resources on your hosts with open-webui-glances
Look at https://github.com/nicolargo/glances for more informations
sudo apt install open-webui-glances
sudo owebui update --force --restart glances
Check status
sudo owebui status
open-webui-postgresql : active open-webui-ollama : active open-webui-app : active open-webui-glances : activeAnd connect to http://127.0.0.1:61208