OpenWebUI Ansible role https://openwebui.com/
This repository has been archived on 2026-10-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-09 08:19:18 +00:00
.gitea/workflows feat: added first running version 2026-09-08 13:10:36 +02:00
defaults feat: added jupyter and search 2026-09-09 10:18:08 +02:00
handlers feat: added jupyter and search 2026-09-09 10:18:08 +02:00
meta feat: initial Open WebUI deployment 2026-09-08 13:05:31 +02:00
tasks feat: added jupyter and search 2026-09-09 10:18:08 +02:00
templates feat: added jupyter and search 2026-09-09 10:18:08 +02:00
CHANGELOG.md feat: added jupyter and search 2026-09-09 10:18:08 +02:00
LICENSE feat: initial Open WebUI deployment 2026-09-08 13:05:31 +02:00
README.md Prettified Code! 2026-09-09 08:19:18 +00:00

Open WebUI

Deploys Open WebUI — a self-hosted ChatGPT-style UI — via Docker Compose, pointed at an OpenAI-compatible backend (litellm) instead of bundling Ollama.

Requirements

  • Docker
  • community.docker Ansible collection (>=5.2.0)

Variables

Variable Default Description
openwebui_instance openwebui Unique instance name. Used as Compose project name and container name.
openwebui_data_path /data/openwebui Host path for persistent data (SQLite DB, uploads, embedded Chroma vector store).
openwebui_docker_path /docker/openwebui Host path for the Compose file.
openwebui_image ghcr.io/open-webui/open-webui Open WebUI image. Override for a private mirror/registry.
openwebui_version v0.11.3 Open WebUI image tag. Pin to a specific version in production.
openwebui_domain ~ Public domain. When set, enables Traefik routing labels and attaches to the traefik_web network.
openwebui_traefik_certresolver default Traefik certificate resolver to use for openwebui_domain.
openwebui_port ~ When set, exposes Open WebUI on this host port (maps to container port 8080). Omit when using openwebui_domain.
openwebui_secret_key ~ Signs session/auth tokens. Required. Set once, never change - rotating it logs out every user. Generate with: openssl rand -hex 32
openwebui_enable_signup false Public self-service signup. Off by default (invite-only, matching the rest of this fleet). The very first account ever created becomes admin - flip this on briefly for that signup, then back off.
openwebui_openai_api_base_url http://litellm:4000/v1 OpenAI-compatible backend. Defaults to litellm on the shared traefik_web network.
openwebui_openai_api_key ~ Required. litellm virtual key (or master key) to authenticate with.
openwebui_rag_embedding_engine openai File-upload RAG embeddings backend.
openwebui_rag_openai_api_base_url (openwebui_openai_api_base_url) Embeddings endpoint.
openwebui_rag_openai_api_key (openwebui_openai_api_key) Embeddings API key.
openwebui_rag_embedding_model qwen3-embedding-0.6b Must match a model_name litellm actually serves.
openwebui_websearch_enabled true Deploys a bundled, internal-only SearXNG instance for web search.
openwebui_searxng_image / openwebui_searxng_version searxng/searxng / 2026.9.2-05cd77f71 SearXNG image and tag. SearXNG doesn't do semver - pin a dated tag.
openwebui_searxng_secret_key ~ Required when openwebui_websearch_enabled. Generate with: openssl rand -hex 32
openwebui_jupyter_enabled true Deploys a bundled, internal-only Jupyter server, wired into Open WebUI's native Code Execution and Code Interpreter features.
openwebui_jupyter_image / openwebui_jupyter_version quay.io/jupyter/minimal-notebook / 2026-02-09 Jupyter image and tag. jupyter/docker-stacks publishes to quay.io, not Docker Hub, since 2023.
openwebui_jupyter_token ~ Required when openwebui_jupyter_enabled. Generate with: openssl rand -hex 32
openwebui_env_extra {} Dict of extra environment variables (OAuth/SSO, DATABASE_URL/VECTOR_DB to move off SQLite, etc.) - see the env reference.
openwebui_uninstall false Stops and removes containers and the compose directory.
openwebui_purge false Also removes the data directory. Requires openwebui_uninstall: true. Irreversible.

Usage

Minimal setup:

openwebui_secret_key: "{{ vault_openwebui_secret_key }}"
openwebui_openai_api_key: "{{ vault_openwebui_openai_api_key }}"
openwebui_domain: "webui.example.com"

First-run admin signup: temporarily set openwebui_enable_signup: true, deploy, sign up once (that account becomes admin), then set it back to false and redeploy.

Without a reverse proxy (direct host port instead of openwebui_domain):

openwebui_port: 8080

Web search and code execution are on by default, each deploying one more bundled container (searxng, jupyter) and requiring their own secret:

openwebui_searxng_secret_key: "{{ vault_openwebui_searxng_secret_key }}"
openwebui_jupyter_token: "{{ vault_openwebui_jupyter_token }}"

Set openwebui_websearch_enabled: false and/or openwebui_jupyter_enabled: false to skip either (Open WebUI still works without them - no web search, and code execution falls back to its own built-in in-browser Pyodide engine instead of Jupyter).

Uninstall

openwebui_uninstall: true

Add openwebui_purge: true to also delete the database and uploaded files.

Notes

  • No bundled Ollama. This fleet never talks to real upstream providers directly - every model call goes through litellm, which is itself the only thing allowed to reach real providers (or, here, the internal vLLM boxes). Bundling Ollama would just be a second, redundant model-serving path.
  • SQLite + embedded Chroma, not Postgres/pgvector/Redis. Those only start mattering once you run multiple Open WebUI replicas behind a load balancer (session/websocket coordination, fork-unsafe SQLite under multiple workers). This role runs a single instance, so they're deliberately left out to keep the stack minimal - add them yourself via openwebui_env_extra (DATABASE_URL, VECTOR_DB=pgvector + PGVECTOR_DB_URL, REDIS_URL) if you ever do scale out.
  • Runs as root inside the container. Open WebUI's published image writes to its own static assets on every boot and isn't reliably usable as a non-root/arbitrary UID without rebuilding the image with permission-hardening build args - not attempted here. The data directory is bind-mounted rather than a named volume (see the parent repo's docs/storage.md for why named volumes are avoided in this fleet).
  • Embeddings never leave the network. RAG_EMBEDDING_ENGINE=openai is pointed at litellm's own qwen3-embedding-0.6b deployment, instead of the upstream default of downloading a sentence-transformers model from HuggingFace on first use - that would both hit the real internet and duplicate a model litellm already serves.
  • Telemetry disabled by default (ANONYMIZED_TELEMETRY, DO_NOT_TRACK, SCARF_NO_ANALYTICS, ENABLE_VERSION_UPDATE_CHECK) - same "nothing leaves this network" posture as the rest of the fleet.
  • All config is inline environment:, not a bind-mounted .env/config file, on purpose. docker_compose_v2's recreate-on-change detection only sees changes that are part of the compose file's own resolved config - a separately bind-mounted config file can change on disk without the running container ever picking it up (this bit both librechat and, before a handler was added, litellm in this fleet). Every setting here is a plain environment: entry, so a value change is always part of compose's own diff and always triggers a real recreate - no handler required.
  • Containers are not proxied by Traefik unless openwebui_domain is set - it must already have a traefik_web network and a matching certresolver (see the traefik role).
  • SearXNG and Jupyter are internal-only by design - no host port, not attached to traefik_web, reachable only from the open-webui container on this role's own internal compose network. Neither is meant to be reached directly by a person.
  • This is a deliberate, narrower exception to "nothing leaves this network." SearXNG needs real internet access to actually search, and code run through Jupyter can too (e.g. pip install inside a notebook). That's different from the rest of this fleet's rule, which is specifically about not sending model/conversation traffic to a real LLM provider - fetching public web pages or installing a package is not that. If you don't want either capability at all, set the corresponding _enabled flag to false rather than leaving it running unused.
  • SearXNG's bot-detection limiter is disabled on purpose (limiter: false in the rendered settings.yml). It exists to protect a publicly-reachable instance from scraping/abuse; here it would otherwise return 403 Forbidden to Open WebUI's own JSON query requests, since those don't look like a browser. Safe to disable specifically because this instance is never publicly reachable in the first place.
  • settings.yml is a plain bind-mounted file, not part of the compose service definition - same reasoning as the "inline environment:" note above, and it bit this file before it shipped: a handler (Restart searxng) forces a recreate whenever the rendered file changes, since docker_compose_v2 alone won't notice.
  • Jupyter's image lives on quay.io, not Docker Hub. jupyter/docker-stacks stopped publishing to jupyter/minimal-notebook on Docker Hub in October 2023 - that tag still resolves, but is permanently frozen at a 2023-era image. quay.io/jupyter/minimal-notebook is the current, actively-maintained equivalent.