Do I need to open any ports on my router so that my node will be discoverable using a public internet connection

We’re using Healia with Electron to create a lightweight replica of the IPFS Desktop clone. I started my node and uploaded one file, which is stored locally and has a CID. When I kept the node running and checked using pl-diagnose, I entered the CID of my file and also tested the reachability of my node; both failed.

As I’m new to networking, please bear with my simple question: Do I need to open any ports on my router so that my node will be discoverable using a public internet connection?

1 Like

First:
Would it be fair to say you’re working on a “helia-ui” that is an “IPFS-Desktop” that uses Helia instead of Kubo? If so… this is beautiful and I’ve been wanting something like this for a while =D

Second:

You may need to open any ports on your router, but we have some tools that try to do “hole-punching” for you.

You can see the libp2p listen defaults set by Helia here for nodejs, and here for the browser.

Helia will configure libp2p to try to use AutoNAT and upnp-nat (npm-package here) in nodejs to holepunch for you. There are a list of pre-reqs for upnp-nat to work properly:

For this to work there are some prerequisites:

  1. Your router must have UPnP support enabled
  2. Your libp2p node must be listening on a non-loopback IPv4 address
  3. You must not be double-NATed by your ISP

If it doesn’t work automatically, which is possible with some routers’ default config, you may need to expose a port.

I hope that helps.

1 Like