{"record":{"id":"69e2838ae3e420e8","repo":"ipfs/kubo","slug":"libp2p-stream-mounting-not-enabled","errorCode":null,"errorMessage":"libp2p stream mounting not enabled","messagePattern":"libp2p stream mounting not enabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/p2p.go","lineNumber":702,"sourceCode":"\t\t}\n\n\t\treturn nil\n\t},\n}\n\nfunc p2pGetNode(env cmds.Environment) (*core.IpfsNode, error) {\n\tnd, err := cmdenv.GetNode(env)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfig, err := nd.Repo.Config()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !config.Experimental.Libp2pStreamMounting {\n\t\treturn nil, errors.New(\"libp2p stream mounting not enabled\")\n\t}\n\n\tif !nd.IsOnline {\n\t\treturn nil, ErrNotOnline\n\t}\n\n\treturn nd, nil\n}\n","sourceCodeStart":684,"sourceCodeEnd":711,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/p2p.go#L684-L711","documentation":"The `ipfs p2p` stream-mounting commands (`p2p listen`/`p2p dial` with filesystem mount) are gated behind the experimental config flag `Experimental.Libp2pStreamMounting`. `p2pGetNode`, the shared node accessor for these commands, returns this error when the flag is not enabled in the node's repo config. This keeps an experimental, potentially unsafe feature off by default.","triggerScenarios":"Running `ipfs p2p stream listen`/`dial` mount flows (e.g. mounting a remote filesystem over libp2p) when `Experimental.Libp2pStreamMounting` is false/absent in the daemon's config.","commonSituations":"Fresh node setups where the experimental flag was never enabled; running the command against a daemon whose config predates the feature; copy-pasted commands from tutorials without the config step.","solutions":["Enable the flag and restart the daemon: `ipfs config --json Experimental.Libp2pStreamMounting true`, then `ipfs daemon`.","Verify with `ipfs config Experimental.Libp2pStreamMounting` that it reports `true` on the node you are targeting (check IPFS_PATH).","Ensure you are talking to the intended daemon — the config must be enabled on the node the API points at (`--api`).","If mounting is not the goal, use plain `ipfs p2p stream dial/listen` (non-mount), which is not gated by this flag."],"exampleFix":"// before\n$ ipfs p2p stream listen /x/foo /mnt/foo\nError: libp2p stream mounting not enabled\n// after\n$ ipfs config --json Experimental.Libp2pStreamMounting true\n$ ipfs daemon  # restart\n$ ipfs p2p stream listen /x/foo /mnt/foo","handlingStrategy":"validation","validationCode":"enabled, err := exec.Command(\"ipfs\", \"config\", \"Experimental.Libp2pStreamMounting\").Output()\nif err != nil || strings.TrimSpace(string(enabled)) != \"true\" {\n    return errors.New(\"run: ipfs config --json Experimental.Libp2pStreamMounting true and restart daemon\")\n}","typeGuard":null,"tryCatchPattern":"if _, err := runP2PMount(ctx); err != nil {\n    if strings.Contains(err.Error(), \"stream mounting not enabled\") {\n        // guide user to enable the experimental config flag\n    }\n    return err\n}","preventionTips":["Enable Experimental.Libp2pStreamMounting in node provisioning","Confirm config on the daemon targeted by --api, not just locally","Avoid mount subcommands unless the feature is required"],"tags":["ipfs","cli","experimental-feature","config"],"backgroundTag":"experimental-feature-disabled","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}