<p>You'll want to add either <code>addnode=&lt;ipaddress&gt;</code> or <code>connect=&lt;ipaddress&gt;</code> to the bitcoin.conf of the node that is not working, where <code>&lt;ipaddress&gt;</code> equals the <code>127.0.0.1</code></p>

<p>These can also be command line flags (e.g., <code>bitcoind -connect=127.0.0.1</code>).</p>

<p>The difference between <code>addnode</code> and <code>connect</code> is explained like this (attributed to 'Noodle' on Freenode):</p>

<blockquote>
  <h2>Quick Primer on addnode vs connect</h2>
  
  <p>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.<br>
  connect will not do the above when you 'connect' to it.
  It will <em>only</em> connect you to 4.2.2.4 and no one else<br>
  So if you're behind a firewall, or have other problems 
  finding nodes, add some using 'addnode'.<br>
  If you want to stay private, use 'connect' to only connect to "trusted" nodes.<br>
  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.  </p>
</blockquote>

CC BY-SA 3.0
2014-02-20T05:57:33.620Z
2014-02-20T06:38:14.340Z
2014-02-20T06:38:14.340Z
Eric S
<p>I am running two bitcoin instances using the method described in this previous thread: <a href="https://bitcoin.stackexchange.com/a/13584/6024">https://bitcoin.stackexchange.com/a/13584/6024</a></p>

<p>I have set the new datadir and each instance has a different wallet.</p>

<p>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.</p>

<p>How can I solve this issue?</p>

<blockchain><bitcoind>
Running two bitcoin instances on a linux server, can't get peers on second instance
bvpx
# Running two bitcoin instances on a linux server, can't get peers on second instance

(Asked by: username_0 on 2014-02-20)

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?

**Tags:** blockchain, bitcoind


---

## 1 answers

### Answer by username_1 on 2014-02-20. Score: 1 | Accepted answer

You'll want to add either `addnode=<ipaddress>` or `connect=<ipaddress>` to the bitcoin.conf of the node that is not working, where `<ipaddress>` 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.


---

