Skip to content

security(obolup): pinned, verified Ollama install bound to the Docker bridge - #924

Merged
OisinKyne merged 1 commit into
mainfrom
feat/obolup-ollama-installer
Nov 30, 2026
Merged

OisinKyne merged 1 commit into
mainfrom
feat/obolup-ollama-installer

Conversation

@OisinKyne

Copy link
Copy Markdown
Contributor

Replaces curl https://ollama.com/install.sh | sh, which was unpinned, unverified, not atomic, installed NVIDIA drivers and apt repos unasked, and (with obolup's drop-in) exposed the unauthenticated API on every interface.

  • pinned OLLAMA_VERSION + per-asset sha256 (linux amd64/arm64 tar.zst, amd64 ROCm, macOS zip) checked before extraction; a version-only bump fails TestObolupOllamaPins and is refused at runtime
  • atomic swap via lib/ollama.obolup-new; the old install is restored on any failure; no-op when the pinned version is installed
  • never installs drivers, apt repos or kernel modules; reports the GPU state; ROCm only with /dev/kfd; read-only hint for driver leftovers
  • hardened systemd unit (NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp, no device restrictions), written only if missing or ours (Ollama's own unit replaced on consent, backed up; other units get only the bind drop-in); restart only on change
  • Linux k3d: listens on the Docker bridge gateway only (After=docker, retries until docker0 exists); the old 0.0.0.0 drop-in is removed; k3s/rootless Docker keep 127.0.0.1 with instructions
  • obol finds Ollama on the bridge without OLLAMA_HOST; doctor reports the bridge bind as good and still warns on 0.0.0.0; obolup offers the OLLAMA_HOST line for the shell profile
  • macOS: verified Ollama-darwin.zip swapped into /Applications

Credit: Ollama (MIT). Written from scratch, no code copied.

… bridge

Replaces `curl https://ollama.com/install.sh | sh`, which was unpinned,
unverified, not atomic, installed NVIDIA drivers and apt repos unasked,
and (with obolup's drop-in) exposed the unauthenticated API on every
interface.

- pinned OLLAMA_VERSION + per-asset sha256 (linux amd64/arm64 tar.zst,
  amd64 ROCm, macOS zip) checked before extraction; a version-only bump
  fails TestObolupOllamaPins and is refused at runtime
- atomic swap via lib/ollama.obolup-new; the old install is restored on
  any failure; no-op when the pinned version is installed
- never installs drivers, apt repos or kernel modules; reports the GPU
  state; ROCm only with /dev/kfd; read-only hint for driver leftovers
- hardened systemd unit (NoNewPrivileges, ProtectSystem=strict,
  ProtectHome, PrivateTmp, no device restrictions), written only if
  missing or ours (Ollama's own unit replaced on consent, backed up;
  other units get only the bind drop-in); restart only on change
- Linux k3d: listens on the Docker bridge gateway only (After=docker,
  retries until docker0 exists); the old 0.0.0.0 drop-in is removed;
  k3s/rootless Docker keep 127.0.0.1 with instructions
- obol finds Ollama on the bridge without OLLAMA_HOST; doctor reports
  the bridge bind as good and still warns on 0.0.0.0; obolup offers the
  OLLAMA_HOST line for the shell profile
- macOS: verified Ollama-darwin.zip swapped into /Applications

Credit: Ollama (MIT). Written from scratch, no code copied.
@OisinKyne
OisinKyne merged commit bcd091e into main Nov 30, 2026
15 checks passed
@OisinKyne
OisinKyne deleted the feat/obolup-ollama-installer branch November 30, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant