Go-ipfs: docs: Which ports serve which purpose?

Created on 18 Oct 2018  路  3Comments  路  Source: ipfs/go-ipfs

Type:

Documentation enhancement

Description:

There are at least five ports that go-ipfs is listening to (compare Dockerfile), but I can't find anything specific about their purposes as a complete overview in the docs. For example the ipfs cluster docs do that very well.

As I'm intending to setup a public gateway I'd like to be informed about these aspects in order to configure the whole setup. A documentation of this can also help to understand the software's architecture.

Most helpful comment

TL;DR version before anyone writes this down properly:

  • 4001 - default libp2p swarm port - should be open to public for all nodes if possible
  • 5001 - API port - provides write/admin access to the node, shouldn't be exposed at all
  • 8080 - Gateway + read only API subset - quite safe to expose, but operating public gateway may still be a risk in some ways (there are some proposals on how to make this safer - like https://github.com/ipfs/go-ipfs/issues/5513)

There may be some other ports open by subsystems (like 5353 udp for mdns), but they don't really matter in most configs

All 3 comments

TL;DR version before anyone writes this down properly:

  • 4001 - default libp2p swarm port - should be open to public for all nodes if possible
  • 5001 - API port - provides write/admin access to the node, shouldn't be exposed at all
  • 8080 - Gateway + read only API subset - quite safe to expose, but operating public gateway may still be a risk in some ways (there are some proposals on how to make this safer - like https://github.com/ipfs/go-ipfs/issues/5513)

There may be some other ports open by subsystems (like 5353 udp for mdns), but they don't really matter in most configs

thanks so far. in the Dockerfile these are also exposed:

  • 4002/udp
  • 8081

i think regarding 8080 the wording can include something like

you may make this endpoint publicly available with a proxy or webserver as https://ipfs.example.org

Those look out of date. They should be:

  • 4002/udp is historical (was used for UTP which has been deprecated, for now at least).
  • 8081 can be used for the websocket transfer. However ,this isn't enabled by default.

But yes, this should all be commented. Mind documenting it in the docker file?

Was this page helpful?
0 / 5 - 0 ratings