diff --git a/website/docs/user-guide/messaging/open-webui.md b/website/docs/user-guide/messaging/open-webui.md index efdf901371..9c90eb7998 100644 --- a/website/docs/user-guide/messaging/open-webui.md +++ b/website/docs/user-guide/messaging/open-webui.md @@ -26,11 +26,15 @@ Open WebUI talks to Hermes server-to-server, so you do not need `API_SERVER_CORS ### 1. Enable the API server -Add to `~/.hermes/.env`: +```bash +hermes config set API_SERVER_ENABLED true +hermes config set API_SERVER_KEY your-secret-key +``` + +`hermes config set` auto-routes the flag to `config.yaml` and the secret to `~/.hermes/.env`. If the gateway is already running, restart it so the change takes effect: ```bash -API_SERVER_ENABLED=true -API_SERVER_KEY=your-secret-key +hermes gateway stop && hermes gateway ``` ### 2. Start Hermes Agent gateway @@ -45,12 +49,25 @@ You should see: [API Server] API server listening on http://127.0.0.1:8642 ``` -### 3. Start Open WebUI +### 3. Verify the API server is reachable + +```bash +curl -s http://127.0.0.1:8642/health +# {"status": "ok", ...} + +curl -s -H "Authorization: Bearer your-secret-key" http://127.0.0.1:8642/v1/models +# {"object":"list","data":[{"id":"hermes-agent", ...}]} +``` + +If `/health` fails, the gateway didn't pick up `API_SERVER_ENABLED=true` — restart it. If `/v1/models` returns `401`, your `Authorization` header doesn't match `API_SERVER_KEY`. + +### 4. Start Open WebUI ```bash docker run -d -p 3000:8080 \ -e OPENAI_API_BASE_URL=http://host.docker.internal:8642/v1 \ -e OPENAI_API_KEY=your-secret-key \ + -e ENABLE_OLLAMA_API=false \ --add-host=host.docker.internal:host-gateway \ -v open-webui:/app/backend/data \ --name open-webui \ @@ -58,7 +75,11 @@ docker run -d -p 3000:8080 \ ghcr.io/open-webui/open-webui:main ``` -### 4. Open the UI +`ENABLE_OLLAMA_API=false` suppresses the default Ollama backend, which would otherwise show up empty and clutter the model picker. Omit it if you actually have Ollama running alongside. + +First launch takes 15–30 seconds: Open WebUI downloads sentence-transformer embedding models (~150MB) the first time it starts. Wait for `docker logs open-webui` to settle before opening the UI. + +### 5. Open the UI Go to **http://localhost:3000**. Create your admin account (the first user becomes admin). You should see your agent in the model dropdown (named after your profile, or **hermes-agent** for the default profile). Start chatting! @@ -77,6 +98,7 @@ services: environment: - OPENAI_API_BASE_URL=http://host.docker.internal:8642/v1 - OPENAI_API_KEY=your-secret-key + - ENABLE_OLLAMA_API=false extra_hosts: - "host.docker.internal:host-gateway" restart: always @@ -181,8 +203,9 @@ With streaming enabled (the default), you'll see brief inline indicators as tool - **Check the URL has `/v1` suffix**: `http://host.docker.internal:8642/v1` (not just `:8642`) - **Verify the gateway is running**: `curl http://localhost:8642/health` should return `{"status": "ok"}` -- **Check model listing**: `curl http://localhost:8642/v1/models` should return a list with `hermes-agent` +- **Check model listing**: `curl -H "Authorization: Bearer your-secret-key" http://localhost:8642/v1/models` should return a list with `hermes-agent` - **Docker networking**: From inside Docker, `localhost` means the container, not your host. Use `host.docker.internal` or `--network=host`. +- **Empty Ollama backend shadowing the picker**: If you omitted `ENABLE_OLLAMA_API=false`, Open WebUI shows an empty Ollama section above your Hermes models. Restart the container with `-e ENABLE_OLLAMA_API=false` or disable Ollama in **Admin Settings → Connections**. ### Connection test passes but no models load