{"slug": "self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api", "title": "Self-hosted Open WebUI: an internal ChatGPT in front of Ollama or an OpenAI-compatible API", "summary": "A developer outlined how to self-host Open WebUI, a Python/Svelte web application that adds user accounts, conversation history, document management and model selection in front of Ollama or any OpenAI-compatible API such as vLLM or llama.cpp. The guide covers a Docker install on port 3000, connecting OpenAI-compatible backends via OPENAI_API_BASE_URL and OPENAI_API_KEY, hardening shared deployments with WEBUI_SECRET_KEY, a TLS proxy, OIDC and PostgreSQL, and monitoring through the /health endpoint, component-level logs and OpenTelemetry export correlated with the inference engine in Dynatrace.", "body_md": "Self-hosted Open WebUI is the most widely used chat interface for giving a team a ChatGPT-like experience while keeping data in-house. It sits in front of Ollama or any OpenAI-compatible API, such as a vLLM or llama.cpp server, and adds what a bare inference engine lacks: user accounts, conversation history, document management and model selection.\n\nIt is one of the most-followed open source projects on GitHub in its field, and it is often the first visible building block of an internal AI platform. That visibility has a direct consequence for operations teams: when the interface is slow, users cannot tell whether the problem lies in the browser, the application, the document search or the model. You need to be able to answer quickly.\n\nLet’s look at what Open WebUI offers, how to install it in a few minutes with Docker, and then how to monitor it: logs, health probe, OpenTelemetry export and correlation with the inference engine in a tool such as Dynatrace.\n\nOpen WebUI is a web application (Python backend, Svelte frontend) that provides:\n\nLimits to keep in mind: Open WebUI is not an inference engine. Its performance depends on the model backend and, for RAG, on the embedding model and the vector store. Its licence has also changed across versions, with a clause on branding: read it before a large-scale or white-label deployment.\n\nThe simplest case is Ollama running on the host, on port 11434. Our guide [Ollama locally](https://span.observer/en/ollama-local-llm-monitoring/) describes how to install it. Check that it responds:\n\n```\ncurl -s http://localhost:11434/api/tags\n```\n\nThe official documentation suggests a command like this one, which publishes the interface on port 3000 and keeps the data in a volume:\n\n```\ndocker run -d --name open-webui --restart always \\\n  -p 3000:8080 \\\n  --add-host=host.docker.internal:host-gateway \\\n  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \\\n  -v open-webui:/app/backend/data \\\n  ghcr.io/open-webui/open-webui:main\n```\n\nOther image variants exist (with Ollama bundled, with CUDA support). Installing with pip is also possible. The exact tags and commands are in the [Open WebUI documentation](https://docs.openwebui.com/).\n\nOpen `http://localhost:3000`: the first account created becomes the administrator. In the admin settings, check the connection to Ollama, choose which models are visible and decide whether new sign-ups are open, pending approval or closed.\n\nTo connect a vLLM or llama.cpp server, add an OpenAI connection in the admin settings, or pass the URL and key at start-up:\n\n```\n-e OPENAI_API_BASE_URL=http://vllm.interne:8000/v1 \\\n-e OPENAI_API_KEY=vllm-server-key\n```\n\nThe models exposed by that server then appear alongside Ollama’s. See [vLLM in production](https://span.observer/en/vllm-production-metrics/) for the server side.\n\nFor shared use, set a stable secret key for sessions (the `WEBUI_SECRET_KEY` variable), put the application behind a TLS reverse proxy, connect corporate authentication (OIDC is supported) and consider PostgreSQL instead of the default SQLite database. Back up the data volume: it holds accounts, conversations and documents.\n\nThe backend exposes a `/health` endpoint that a Kubernetes probe, a Docker healthcheck or an HTTP synthetic monitor can use. A browser monitor that logs in and opens a conversation also tests the real user journey.\n\n```\ndocker logs -f open-webui\n```\n\nThe level of detail is set through environment variables (a global level and per-component levels). The logs show calls to the model backends, connection errors and document processing for RAG. Avoid debug level in production: it can contain extracts of conversations.\n\nRecent versions of Open WebUI include OpenTelemetry instrumentation, enabled through environment variables: a general enable flag, then one flag per signal (traces, metrics, logs, all off by default) and the standard OTLP endpoint. An indicative example, to check against the « Observability » page of the documentation:\n\n```\n-e ENABLE_OTEL=true \\\n-e ENABLE_OTEL_TRACES=true \\\n-e OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317 \\\n-e OTEL_SERVICE_NAME=open-webui\n```\n\nYou get spans for the backend’s HTTP requests and its outbound calls (database, HTTP client towards the models). If the inference engine also emits traces, as vLLM does, W3C context propagation lets you follow a question from the interface all the way to the GPU.\n\nThe OpenTelemetry Collector receives Open WebUI’s traces and sends them to the Dynatrace OTLP endpoint with an API token. In parallel, OneAgent or the Collector gathers the container logs and host metrics, and the model backend’s metrics arrive through their own path. In the distributed traces you can then separate the time spent in the application, in document search and in generation. The method is the one from our article [end-to-end OpenTelemetry](https://span.observer/en/opentelemetry-end-to-end-dynatrace/), applied to an AI user journey.\n\nUseful indicators: `/health` availability, chat request latency, error rate towards each model backend, document indexing time, number of active users.\n\n`main` in production, and read the release notes before every update.\nYes. You just configure one or more connections to OpenAI-compatible APIs (vLLM, llama.cpp, a hosted service); Ollama is optional.\n\nYes, Open WebUI supports OIDC and other mechanisms described in its documentation, as well as group and permission management.\n\nRecent versions do, through environment variables. Check the exact names in the documentation for your version.\n\nOpen WebUI turns an inference engine into a service a whole team can use. It is also the first place where users notice a problem: instrument it from day one and link it to the model engine so you know where the time goes. To assemble the whole stack, read our [comparison of self-hosted open source AI stacks](https://span.observer/en/self-hosted-open-source-ai-stack/).\n\n*span.observer is an independent community blog, not affiliated with Dynatrace LLC or with the projects mentioned. Trademarks belong to their respective owners. Tools change quickly: check commands and options in their official documentation.*\n\n*Originally published on [span.observer](https://span.observer/en/self-hosted-open-webui-chatgpt/). French version: [https://span.observer/fr/open-webui-chatgpt-auto-heberge/](https://span.observer/fr/open-webui-chatgpt-auto-heberge/).*", "url": "https://wpnews.pro/news/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api", "canonical_source": "https://dev.to/spanobserver/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-compatible-api-3fg8", "published_at": "2026-11-23 15:30:20+00:00", "updated_at": "2026-11-23 15:44:11.204113+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "mlops", "ai-infrastructure", "developer-tools"], "entities": ["Open WebUI", "Ollama", "vLLM", "llama.cpp", "Dynatrace", "GitHub", "Docker", "PostgreSQL"], "also_reported_by": [], "takeaway": "Open WebUI's OpenTelemetry signals (traces, metrics, logs) are all off by default and must be enabled per-signal alongside the OTLP endpoint, and debug-level logging should be avoided in production because it can capture conversation extracts.", "recommendation": {"advice": "Enable Open WebUI's per-signal OpenTelemetry flags with an OTLP endpoint and keep logs below debug level in production, since debug output can contain conversation extracts.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api", "markdown": "https://wpnews.pro/news/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api.md", "text": "https://wpnews.pro/news/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api.txt", "jsonld": "https://wpnews.pro/news/self-hosted-open-webui-an-internal-chatgpt-in-front-of-ollama-or-an-openai-api.jsonld"}}