IPFS SWRM Peer confusion

Hello Team,

I have some questions related to IPFS swarm peers. It would be great if someone explain and give answer on my questions.

Here is the questions:

  1. I have run three cluster in local machine with docker compose, used this github docker-compose code.

Then I open IPFS webUI through localhost:5001/webui.
After that, there was so many peers shown in ipfs webui. (seems like swarm peers)

“If I add or publish files to my IPFS cluster, will these files replicate to other peer nodes that are shown in discovered peers?”

I don’t want to replicated my cluster file to those peers because it will be production data.

  1. What is difference between peers ls and swarm peers command? both give different output
    peers ls shown only three cluster which is running in local env
    swarm peers shown all public peers.

Thanks,
Mihir

localhost:5001/webui only shows the Kubo statistics.
Kubo does not know about your cluster, it’s ipfs-cluster which puppeteer the Kubo node.
So the swarm on Kubo lists all the open connections to the amino IPFS network.

Kubo will announce the CIDs in the public DHT, anything you add to your node must be considered public information.
You would need to encrypt the information before adding it or use a private network.

to create private network do I need to setup cluster with personal bootstrap node instead of public bootstrap node? am i right?