netbox-community / netbox-docker

🐳 Docker Image of NetBox
https://github.com/netbox-community/netbox-docker/wiki
Apache License 2.0
1.73k stars 800 forks source link

Change default port to avoid conflict with Portainer, other services #1261

Closed ioctl2 closed 3 weeks ago

ioctl2 commented 1 month ago

Desired Behavior

Port 8000 is also one of the default ports for Portainer, a commonly used docker management service. It would be nice if the default port, as recommended by the docs and the sample yml, used a port that's less likely to conflict with other services.

Contrast to Current Behavior

Presently, setting up Netbox as per the guide without any changes on a system running a default install of Portainer will result in a port conflict, and Netbox won't run. A port change is needed before it will run.

Required Changes

Change port 8000 to something less frequently used.

Discussion: Benefits and Drawbacks

This is just a small change in the doc.

cimnine commented 4 weeks ago

Thanks for the suggestion. The whole point of the override file is that everyone can change that port to their liking. I see very little benefit in changing that port to something else in our instructions. Currently, it's intentionally not 8080, which makes it more obvious to the keen observer that 8000 is the local port that needs to be changed if needed. Were it 8080:8080, one would have to look up in the compose specs which port is the local part and which is the container part.

Changes like this one usually also have unintentional side-effects, like tutorials / blog posts / videos that no longer work.

Unless there are more reasons I don't see, I believe the status quo is good enough.

ioctl2 commented 4 weeks ago

Thank you for explaining your reasoning. Perhaps it would be helpful to instead add a quick note under the Quickstart section that the port should be changed if it's already in use? I know that the Getting Started guide explicitly talks about it, but I feel like a small warning on the main page could be helpful as well.

No worries about changing the default port. I take your point that it can be disruptive and have undesired consequences. Thanks again for the input.

cimnine commented 3 weeks ago

Perhaps it would be helpful to instead add a quick note under the Quickstart section that the port should be changed if it's already in use?

The Quick Start section tries to be as short as possible. I don't know Portainer well, but its documentation says that the port 8000 is optional, and therefore it's probably not enabled for many anyway. So I am not convinced that this rare case warrants expanding that section for what – to me – seems to be an advanced Portainer feature anyway.