I have a libp2p running inside a nodejs server.

From outside the docker I can connect to the node by using p2p addr: /ip4/… so I know the libp2p node is up and listening and docker-proxy is connecting to the container on that port.

The port is open as

sudo ufw status


To Action From

3333 ALLOW Anywhere
3333 (v6) ALLOW Anywhere (v6)


sudo netstat -plunt | grep 3333
tcp 0 0* LISTEN 6539/docker-proxy
tcp6 0 0 :::3333 :::* LISTEN 6545/docker-proxy

But from any other computer I get connection refused by both a libp2p node and the ubuntu command:

nc -zvw10 ip-address 3333

What is wrong?


When creating the libp2p node the ip address must be instead of or the real server’s ip.

Then, when trying to remotely reach the libp2p node, the ip has to be that of the server (the one that ping your-domain.com returns)

Imo 80% of development pain comes from too simple examples in the “documentation”