Community
Community copied to clipboard
Suggestion: move IPFS port from 8080 to something else
Since IPFS is started as a background service for Akasha without any expectancy of manual interfacing with it, there's no particular reason to have the gateway run on port 8080 by default. It could be an arbitrary exotic port.
However, defaulting it to port 8080 is a problem, because it clashes with web services the user is building and running on their machine. My easy fix suggestion would be to pick a less common number (e.g. 8079) and run the gateway on it, preventing clashes with other web services.
My more complex fix would be to let IPFS pick its own port number via requesting port 0
and then retrieving the actually chosen port. This would ensure that no matter what the user is running, there will never be a port clash with IPFS.
This port is set by default when running ipfs init
Perhaps manually override it after it's inited?
Or use something like https://github.com/sindresorhus/get-port before starting the node
If you request port 0, the OS guarantees an empty one.