Hi,
I’m using vagrant to run 3 ipfs nodes in private network, but each peer does not have the address(ipfs id
) of that private segment(192.168.33.101
), how can I use that private address to connect multiple peers?
Thanks.
Hi,
I’m using vagrant to run 3 ipfs nodes in private network, but each peer does not have the address(ipfs id
) of that private segment(192.168.33.101
), how can I use that private address to connect multiple peers?
Thanks.
ok, using swarm listening addr makes sense
It’s unclear what you mean by private network …
There’s such a thing as a private IPFS network which is set up quite easily by adding a swarm.key
file in the IPFS directory. A private IPFS network includes all nodes that have the same shared key.
There’s also a private IP network, sometimes called a local network as opposed to a wide are network.
If you are running an IPFS node on a LAN that has WAN access, you may find that your “private” IPFS nodes are communicating with WAN IPFS nodes.
If you want to set up a private IPFS network where the expectation is that only specific nodes are communicating, you should probably generate a swarm key.
The following one line bash script will output a swarm key in the proper format.
echo -e "/key/swarm/psk/1.0.0/\n/base16/\n`tr -dc 'a-f0-9' < /dev/random | head -c64`"
You can copy and paste the output into a file. Place the same swarm key in each of your three nodes ipfs directory, and you’ll have a private IPFS network.
You can then remove all default bootstrap nodes:
ipfs bootstrap rm all
and build a bootstrap list of your three nodes and place each node ID in your configuration file for each node. At that point, all 3 nodes should be able to find each other on your LAN and also be configured as a private IPFS network rather than be a collection of nodes sitting on a private IP network.