openwebui-layer
Recipe card from the charly-openwebui plugin (Images — the deployable catalog).
openwebui – Open WebUI with auto-configuration
Section titled “openwebui – Open WebUI with auto-configuration”Candy Properties
Section titled “Candy Properties”| Property | Value |
|---|---|
| Dependencies | python, supervisord |
| Volumes | data -> /opt/data |
| Ports | 8080 |
| Aliases | open-webui -> open-webui |
| Services | openwebui (supervisord, autostart) |
| Install files | pixi.toml, task:, openwebui-entrypoint |
Environment Variables
Section titled “Environment Variables”| Variable | Value |
|---|---|
DATA_DIR |
/opt/data |
PORT |
8080 |
DOCKER |
true |
ENABLE_CODE_EXECUTION |
true |
ENABLE_PERSISTENT_CONFIG |
false |
Optional Environment Variables (env_accept)
Section titled “Optional Environment Variables (env_accept)”Providers are wired by NAME: a provide is injected only into a consumer that declares the
same name in env_accept, so these entries must carry the provider’s name verbatim.
| Variable | Description |
|---|---|
OLLAMA_HOST |
Local Ollama server URL (auto-injected by ollama candy env_provide) |
OPENAI_API_BASE_URL |
OpenAI-compatible API base URL |
WEBUI_AUTH |
Enable authentication (default: true) |
CHARLY_MCP_SERVERS |
JSON array of MCP servers (auto-injected by mcp_provide candies) |
CODE_EXECUTION_JUPYTER_AUTH_TOKEN |
Jupyter auth token for the code-execution engine (auto-injected by a jupyter candy env_provide) |
COMFYUI_BASE_URL |
ComfyUI server base URL, e.g. http://charly-comfyui-lab:8188 — see Image generation and editing below |
ENABLE_IMAGE_GENERATION |
Turn image generation on (true) once COMFYUI_BASE_URL and a workflow are present |
COMFYUI_WORKFLOW / COMFYUI_WORKFLOW_B64 |
API-format generation workflow JSON, or its base64 transport from a comfyui env_provide; the entrypoint decodes B64 when the plain value is unset |
COMFYUI_WORKFLOW_NODES |
JSON array of node-mapping objects (prompt/width/height/n/seed; negative_prompt/steps are unsafe and inlined in the workflow; no static value nodes, #28) |
IMAGE_SIZE / IMAGE_STEPS |
Default size and steps (upstream names) |
IMAGES_EDIT_COMFYUI_BASE_URL |
ComfyUI URL for editing; defaults to COMFYUI_BASE_URL |
ENABLE_IMAGE_EDIT / IMAGE_EDIT_ENGINE |
Edit enable and engine; derived when an edit URL + edit workflow resolve |
IMAGES_EDIT_COMFYUI_WORKFLOW / IMAGES_EDIT_COMFYUI_WORKFLOW_B64 |
API-format edit workflow JSON or its base64 transport |
IMAGES_EDIT_COMFYUI_WORKFLOW_NODES |
JSON array of node-mapping objects — map ONLY image and prompt (plus optional seed) |
IMAGE_EDIT_MODEL / IMAGE_EDIT_SIZE |
Optional edit model/size; empty is correct for ComfyUI |
QWEN3_TTS_HOST / QWEN3_TTS_SERVED_MODEL / QWEN3_TTS_VOICE |
Speech synthesis provider (auto-injected by a qwen3-tts candy env_provide) |
WHISPER_BASE_URL / WHISPER_MODEL |
Whisper ASR provider (auto-injected by the whisper candy env_provide) |
QDRANT_URL |
Qdrant REST endpoint (auto-injected by the qdrant layer env_provide); with a resolved QDRANT_API_KEY it moves the RAG vector store to Qdrant — see Vector store below |
QDRANT_ON_DISK / QDRANT_COLLECTION_PREFIX / QDRANT_PREFER_GRPC / QDRANT_GRPC_PORT / ENABLE_QDRANT_MULTITENANCY_MODE / QDRANT_TIMEOUT |
Optional Qdrant pass-throughs, upstream names verbatim (defaults: off, open-webui, off, 6334, on, 5) |
WEBUI_ADMIN_EMAIL is env_require (mandatory, plaintext config), not an accepted
variable.
Credential-backed Variables (secret_accept)
Section titled “Credential-backed Variables (secret_accept)”These resolve from the credential store and arrive as podman secrets
(Secret=…,type=env,target=<VAR>) — never plaintext in charly.yml or the quadlet. The
key: column is the store coordinate; several candies sharing one upstream credential all
resolve to the same stored value.
| Variable | Store key |
|---|---|
OPENROUTER_API_KEY |
charly/api-key/openrouter |
OLLAMA_API_KEY |
charly/api-key/ollama |
OPENAI_API_KEY |
charly/api-key/openai |
WHISPER_API_KEY |
charly/api-key/whisper |
QDRANT_API_KEY |
charly/api-key/qdrant (generated by the qdrant layer’s secret_require) |
COMFYUI_API_KEY / IMAGES_EDIT_COMFYUI_API_KEY |
charly/api-key/comfyui |
An optional secret_accept that does not resolve is silently omitted, which is why the
entrypoint treats QDRANT_URL without QDRANT_API_KEY as a startup error rather than a
degraded mode.
Image generation and editing (ComfyUI)
Section titled “Image generation and editing (ComfyUI)”Open Web UI 0.13.4 keeps generation and editing in SEPARATE connections. The candy sets
IMAGE_GENERATION_ENGINE=comfyui and IMAGE_EDIT_ENGINE=comfyui as image defaults; the URLs
and workflows are per deploy. The entrypoint derives ENABLE_IMAGE_GENERATION when
COMFYUI_BASE_URL + COMFYUI_WORKFLOW resolve, and ENABLE_IMAGE_EDIT when
IMAGES_EDIT_COMFYUI_BASE_URL + IMAGES_EDIT_COMFYUI_WORKFLOW resolve. A deploy with no
ComfyUI behind it never advertises a broken feature.
A comfyui candy env_provides the URLs, IMAGE_SIZE/IMAGE_STEPS, and the workflow JSON.
Raw JSON cannot ride env_provide (the provider validates Go-template braces), so the provider
ships COMFYUI_WORKFLOW_B64 / IMAGES_EDIT_COMFYUI_WORKFLOW_B64; the entrypoint base64-decodes
them into the real variables. An operator’s explicit COMFYUI_WORKFLOW wins. The node
mappings are JSON arrays of objects.
Edit is narrower than generation: the 0.13.4 edit payload never carries steps,
negative_prompt, or guaranteed width/height, so map ONLY image and prompt (plus
optional seed) and inline everything else in edit_workflow. A negative_prompt map raises
AttributeError; a steps/width/height map writes None.
#28 workaround. Upstream _workflow_nodes drops a static node’s value on every
normalization path, so never put constants in a static node. Inline them in the workflow JSON
and keep only typed dynamic nodes. Tracked in opencharly/pod-openwebui#28; no fork.
OpenAI edit suppression. IMAGES_EDIT_OPENAI_API_KEY/BASE_URL default to the chat
provider. With IMAGE_EDIT_ENGINE=comfyui the entrypoint exports them empty so a second,
bogus OpenAI edit connection is not synthesized.
Both pods must share a pod network for http://<comfyui-deploy>:8188 to resolve. With
ENABLE_PERSISTENT_CONFIG=false (the candy default) the connection is re-derived from env on
every start; the SQLite images.connections row is ignored.
Deep links for the bundled ComfyUI templates (the #<uuid> form is not a route):
http://localhost:8188/?template=image_qwen_image_2_1_turbo_t2i&source=defaulthttp://localhost:8188/?template=image_qwen_image_edit_2511_int8&source=defaulthttp://localhost:8188/?template=image_z_image_turbo_int8&source=defaultMCP Accepts
Section titled “MCP Accepts”| Name | Description |
|---|---|
chrome-devtools |
Chrome DevTools MCP server for browser automation |
Secrets (Two-Tier Architecture)
Section titled “Secrets (Two-Tier Architecture)”Tier 1: Infrastructure secrets (podman secrets via secret: field)
Section titled “Tier 1: Infrastructure secrets (podman secrets via secret: field)”Auto-generated, stored in credential store (keyring/config-file fallback):
| Secret | Env Fallback | Purpose | Auto-gen path |
|---|---|---|---|
webui-secret-key |
WEBUI_SECRET_KEY |
JWT + encryption key (CRITICAL: losing it breaks all sessions and OAuth tokens) | charly config time, ProvisionPodmanSecrets |
admin-password |
WEBUI_ADMIN_PASSWORD |
Admin account password — declared as secret_require: |
charly deploy add time, ensureCandySecret |
Provisioned as Secret=charly-openwebui-<name>,type=env,target=<ENV> in the quadlet. The entrypoint checks env vars first (from type=env injection), then file mounts at /run/secrets/ as fallback.
First-run admin login: WEBUI_ADMIN_PASSWORD is required. It auto-generates as 32 random
bytes in url-safe base64 (44 characters) — the shape deploykit.GenerateAndStoreSecret produces —
when the deploy runs with --password=auto; without that flag charly config stops on
missing required credential-backed secret(s) and the value must be stored first. (Making the pod
path generate unconditionally, as the VM/host path already does, is
opencharly/plugin-deploy-pod#62.) To retrieve the stored password and log in for the first time:
charly secrets get charly/secret WEBUI_ADMIN_PASSWORDThat key is host-global today: every deployment of this candy (and every check-* bed) writes
the same one, so the last deploy wins — opencharly/pod-openwebui#19 tracks scoping it per deploy.
Override with a specific password before the first deploy:
charly secrets set charly/secret WEBUI_ADMIN_PASSWORD <password>charly config openwebui # picks up the overrideTier 2: User API keys (GPG-encrypted .secrets file)
Section titled “Tier 2: User API keys (GPG-encrypted .secrets file)”User-provided API keys stored via charly secrets gpg:
charly secrets gpg set OPENROUTER_API_KEY sk-or-xxxcharly config openwebui --env-file .secrets # Decrypts + injects at config timeAuto-Configuration Entrypoint
Section titled “Auto-Configuration Entrypoint”The openwebui-entrypoint runs on EVERY start (no sentinel — ENABLE_PERSISTENT_CONFIG=false means env vars always override database config):
- Reads secrets from env vars (podman
type=env) or/run/secrets/file mounts - LLM provider detection (each provider APPENDS to the plural, index-aligned
OPENAI_API_BASE_URLS/OPENAI_API_KEYSlists, so OpenRouter, Ollama Cloud and a direct OpenAI-compatible endpoint can be live at once):OLLAMA_HOST->ENABLE_OLLAMA_API=true+OLLAMA_BASE_URL(native Ollama API)OPENROUTER_API_KEY->https://openrouter.ai/api/v1+ the keyOLLAMA_API_KEY->https://ollama.com/v1+ the key (Ollama Cloud)OPENAI_API_KEY-> the key, againstOPENAI_API_BASE_URLwhen set, elsehttps://api.openai.com/v1(the key alone declares the provider)
- MCP server discovery from
CHARLY_MCP_SERVERSJSON -> buildsTOOL_SERVER_CONNECTIONSJSON for Open WebUI - Jupyter detection — if a jupyter MCP server URL is found, sets
CODE_EXECUTION_ENGINE=jupyter - Execs
open-webui serve
TOOL_SERVER_CONNECTIONS Format
Section titled “TOOL_SERVER_CONNECTIONS Format”The entrypoint translates charly’s CHARLY_MCP_SERVERS format into Open WebUI’s expected TOOL_SERVER_CONNECTIONS JSON:
[{ "type": "mcp", "url": "http://charly-jupyter:8888/mcp", "spec_type": "url", "spec": "", "path": "", "auth_type": "", "key": "", "config": {"enable": true}, "info": {"id": "jupyter", "name": "jupyter", "description": "MCP: jupyter"}}]Key fields: type must be "mcp" (not "openapi"), config.enable must be true, and
info.id is the server’s identity (Open Web UI keys the tool id, the connected-client map and
the access-control lookup on it) — an empty id collapses every MCP server onto one identity, so
the entrypoint sets it to the server name.
Key Design Choice: ENABLE_PERSISTENT_CONFIG=false
Section titled “Key Design Choice: ENABLE_PERSISTENT_CONFIG=false”This is the critical architectural decision. Without it, Open WebUI’s database config overrides environment variables after the first admin-panel save. With it disabled, env vars ALWAYS win — so the entrypoint’s dynamic configuration (LLM providers, MCP servers, Jupyter) works reliably on every restart. No sentinel-guarded config patching needed (unlike hermes).
Important: No port_relay Needed
Section titled “Important: No port_relay Needed”Open WebUI binds to 0.0.0.0:8080 by default. The port_relay field is only for services that bind to 127.0.0.1 (like Chrome DevTools on port 9222). Using port_relay with Open WebUI causes a socat/Open WebUI port conflict on eth0.
Build Notes
Section titled “Build Notes”- pixi.toml uses
[pypi-dependencies](NOT[feature.default.pypi-dependencies]— thedefaultfeature is reserved in pixi) - Open WebUI is installed via
pip install open-webuiin the pixi environment (~500MB+ of dependencies) - First startup takes ~30 seconds (Alembic DB migrations, model loading). supervisord
autorestart=truehandles transient failures.
openwebui: base: fedora candy: - agent-forwarding - openwebui - '@github.com/opencharly/pod-dbus' - charly ports: - "8080:8080"Related Candies
Section titled “Related Candies”/charly-languages:python– Python runtime dependency/charly-infrastructure:supervisord– process manager dependency/charly-hermes:hermes– alternative AI agent with similar MCP/LLM auto-config pattern
Related Commands
Section titled “Related Commands”/charly-core:charly-config–charly config openwebui --update-allfor service discovery/charly-build:secrets–charly secretsfor Secret Service / GPG credential management/charly-core:service–charly service status openwebuifor runtime management/charly-build:charly-mcp-cmd– probe the MCP servers openwebui consumes (auto-configured intoTOOL_SERVER_CONNECTIONSfromCHARLY_MCP_SERVERS):charly check live <provider-image> --filter mcpshows what tools openwebui will see and verifies liveness before debugging openwebui itself.
Related Boxes
Section titled “Related Boxes”/charly-openwebui:openwebui– the deployed box/charly-ollama:ollama– deploy alongside for local LLM inference/charly-hermes:hermes– alternative AI frontend (CLI-based agent vs web UI)
When to Use This Skill
Section titled “When to Use This Skill”MUST be invoked when the task involves the openwebui candy, Open WebUI configuration, LLM provider auto-detection, MCP server discovery for Open WebUI, or the openwebui entrypoint. Invoke this skill BEFORE reading source code or launching Explore agents.
Related
Section titled “Related”/charly-image:layer— candy authoring reference (charly.ymlschema, task verbs, service declarations)/charly-check:check— declarative testing (check:block,charly check box,charly check live)

