NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[Ubuntu + Docker CE] Linux onboarding for Ollama does not explain required container-reachable bind address

Open JoyceChenNV opened this issue 8 months ago • 9 comments

Description

Ollama is detected because localhost:11434 responds, but onboarding later fails because containers cannot reach host.openshell.internal:11434.

Image

Reproduction Steps

  1. Start from an Ubuntu machine with Docker CE installed and running.
  2. Install Ollama.
  3. Start Ollama in a host-only way so it binds to loopback, for example using the default system service or any mode that results in: ss -ltnp | grep 11434 showing: 127.0.0.1:11434
  4. Verify that Ollama appears healthy from the host: curl http://localhost:11434/api/tags
  5. Ensure at least one Ollama model exists, for example: ollama pull nemotron-3-nano:30b ollama list
  6. Run the NemoClaw installer: curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash
  7. During onboarding: enter a valid sandbox name choose Local Ollama choose the available Ollama model
  8. Continue until onboarding reaches inference provider setup.

Environment

  • Openshell: 0.0.11
  • nemoclaw: 0.1.0 (main: dbfd78c)
  • OS: Ubuntu
  • Container runtime: Docker CE
  • GPU: Available
  • Ollama: Installed
  • Ollama models: None (ollama list is empty)
  • NemoClaw install method: curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash

Debug Output


Logs


Checklist

  • [x] I confirmed this bug is reproducible
  • [x] I searched existing issues and this is not a duplicate

[NVB#6000934]

JoyceChenNV avatar Mar 23 '26 11:03 JoyceChenNV

Opened PR #972 to document the Linux Docker host-reachability requirement for Local Ollama. The patch adds the missing 0.0.0.0:11434 bind guidance and explains that sandboxes reach the host service through http://host.openshell.internal:11434 rather than the host shell's loopback socket.

WuKongAI-CMU avatar Mar 26 '26 14:03 WuKongAI-CMU

Is this closed by https://github.com/NVIDIA/NemoClaw/pull/1303 ?

wscurran avatar Apr 09 '26 16:04 wscurran

PR #1303 documents the workaround (bind Ollama to 0.0.0.0:11434) but doesn't fix the onboarding UX — the wizard still detects Ollama on localhost, proceeds, then fails at container reachability with no actionable guidance inline.

A code fix would catch this earlier: preflight could check if Ollama is only on loopback and either warn or offer to restart with OLLAMA_HOST=0.0.0.0:11434 before continuing. Some of that logic already exists in the onboard flow for certain code paths.

I'd say keep this open for the code-level fix, with #1303 as a partial (docs) mitigation.

prekshivyas avatar Apr 10 '26 00:04 prekshivyas

https://github.com/NVIDIA/NemoClaw/pull/1140 might help

prekshivyas avatar Apr 10 '26 00:04 prekshivyas

PR #1922 reimplements the auth proxy approach from #679 — Ollama stays on localhost, an authenticated reverse proxy on 0.0.0.0:11435 with a per-instance Bearer token handles container access. This eliminates the need to bind 0.0.0.0 and the truncated error message that prompted this issue.

prekshivyas avatar Apr 15 '26 22:04 prekshivyas

Thanks @JoyceChenNV for the detailed repro — this is now fixed in #1922 (merged).

Root cause was exactly what you identified: Ollama binding to 127.0.0.1 is correct from a security standpoint, but the sandbox container couldn't reach it, so onboarding failed at inference-provider setup. The fix keeps Ollama on 127.0.0.1:11434 and adds an authenticated reverse proxy on 0.0.0.0:11435. Containers now hit the proxy (reachable via host-gateway / host.docker.internal), which validates a per-instance Bearer token and forwards to Ollama. Onboard wires the token into the OpenShell provider credential automatically.

Should be available in v0.0.18. Please reopen if you hit anything related.

prekshivyas avatar Apr 16 '26 17:04 prekshivyas

@prekshivyas Seems there is a regression issue after https://github.com/NVIDIA/NemoClaw/pull/1922: Onboarding then fails during inference-provider setup with invalid peer certificate: BadSignature I am going to reopen this issue, could you please double check? With a Spark machine from colossus.

[3/8] Configuring inference (NIM)
  ──────────────────────────────────────────────────
  Detected local inference option: Ollama


  Inference options:
    1) NVIDIA Endpoints
    2) OpenAI
    3) Other OpenAI-compatible endpoint
    4) Anthropic
    5) Other Anthropic-compatible endpoint
    6) Google Gemini
    7) Local Ollama (localhost:11434) — running (suggested)

  Choose [1]: 7
  Warning: Ollama auth proxy did not start on :11435
  ✓ Using Ollama on localhost:11434 (proxy on :11435)

  Ollama models:
    1) qwen2.5:7b
    2) Other...

  Choose model [1]: 1
  Loading Ollama model: qwen2.5:7b
  Responses API available — OpenClaw will use openai-responses.
  ℹ Using chat completions API (Ollama tool calls require /v1/chat/completions)

  [4/8] Setting up inference provider
  ──────────────────────────────────────────────────
✓ Active gateway set to 'nemoclaw'
Error:   × transport error
  ├─▶ invalid peer certificate: BadSignature
  ╰─▶ invalid peer certificate: BadSignature

  Error: × transport error ├─▶ invalid peer certificate: BadSignature ╰─▶ invalid peer certificate: BadSignature

JoyceChenNV avatar Apr 17 '26 12:04 JoyceChenNV

Hi @prekshivyas @cv @ericksoa, today I test on nemoclaw v0.0.26 with https://github.com/NVIDIA/NemoClaw/pull/2000 merged. However, it returns "run error: HTTP 401: Unauthorized" for localhost:11434 with local-inference policy enabled. Could you please double check?

Log:

sandbox@ollama:~$ curl -I http://host.openshell.internal:11434/api/tags
HTTP/1.1 403 Forbidden
sandbox@ollama:~$ openclaw agent --session-id ollama-local-test -m 'hello'
(node:7987) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7995) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)

🦞 OpenClaw 2026.4.2 (d74a122) — If it works, it's automation; if it breaks, it's a "learning opportunity."

│
◇  
HTTP 401: Unauthorized
sandbox@ollama:~$ exit
exit
>$ nemoclaw ollama policy-list

  Policy presets for sandbox 'ollama':
    ● brave — Brave Search API access
    ● brew — Homebrew (Linuxbrew) package manager access
    ● discord — Discord API, gateway, and CDN access
    ○ github — GitHub.com and GitHub API access (git, gh)
    ● huggingface — Hugging Face Hub, LFS, and Inference API access
    ● jira — Jira and Atlassian Cloud access
    ● local-inference — Local inference access (Ollama, vLLM) via host gateway
    ● npm — npm and Yarn registry access
    ● outlook — Microsoft Outlook and Graph API access
    ● pypi — Python Package Index (PyPI) access
    ● slack — Slack API, Socket Mode, and webhooks access
    ● telegram — Telegram Bot API access

JoyceChenNV avatar Apr 20 '26 11:04 JoyceChenNV