This folder contains a small local setup kit for running Open WebUI with Podman or Docker and connecting it to an OpenClaw Gateway over the OpenAI-compatible API.
Tested assumptions:
- Podman or Docker is installed
- OpenClaw Gateway is reachable from the host
- You want Open WebUI running locally on port
3000
- Container launch scripts for Open WebUI (auto-detects Podman or Docker)
- OpenClaw-specific connection instructions for the UI
- Copy the env template:
cp openwebui.env.example openwebui.env- Start Open WebUI:
./run-openwebui.sh- Open the UI:
http://localhost:3000
- Create the first account.
Important:
- The first account becomes the Open WebUI administrator.
- Later users may require approval depending on instance settings.
In Open WebUI:
- Go to
Admin Settings - Open
Connections - Choose
OpenAI - Add a new
Standard / Compatibleconnection
Use:
- URL:
http://<host-dns>:18789/v1(see note below) - API Key: your OpenClaw gateway token
Notes:
- For Podman use
host.containers.internal; for Docker usehost.docker.internal. The run script prints the correct value. - Or, use
localhostor wherever your OpenClaw Gateway is running. - If your OpenClaw Gateway is on a different port, change
18789. - If you enabled the new OpenClaw
/v1/modelsendpoint, Open WebUI should auto-discoveropenclawand any agent-target entries such asopenclaw:ops.
OpenClaw PR #53992 adds
OpenAI-compatible /v1/models and /v1/embeddings endpoints to the gateway.
This lets Open WebUI use OpenClaw as its embedding backend for RAG.
Set the embedding provider inside the running OpenClaw container:
OPENCLAW_CONTAINER=<your-container-name> openclaw config set \
agents.defaults.memorySearch.provider openaiSupported providers: openai, ollama, gemini, voyage, mistral.
Restart the gateway after changing config.
In Open WebUI, go to Admin Settings > Documents and set:
| Setting | Value |
|---|---|
| Embedding Model Engine | OpenAI |
| API Base URL | http://<host-dns>:18789/v1 (see Connect section) |
| API Key | Your OpenClaw gateway token |
| Embedding Model | openai/text-embedding-3-small |
Adjust the model to match your provider. Examples:
ollama/nomic-embed-textgemini/text-embedding-004voyage/voyage-3
Upload a document in Open WebUI (any chat, click the + attach button or
use Workspace > Knowledge). Open WebUI will call OpenClaw's
/v1/embeddings endpoint to generate vectors. You can then ask questions
about the document content in chat.
You can also verify the endpoint directly:
curl http://localhost:18789/v1/embeddings \
-H "Authorization: Bearer $OPENCLAW_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model": "openai/text-embedding-3-small", "input": "Hello world"}'The scripts auto-detect Podman or Docker (preferring Podman). To force a
specific runtime, set CONTAINER_RUNTIME in openwebui.env:
openwebui.env.example— copy toopenwebui.envand adjust if neededrun-openwebui.sh— start or resume the containerstop-openwebui.sh— stop the containerlogs-openwebui.sh— tail container logs
Check running containers:
podman ps # or: docker psStop Open WebUI:
./stop-openwebui.shView logs:
./logs-openwebui.shThe default env template uses:
ghcr.io/open-webui/open-webui:main
For a smaller image, you can switch to:
ghcr.io/open-webui/open-webui:main-slim
- Open WebUI Quick Start: https://docs.openwebui.com/getting-started/quick-start/
- OpenClaw https://github.com/openclaw/openclaw
- OpenClaw Installer for Podman/Docker https://github.com/sallyom/openclaw-installer
- Open WebUI OpenAI-compatible providers: https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible/
- Open WebUI settings overview: https://docs.openwebui.com/getting-started/settings/