Running two bitcoin instances on a linux server, can't get peers on second instance I am running two bitcoin instances using the method described in this previous thread: https://bitcoin.stackexchange.com/a/13584/6024

I have set the new datadir and each instance has a different wallet.

However, I found that I can't use the same port to listen on, otherwise there is a conflict. If I change the port for the second daemon, it receives no peers and cannot update the blockchain database.

How can I solve this issue?
You'll want to add either addnode=&lt;ipaddress&gt; or connect=&lt;ipaddress&gt; to the bitcoin.conf of the node that is not working, where &lt;ipaddress&gt; equals the 127.0.0.1

These can also be command line flags (e.g., bitcoind -connect=127.0.0.1).

The difference between addnode and connect is explained like this (attributed to 'Noodle' on Freenode):


  Quick Primer on addnode vs connect
  
  Let's say for instance you use addnode=4.2.2.4
  addnode will connect you to and tell you about the nodes connected to 4.2.2.4.  In addition it will tellthe other nodes connected to it that you exist so they can connect to you.
  connect will not do the above when you 'connect' to it.
  It will only connect you to 4.2.2.4 and no one else
  So if you're behind a firewall, or have other problems 
  finding nodes, add some using 'addnode'.
  If you want to stay private, use 'connect' to only connect to "trusted" nodes.
  If you run multiple nodes on a LAN, there's no need for
  all of them to open lots of connections.  Instead 'connect' them all to one node that is port forwarded and has lots of connections.