Sandbox cannot reach local Ollama at host.openshell.internal or 172.18.0.1 on DGX Spark
Description
Environment
- Hardware: NVIDIA DGX Spark (Founders Edition, 4TB)
- OS: DGX OS (Ubuntu 24.04)
- NemoClaw version: 0.0.11
- OpenClaw version: 2026.3.11
- Docker: 28.x
Problem
The OpenClaw sandbox cannot reach a locally running Ollama instance on the host.
Ollama is running on the host and confirmed reachable:
curl http://172.18.0.1:11434/api/tagsworks from the Spark hostcurl http://127.0.0.1:11434/api/tagsworks from the Spark hostollama psshows models loaded correctly
However from inside the sandbox, all inference requests time out with:
"rawErrorPreview":"Connection error.""error":"LLM request timed out."
Tried the following baseUrl values in openclaw.json - all fail:
http://host.openshell.internal:11434/v1http://172.18.0.1:11434/v1http://172.17.0.1:11434/v1http://127.0.0.1:11434/v1
Question
What is the correct way to configure local Ollama inference so the sandbox can reach the host? Is there a network policy that needs to be added to allow the sandbox to connect to the host IP on port 11434?
Reproduction Steps
- Install NemoClaw on DGX Spark following spark-install.md
- Run
nemoclaw onboard, select Local Ollama as inference provider - Start Ollama with
OLLAMA_HOST=0.0.0.0:11434 ollama serve - Confirm Ollama is reachable from host:
curl http://172.18.0.1:11434/api/tagsreturns model list - Connect to sandbox:
nemoclaw spark-nemo connect - Send any message via OpenClaw dashboard or Telegram
- Observe "LLM request timed out" / "Connection error" in logs
Expected: Agent responds using local Ollama inference Actual: All inference requests fail with connection error regardless of which host IP is used in baseUrl
Environment
- NemoClaw version: 0.0.11
- OpenClaw version: 2026.3.11
- OS: DGX OS Ubuntu 24.04
- Hardware: NVIDIA DGX Spark Founders Edition 4TB
- Docker: 28.x
- Ollama version: 0.20.5
Debug Output
Logs
Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate
I am having the same problem the model keeps showing/reverting to llama3.1:8b even when you set mistral:7b. It's hardcoded in the plugin banner
Related: #709 — same root issue (sandbox can't reach host-local Ollama). PR #1140 has a partial fix for macOS but Linux/Spark still needs 0.0.0.0 binding. See #709 for full discussion.
Reproduction findings (v0.0.16 / OpenShell 0.0.26 on DGX Spark)
Root cause confirmed
All sandbox HTTP traffic is routed through the OpenShell L7 proxy (http_proxy=http://10.200.0.1:3128). When openclaw.json uses a direct host URL like http://host.openshell.internal:11434/v1, the request goes through this proxy and gets 403 Forbidden because no network_policies entry allows host.openshell.internal:11434.
> POST http://host.openshell.internal:11434/v1/chat/completions HTTP/1.1
> Host: host.openshell.internal:11434
< HTTP/1.1 403 Forbidden
All four URLs the reporter tried (host.openshell.internal, 172.18.0.1, 172.17.0.1, 127.0.0.1) fail from inside the sandbox — the first three are blocked by the proxy policy, and 127.0.0.1 gets connection refused since nothing listens inside the sandbox.
The working path
The intended inference path uses the OpenShell inference route: sandbox → https://inference.local/v1 → OpenShell gateway L7 proxy → ollama-local provider → host.openshell.internal:11434. This works correctly on v0.0.16 because onboard sets baseUrl: "https://inference.local/v1" in openclaw.json.
Verified end-to-end from inside the sandbox:
$ curl https://inference.local/v1/chat/completions -d '{"model":"nemotron-3-super:120b","messages":[{"role":"user","content":"hi"}],"max_tokens":5}'
{"choices":[{"message":{"role":"assistant","content":"","reasoning":"Okay, the user said"}}],...}
Likely v0.0.11 regression
The reporter is on NemoClaw v0.0.11 / OpenShell v0.0.11. The current v0.0.16 onboard correctly configures https://inference.local/v1 as the baseUrl, routing through the gateway. The issue is likely that v0.0.11 either:
- Set the direct Ollama host URL in
openclaw.jsoninstead of theinference.localproxy route, or - The inference route setup failed silently during onboard
Related: #709 (closed), PR #1140 (closed, not merged).
Recommendation
- Confirm whether this is already fixed on
main(v0.0.16) — it appears to be - If so, this can be closed as fixed-in-later-version with a note to upgrade
- Consider adding a diagnostic check in
nemoclaw statusthat detects whenopenclaw.jsonbaseUrl bypasses the inference route
Correction: NOT confirmed fixed in latest version
After deeper investigation, the v0.0.11 and v0.0.16 (current main) onboard code for ollama-local is identical — same getSandboxInferenceConfig (defaults to https://inference.local/v1), same getLocalProviderBaseUrl (gateway-side http://host.openshell.internal:11434/v1), same upsertProvider call. No code change between versions addresses this bug.
The reason the DGX Spark test environment works is:
- Ollama is explicitly configured with
OLLAMA_HOST=0.0.0.0:11434(systemd override in/etc/systemd/system/ollama.service.d/host.conf) - OpenShell 0.0.26 gateway container has
host.openshell.internal:host-gateway→ resolves to172.17.0.1(docker0) - Since Ollama listens on all interfaces,
172.17.0.1:11434succeeds
The bug is still reproducible if:
- Ollama is bound to
127.0.0.1(default) instead of0.0.0.0— thenhost-gateway(172.17.0.1/docker0) cannot reach it - The user manually sets
baseUrlinopenclaw.jsonto a direct host URL (as the reporter tried) — the L7 proxy returns 403 Forbidden since no network policy allows those endpoints
The reporter's exact symptom (timeout/connection error after standard onboard) could happen if:
- Ollama was running with default bind (
127.0.0.1) when onboard ran — thevalidateLocalProvidercontainer reachability check would have failed and blocked onboard, so this scenario should be caught - Ollama was on
0.0.0.0during onboard (check passed) but later restarted/reconfigured to127.0.0.1 - The OpenShell gateway container lost the
host.openshell.internalhost mapping after a restart
We need the reporter's nemoclaw <sandbox> logs output to determine which failure mode they hit. The missing debug output and logs sections in the issue are critical for diagnosis.
Retracting the "likely fixed in later version" assessment from my previous comment.
We attempted to reproduce this on a DGX Spark (Founders Edition) with NemoClaw v0.0.16 / OpenShell 0.0.26 following the same steps and were unable to — local Ollama inference works end-to-end through the sandbox.
Could you provide:
nemoclaw <sandbox-name> logs --tail 50— especially any lines around the time of a failed inference requestopenshell inference getoutputopenshell provider get ollama-localoutput- Your OpenShell version (
openshell --version)
That will help us narrow down where the routing breaks in your environment.
Closing as won't fix — we were unable to reproduce this on DGX Spark (Founders Edition) with v0.0.16 / OpenShell 0.0.26. Local Ollama inference worked end-to-end through the sandbox in our testing. No response from reporter after requesting additional logs and diagnostics on April 16th. If this resurfaces, please reopen with the requested diagnostic output (sandbox logs, docker inspect, proxy env vars).