Skip to content

sallyom/openwebui-openclaw

Repository files navigation

Open WebUI + Container Setup

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

What this gives you

  • Container launch scripts for Open WebUI (auto-detects Podman or Docker)
  • OpenClaw-specific connection instructions for the UI

Quick start

  1. Copy the env template:
cp openwebui.env.example openwebui.env
  1. Start Open WebUI:
./run-openwebui.sh
  1. Open the UI:
http://localhost:3000
  1. Create the first account.

Important:

  • The first account becomes the Open WebUI administrator.
  • Later users may require approval depending on instance settings.

Connect Open WebUI to OpenClaw

In Open WebUI:

  1. Go to Admin Settings
  2. Open Connections
  3. Choose OpenAI
  4. Add a new Standard / Compatible connection

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 use host.docker.internal. The run script prints the correct value.
  • Or, use localhost or wherever your OpenClaw Gateway is running.
  • If your OpenClaw Gateway is on a different port, change 18789.
  • If you enabled the new OpenClaw /v1/models endpoint, Open WebUI should auto-discover openclaw and any agent-target entries such as openclaw:ops.

RAG with OpenClaw Embeddings

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.

1. Configure the embedding provider in OpenClaw

Set the embedding provider inside the running OpenClaw container:

OPENCLAW_CONTAINER=<your-container-name>  openclaw config set \
  agents.defaults.memorySearch.provider openai

Supported providers: openai, ollama, gemini, voyage, mistral.

Restart the gateway after changing config.

2. Configure RAG in Open WebUI

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-text
  • gemini/text-embedding-004
  • voyage/voyage-3

3. Test it

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"}'

Container runtime

The scripts auto-detect Podman or Docker (preferring Podman). To force a specific runtime, set CONTAINER_RUNTIME in openwebui.env:

Files

  • openwebui.env.example — copy to openwebui.env and adjust if needed
  • run-openwebui.sh — start or resume the container
  • stop-openwebui.sh — stop the container
  • logs-openwebui.sh — tail container logs

Helpful commands

Check running containers:

podman ps    # or: docker ps

Stop Open WebUI:

./stop-openwebui.sh

View logs:

./logs-openwebui.sh

Image choice

The 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

Sources

About

run OpenWebUI with OpenClaw

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages