<p>Try to use -datadir with mycoind and specify that node's data directory address there.Remember each peer needs different port and rpcport, so for example :</p>

<pre><code> mycoind -port=&lt;port&gt; -rpcport=&lt;rpcport&gt; -datadir=/home/user/.mycoind2(or whatever) -(other parameteres)
</code></pre>

<p>I you want to add node just simply use "-addnode=127.0.0.1:" along mycoind command.</p>

CC BY-SA 4.0
2018-09-30T03:09:04.467Z
2018-09-30T03:16:08.900Z
2018-09-30T03:16:08.900Z
chameleon123
<p>It is definitely a combination of all of the above answers. </p>

<ol>
<li><p>Ports should be different for every node</p></li>
<li><p>From my testing in the past there can only be 1 server=1 when running the same nodes for the same altcoin.</p></li>
<li><p>Specifying a -datadir on each node is required because if not it will on look in the default location.</p></li>
<li><p>Each Node should be different ports and datadirs, if it's the same altcoin then there should only be one node with server=1.</p></li>
</ol>

<p>I hope this helps.</p>

CC BY-SA 4.0
2018-10-24T00:22:43.587Z
2018-10-25T15:00:43.047Z
2018-10-25T15:00:43.047Z
user54097
<p>Your problem here is nodes are trying to use the same port Accept connections from outside.</p>

<p>You have to change the default port or disable listening.</p>

<pre><code>-port=&lt;port&gt;    Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)
</code></pre>

<p>or </p>

<pre><code>-listen Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)
</code></pre>

<p>If you want to add another peer just simply add "-addnode:127.0.0.1:" to mycoind command.</p>

CC BY-SA 4.0
2018-05-05T10:42:09.377Z
2018-09-30T16:41:38.850Z
2018-09-30T16:41:38.850Z
Tailer
<p>I have created an altcoin base on litecoin source code. I want to test it in multiple node to test peers of each node weather each node can connect to each other. So I try to run "mycoind" in multiple but it not work. Any way for me to run multiple node in same ubuntu machine? </p>

CC BY-SA 4.0
2018-05-04T16:26:56.877Z
can you provide the last few lines of debug.log and config files?
Tailer
CC BY-SA 4.0
2018-05-04T17:54:21.067Z
My config file:
rpcuser=dogerpc
rpcpassword=DLKKWE93203909238dkkKKeowxmIOw0232lsakwL02k
rpcport=8334
rpcallowip=192.168.1.*
rpcallowip=127.0.0.1
server=1
daemon=1
listen=1
testnet=0
D Nguyen
<altcoin><litecoin><nodes><peers>
How to run multiple node in same machine?
D Nguyen
# How to run multiple node in same machine?

(Asked by: username_0 on 2018-05-04)

I have created an altcoin base on litecoin source code. I want to test it in multiple node to test peers of each node weather each node can connect to each other. So I try to run "mycoind" in multiple but it not work. Any way for me to run multiple node in same ubuntu machine?

**Tags:** altcoin, litecoin, nodes, peers

> **Comments:**
> **username_1**: can you provide the last few lines of debug.log and config files?  
> **username_0**: My config file: rpcuser=dogerpc rpcpassword=DLKKWE93203909238dkkKKeowxmIOw0232lsakwL02k rpcport=8334 rpcallowip=192.168.1.* rpcallowip=127.0.0.1 server=1 daemon=1 listen=1 testnet=0  

---

## 3 answers

### Answer by username_2 on 2018-09-30. Score: 1

Try to use -datadir with mycoind and specify that node's data directory address there.Remember each peer needs different port and rpcport, so for example :

```
 mycoind -port=<port> -rpcport=<rpcport> -datadir=/home/user/.mycoind2(or whatever) -(other parameteres)

```

I you want to add node just simply use "-addnode=127.0.0.1:" along mycoind command.


---

### Answer by username_3 on 2018-10-24. Score: 0

It is definitely a combination of all of the above answers.

1. Ports should be different for every node
2. From my testing in the past there can only be 1 server=1 when running the same nodes for the same altcoin.
3. Specifying a -datadir on each node is required because if not it will on look in the default location.
4. Each Node should be different ports and datadirs, if it's the same altcoin then there should only be one node with server=1.

I hope this helps.


---

### Answer by username_1 on 2018-05-05. Score: 0

Your problem here is nodes are trying to use the same port Accept connections from outside.

You have to change the default port or disable listening.

```
-port=<port>    Listen for connections on <port> (default: 8333 or testnet: 18333)

```

or

```
-listen Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)

```

If you want to add another peer just simply add "-addnode:127.0.0.1:" to mycoind command.


---

