Repository navigation
desktop: let containers reach this machine's loopback under rootless Podman - #880
Merged
dustywusty merged 3 commits intoOct 29, 2026
Conversation
…Podman The server is a container now, and what it calls on this machine listens only on 127.0.0.1: the person's browser, deliberately, and a local Intelligence. Docker Desktop and the Podman machines on macOS and Windows forward host.docker.internal to the host's loopback. Rootless Podman on Linux does not: slirp4netns runs with host loopback disabled and pasta with --no-map-gw, so neither was reachable at any address. - Under rootless Podman, the Desktop writes containers.conf.d/90-openbot-host.conf: allow_host_loopback for slirp4netns and --map-host-loopback 10.0.2.2 for pasta, both appended so the person's own options are kept. A change restarts the API service this session owns. - The first Start after a change brings OpenBot's stack down once, since the rootless network namespace keeps its old options while any container holds it. - OPENBOT_HOST_GATEWAY=10.0.2.2 points OpenBot's own services' host.docker.internal there. The person's other containers keep their host.containers.internal. Measured on Ubuntu 24.04 (Podman 4.9.3, slirp4netns) and Fedora 44 (Podman 5.8.9, pasta), through Docker Compose and the Podman API service: a loopback-only listener was unreachable without this and reached with it, with outbound traffic unaffected.
dustywusty
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 29, 2026 07:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d75ec58d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The reset was a flag in memory, taken before the teardown. A Start whose teardown failed had already cleared it, so "Try Start again" skipped the teardown and left the old rootless network namespace in place; quitting between writing the drop-in and starting forgot it the same way. It is now a file beside Podman's configuration, written before the drop-in changes and removed by a Start only once stack::down succeeded.
dustywusty
merged commit Oct 29, 2026
ad11cd5
into
dustywusty/local-eval-on-upstream
25 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #852, which was merged into #832's branch: under rootless Podman on Linux, the server container could not reach the person's browser or a local Intelligence.
Root cause
127.0.0.1just worked.127.0.0.1only:agent-computer/src/browser-runtime.ts);host.docker.internalto the host's loopback. Rootless Podman on Linux does not:--no-map-gw.Evidence
Measured on Ubuntu 24.04 (Podman 4.9.3, slirp4netns) and Fedora 44 (Podman 5.8.9, pasta), with a listener bound only to
127.0.0.1and a container on a Compose network:host.docker.internal,10.0.2.2,169.254.1.2, the gateway)OPENBOT_HOST_GATEWAY=10.0.2.2, viadocker composeagainst the Podman API servicepasta_options/network_cmd_options({append=true})Measured on both distros: the options only apply to a new rootless network namespace. Written while any container held the namespace, they changed nothing; once the last one stopped, they applied.
The fix
engine::local_api: under rootless Podman, the Desktop writes~/.config/containers/containers.conf.d/90-openbot-host.conf:allow_host_loopback=true, which serves the host's loopback at its fixed gateway,10.0.2.2;--map-host-loopback 10.0.2.2;env::compose: setsOPENBOT_HOST_GATEWAY=10.0.2.2wheneverENGINE_SOCKETmarks rootless Podman. It is purged when the engine changes, so a later Docker setup goes back tohost-gateway.docker-compose.yml: the threeextra_hostsusehost.docker.internal:${OPENBOT_HOST_GATEWAY:-host-gateway}.This also fixes Bots and a picked harness calling a model endpoint on this machine that listens on loopback only, such as Ollama's default.
Scope and limits
10.0.2.2by number, though:host_containers_internal_ipis deliberately left unset, so theirhost.containers.internalis unchanged.Tests
{append=true}, and the shared address;OPENBOT_HOST_GATEWAYis set only under rootless Podman and is purged otherwise.tests/compose.test.ts: all three services resolvehost.docker.internaltoOPENBOT_HOST_GATEWAYwhen it is set.cargo fmt --check,cargo clippy --all-targets -D warnings, andcargo test --lib --bins(763 + 191) pass.bunandlsofwere not installed;local_evalpassed 3/3 when run alone.