Next: , Up: Starting Two Peers by Hand   [Contents]

3.4.1 Setup a second peer

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:

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).

Next: , Up: Starting Two Peers by Hand   [Contents]