Community icon indicating copy to clipboard operation
Community copied to clipboard

Suggestion: move IPFS port from 8080 to something else

Open karalabe opened this issue 7 years ago • 4 comments

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.

karalabe avatar Jan 08 '18 18:01 karalabe

This port is set by default when running ipfs init

kenshyx avatar Jan 08 '18 18:01 kenshyx

Perhaps manually override it after it's inited?

karalabe avatar Jan 08 '18 18:01 karalabe

Or use something like https://github.com/sindresorhus/get-port before starting the node

kenshyx avatar Jan 08 '18 18:01 kenshyx

If you request port 0, the OS guarantees an empty one.

karalabe avatar Jan 08 '18 19:01 karalabe