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

3.4.2 Start the second peer and connect the peers

Then, you can start a second peer using:

$ gnunet-arm -c peer2.conf -s
$ gnunet-arm -c peer2.conf -i dht
$ ~/gnunet/src/dht/gnunet-dht-put -c peer2.conf -k KEY -d VALUE
$ ~/gnunet/src/dht/gnunet-dht-get -c peer2.conf -k KEY

If you want the two peers to connect, you have multiple options:

To setup peer 1 as bootstrapping server change the configuration of the first one to be a hostlist server by adding the following lines to peer1.conf to enable bootstrapping server:


Then change peer2.conf and replace the “SERVERS” line in the “[hostlist]” section with “http://localhost:8080/”. Restart both peers using:

# stop first peer
$ gnunet-arm -c peer1.conf -e
# start first peer
$ gnunet-arm -c peer1.conf -s
# start second peer
$ gnunet-arm -c peer2.conf -s

Note that if you start your peers without changing these settings, they will use the “global” hostlist servers of the GNUnet P2P network and likely connect to those peers. At that point, debugging might become tricky as you’re going to be connected to many more peers and would likely observe traffic and behaviors that are not explicitly controlled by you.