mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:20:43 +00:00
fix(docker): route local provider setup to host gateway
This commit is contained in:
@@ -215,6 +215,33 @@ Use bind mode values in `gateway.bind` (`lan` / `loopback` / `custom` /
|
||||
`tailnet` / `auto`), not host aliases like `0.0.0.0` or `127.0.0.1`.
|
||||
</Note>
|
||||
|
||||
### Host Local Providers
|
||||
|
||||
When OpenClaw runs in Docker, `127.0.0.1` inside the container is the container
|
||||
itself, not your host machine. Use `host.docker.internal` for AI providers that
|
||||
run on the host:
|
||||
|
||||
| Provider | Host default URL | Docker setup URL |
|
||||
| --------- | ------------------------ | ----------------------------------- |
|
||||
| LM Studio | `http://127.0.0.1:1234` | `http://host.docker.internal:1234` |
|
||||
| Ollama | `http://127.0.0.1:11434` | `http://host.docker.internal:11434` |
|
||||
|
||||
The bundled Docker setup uses those host URLs as the LM Studio and Ollama
|
||||
onboarding defaults, and `docker-compose.yml` maps `host.docker.internal` to
|
||||
Docker's host gateway for Linux Docker Engine. Docker Desktop already provides
|
||||
the same hostname on macOS and Windows.
|
||||
|
||||
Host services must also listen on an address reachable from Docker:
|
||||
|
||||
```bash
|
||||
lms server start --port 1234 --bind 0.0.0.0
|
||||
OLLAMA_HOST=0.0.0.0:11434 ollama serve
|
||||
```
|
||||
|
||||
If you use your own Compose file or `docker run` command, add the same host
|
||||
mapping yourself, for example
|
||||
`--add-host=host.docker.internal:host-gateway`.
|
||||
|
||||
### Bonjour / mDNS
|
||||
|
||||
Docker bridge networking usually does not forward Bonjour/mDNS multicast
|
||||
|
||||
Reference in New Issue
Block a user