ipfs/kubo · error

'ipfs id' cannot query information on remote peers without a

Error message

'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option

What it means

`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.

Source

Thrown at core/commands/id.go:101

			id, err = peer.Decode(req.Arguments[0])
			if err != nil {
				return errors.New("invalid peer id")
			}
		} else {
			id = n.Identity
		}

		if id == n.Identity {
			output, err := printSelf(keyEnc, n)
			if err != nil {
				return err
			}
			return cmds.EmitOnce(res, output)
		}

		offline, _ := req.Options[OfflineOption].(bool)
		if !offline && !n.IsOnline {
			return errors.New(offlineIDErrorMessage)
		}

		if !offline {
			// We need to actually connect to run identify.
			err = n.PeerHost.Connect(req.Context, peer.AddrInfo{ID: id})
			switch err {
			case nil:
			case kb.ErrLookupFailure:
				return errors.New(offlineIDErrorMessage)
			default:
				return err
			}
		}

		output, err := printPeer(keyEnc, n.Peerstore, id)
		if err != nil {
			return err
		}

View on GitHub (pinned to 329838acdf)

Solutions

  1. Start the daemon first (`ipfs daemon`) and retry, so the node can connect and identify the peer.
  2. If you only need peer-ID base conversion or local identity info, pass `--offline` (works only for the local identity / peerstore decode).
  3. If offline lookup of a previously-seen peer is acceptable, check the local peerstore instead (the online path is required for fresh identify).

Example fix

// before
ipfs id 12D3KooWABC...            # daemon not running
// after
ipfs daemon &                     # or use a systemd service
ipfs id 12D3KooWABC...
Defensive patterns

Strategy: fallback

When it happens

Trigger: 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`.

Common situations: 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.

Related errors


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/4ed2c2774f42a1d9. Report an issue: GitHub.