We will now start a second peer on your machine. For the second peer, you will need to manually create a modified configuration file to avoid conflicts with ports and directories. A peers configuration file is by default located in ~/.gnunet/gnunet.conf. This file is typically very short or even empty as only the differences to the defaults need to be specified. The defaults are located in many files in the $PREFIX/share/gnunet/config.d directory.
To configure the second peer, use the files $PREFIX/share/gnunet/config.d as a template for your main configuration file:
$ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf
Now you have to edit peer2.conf and change:
PORT” (add 10000) in any section (the option may be commented out if
PORTis prefixed by "\#", in this case, UNIX domain sockets are used and the PORT option does not need to be touched)
UNIXPATH” in any section (e.g. by adding a "-p2" suffix)
to a fresh, unique value. Make sure that the PORT numbers stay
below 65536. From now on, whenever you interact with the second peer,
you need to specify
-c peer2.conf as an additional
command line argument.
Now, generate the 2nd peer’s private key:
$ gnunet-peerinfo -s -c peer2.conf
This may take a while, generate entropy using your keyboard or mouse as needed. Also, make sure the output is different from the gnunet-peerinfo output for the first peer (otherwise you made an error in the configuration).