Ipfs config Peering.Peers modification and effect?

I recently discovered Peering.Peers config

I would like to use it to enhance swarm connectivity quality.
I cannot succeed using ipfs config --json to change it with a jq prepared file?
Does the effect is needing daemon restart or it is reloaded automatically?

Does anyone already uses this parameter?

Thanks for your help

I use it to keep my laptop and my desktop connected whenever they are both up, it works great. The first thing you need to know is that you need to control both sides and that both need to have peering entries pointing at each other. Never have one sided peering, it only leads to grief. Second, yes, you need to restart after changing the config file for the changes to take effect. Third, here is what it looks like on one of my nodes (I redacted the ID):

"Peering": {
	"Peers": [
			"Addrs": [],
			"ID": "12D3KooW..."

You don’t need to enter addresses if your node is able to connect to the network, it will use the network to look up the addresses for that node (which is key for my laptop, as its address depends on where I am connecting from, which changes). Of course, at least one of the two nodes needs to be able to dial the other, or it will never work. Again, make sure that both ends of a peering agreement are configured.

1 Like