fix: private IPFS swarm nodes never peer, breaking shared storage#360
Open
EnriqueL8 wants to merge 1 commit into
Open
fix: private IPFS swarm nodes never peer, breaking shared storage#360EnriqueL8 wants to merge 1 commit into
EnriqueL8 wants to merge 1 commit into
Conversation
EnriqueL8
force-pushed
the
fix-ipfs-private-network-peering
branch
from
July 23, 2026 14:45
fd5047b to
c035f10
Compare
The pinned ipfs/go-ipfs:v0.10.0 image has a private-network (pnet) connection bug where swarm connections drop immediately after handshake, so org IPFS nodes never peer with each other. This causes "failed to bootstrap (no peers found)" and shared storage downloads to time out fetching content pinned only on another member's node. Bump to ipfs/kubo:v0.42.0, and since modern Kubo refuses to start in private-network mode with its default AutoConf/public bootstrap config, add a container-init.d script that disables it for private-mode stacks. mDNS auto-discovery, which worked locally, proved unreliable on native Linux Docker bridge networks - members' nodes never found each other there. Add an explicit peering step after first-time-setup that queries each member's real PeerID via its own API and calls swarm/peering/add against every other member, so nodes connect (and persistently reconnect) regardless of whether mDNS works in a given environment. Signed-off-by: Enrique Lacal <enrique.lacal@kaleido.io>
EnriqueL8
force-pushed
the
fix-ipfs-private-network-peering
branch
from
July 23, 2026 14:49
c035f10 to
037d09c
Compare
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.
Summary
ipfs/go-ipfs:v0.10.0, which has a private-network (pnet) connection bug where swarm connections drop immediately after handshake - nodes never actually peer with each other. This surfaces asfailed to bootstrap (no peers found)and shared storage downloads timing out fetching content pinned only on another member's node.ipfs/kubo:v0.42.0. Modern Kubo needs its AutoConf/public-bootstrap defaults disabled to even start in private-network mode, so acontainer-init.dscript now does that for private-mode stacks.swarm/peering/addagainst every other member, so nodes connect (and persistently reconnect) regardless of whether mDNS works in a given environment.internal/docker/docker.go's output-capture helper (used to build the AutoConf-disable init script): the loop exited as soon as either stdout or stderr closed rather than both, and the final chunk of output was dropped when it didn't end in a newline - together these could silently truncate captured command output.Test plan
ipfs catand gateway fetch both succeedgo build ./...passes