{"record":{"id":"4ed2c2774f42a1d9","repo":"ipfs/kubo","slug":"ipfs-id-cannot-query-information-on-remote-peers","errorCode":null,"errorMessage":"'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option","messagePattern":"'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/id.go","lineNumber":101,"sourceCode":"\t\t\tid, err = peer.Decode(req.Arguments[0])\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"invalid peer id\")\n\t\t\t}\n\t\t} else {\n\t\t\tid = n.Identity\n\t\t}\n\n\t\tif id == n.Identity {\n\t\t\toutput, err := printSelf(keyEnc, n)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treturn cmds.EmitOnce(res, output)\n\t\t}\n\n\t\toffline, _ := req.Options[OfflineOption].(bool)\n\t\tif !offline && !n.IsOnline {\n\t\t\treturn errors.New(offlineIDErrorMessage)\n\t\t}\n\n\t\tif !offline {\n\t\t\t// We need to actually connect to run identify.\n\t\t\terr = n.PeerHost.Connect(req.Context, peer.AddrInfo{ID: id})\n\t\t\tswitch err {\n\t\t\tcase nil:\n\t\t\tcase kb.ErrLookupFailure:\n\t\t\t\treturn errors.New(offlineIDErrorMessage)\n\t\t\tdefault:\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\toutput, err := printPeer(keyEnc, n.Peerstore, id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/id.go#L83-L119","documentation":"`ipfs id` of a *remote* peer requires a live connection/identify exchange. When the command is run while the node is not online (no daemon networking) and `--offline` was not passed, the command fails with `offlineIDErrorMessage`: it cannot query remote peers without a running daemon, and suggests `--offline` only for pure peer-ID base conversion of the local identity.","triggerScenarios":"Running `ipfs id <other-peer-id>` with the daemon stopped, or on a node constructed offline (e.g. `ipfs id <peer>` in an `--offline`-style embedded context), without passing `--offline`.","commonSituations":"CI or cron scripts calling `ipfs id <peer>` without `ipfs daemon` running; running the command right after `ipfs init`; container images that run one-off CLI commands without a daemon; users expecting `ipfs id` to work purely from local peerstore data.","solutions":["Start the daemon first (`ipfs daemon`) and retry, so the node can connect and identify the peer.","If you only need peer-ID base conversion or local identity info, pass `--offline` (works only for the local identity / peerstore decode).","If offline lookup of a previously-seen peer is acceptable, check the local peerstore instead (the online path is required for fresh identify)."],"exampleFix":"// before\nipfs id 12D3KooWABC...            # daemon not running\n// after\nipfs daemon &                     # or use a systemd service\nipfs id 12D3KooWABC...","handlingStrategy":"fallback","validationCode":"","typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["cli","daemon","offline","network"],"backgroundTag":"daemon-not-running","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"}