Need Input on How DAppNode Assigns Host Ports, to help put Multiple Nodes on the Same Network

Is there a DAppNode developer who can comment on how the Host Ports are assigned to Dapps by DAppNode?

I’m trying to determine what changes I need to make so that I can run 2 or 3 DAppNodes on the same network. The issues, as I understand it, is that the nodes run into port conflicts.

So as a first step, I started mapping out the ports that my firewall is reporting as being in use, and then comparing that with the ports that my 2 nodes say they are using.

My first round of discovery ended up with this chart:

On the left, I started with a list of all the ports on my firewall. Then I looked at each node, and listed out the ports they said they were using.

I will point out that Node 2 is my test node, where I have the SSV test running.

I have tried to separate the nodes by not running the same services on both nodes.

IPFS presented a conflict, so I just turned it off on my test node.

But as I was playing with ports today, I manually reassigned Node 2’s IPFS from 4001 and 4002, and I set it to 4003 and 4004. That seemed to solve the problem.

There were a few ports that were in conflict. Ports 49154, 49155 and 49156, for example, were in use by both nodes.

But then things got hinky.

I stopped and started some services, and I noticed that the Host Port changed when I restarted them.

@Voss mentioned something about this to me the other day, but I didn’t wrap my head around it at the time.

So ports that I had previously noted in the chart were now closed again (marked as Disappeared).

In general I’m seeing that it’s assigning ports between 49150 and 49199 to the apps

But I’d like to understand if it’s just random, or if there is any reason to it.

I’d also like to know if it’s testing the port to see if it’s in use before it assigns it.

But looking ahead, I’m starting to think that perhaps a numbering scheme could be developed where a Node could be assigned to a range.

Node 1: ports 49150 to 49199 (the current range)

Node 2: ports 49250 to 49299

Node 3: ports 49350 to 49399


If the node could be instructed to use range 1, range 2, etc, then up to 9 nodes could work on the same network without conflicting.

So is there a developer who can comment on how the ports are assigned, and whether a system of assigned ranges might work? @Lanski @Tropicar @pablomendez_95

Thank you!

Maybe I’ll go copy this thread into the online forum, in case that’s a better spot for it.