Configuring the nodes

Next, we'll configure the nodes to run them on one local machine. IPFS uses the following ports for communication and operation:

Gateway port: The default value is 8080.

Client port: The default value is 5001.

Swarm ipv4 and ipv6 ports. The default value is 4001.

To avoid conflict, we need to change the values of this port for Node 2. To do so, open the config file in your ~/.ipfs2 directory, and locate the Addresses: tag.

Change the values of these ports to those shown in the following code block to avoid a conflict with IPFS Node 1, which is running on the same machine:

"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5002",
"Announce": [],
"Gateway": "/ip4/127.0.0.1/tcp/8081",
"NoAnnounce": [],
"Swarm": [
"/ip4/0.0.0.0/tcp/4002",
"/ip6/::/tcp/4002"
]
}

This should allow us to run both the nodes on the same local machine.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.131.110.169