Lesson: Find Peers on the Network

This lesson shows how to find and examine the peers you connect to on the IPFS network. You will use the ipfs swarm and ipfs id tools for this purpose. The swarm is the component that opens, listens for, and maintains connections to other IPFS peers. You can also examine connected peers and the network using the Web UI.


To do the steps in this lesson you must:

  • Be running the ipfs daemon


After doing this Lesson you will be able to

  • Find and examine peers on the IPFS network


Step 1: Start the IPFS daemon

Start the IPFS daemon by running

$ ipfs daemon

Step 2: Find peers that we are connected to

You can use the command ipfs swarm peers to examine for connected peers:

$ ipfs swarm peers

Step 3: Examine a connected peer

You will use the ipfs id <hash> command to examine a connected peer:

$ ipfs id Qmf1...mx36
    "ID": "Qmf1....mx36",
    "PublicKey": "CAAS....AAE=",
    "Addresses": [
    "AgentVersion": "go-ipfs/0.4.21/8ca278f45",
    "ProtocolVersion": "ipfs/0.1.0"

Note: The "ID" field shown above is the Peer's ID, and this was also the hash that was shown when you ran ipfs swarm peers. Peers are identified on the network directly by their Peer ID.

Step 4: Examine using the Web UI

The IPFS daemon also serves up a modern Web UI that you are able to open in a browser. Did you notice when you started the daemon that there was the following?


Open the link above in your browser. You will see the Web UI displayed with sections on Status, Files, Explore, Peers, and Settings. Click on the Peers section and you will see a world map indicating the location of connected peers. Scroll down the page to see information on each of the peers, their country/city location, network latency, Peer ID, etc. Spend some time looking at the other different sections of the Web UI.


Once you have connected to the IPFS network by running the daemon, other IPFS nodes (peers) will begin to connect and communicate with your node. Using the commands ipfs swarm and ipfs id allows you to examine the connected nodes. The Web UI also shows in-depth information about peers.

Next Lesson: Retrieve content from a Peer

Proceed to the next lesson to learn how to Retrieve content from a Peer

Last updated