0.0.0.0:8000 doesn't work in web browsers without being more explicit #2146

Closed
opened 2025-12-29 17:22:41 +01:00 by adam · 2 comments
Owner

Originally created by @chicks-net on GitHub (Nov 27, 2018).

Change Type

[ ] Addition
[X] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Proposed Changes

In python3 manage.py runserver 0.0.0.0:8000 --insecure wouldn't it be easier if we specified port 80? I realize this means you need to be running as root, but most of the install process requires root anyway. When I initially read the docs I thought this was going to 0.0.0.0:0000 (all zeros) and I didn't notice while cut and pasting it. So when I got connection refused I thought I had done something wrong.

Alternatively the docs could specify that you need to go to IP:8000 in the browser instead of

if we navigate to the name or IP of the server (as defined in ALLOWED_HOSTS) we should be greeted with the NetBox home page

which doesn't imply needing to go to any specific port.

Originally created by @chicks-net on GitHub (Nov 27, 2018). <!-- Please indicate the nature of the change by placing an X in one of the boxes below. --> ### Change Type [ ] Addition [X] Correction [ ] Deprecation [ ] Cleanup (formatting, typos, etc.) <!-- Describe the proposed change(s). --> ### Proposed Changes In `python3 manage.py runserver 0.0.0.0:8000 --insecure` wouldn't it be easier if we specified port 80? I realize this means you need to be running as `root`, but most of the install process requires `root` anyway. When I initially read the docs I thought this was going to `0.0.0.0:0000` (all zeros) and I didn't notice while cut and pasting it. So when I got connection refused I thought I had done something wrong. Alternatively the docs could specify that you need to go to `IP:8000` in the browser instead of > if we navigate to the name or IP of the server (as defined in `ALLOWED_HOSTS`) we should be greeted with the NetBox home page which doesn't imply needing to go to any specific port.
adam added the status: acceptedtype: documentation labels 2025-12-29 17:22:41 +01:00
adam closed this issue 2025-12-29 17:22:41 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 28, 2018):

Don't run runserver as root. From the Django docs:

DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests.

Port 8000 is the default for the service. We're specifying 0.0.0.0:8000 here simply to make it accessible via any IP (not just the loopback) since it's likely not being installed on the local machine.

I'll add a note to the docs to make it more obvious that the service is running on port 8000.

@jeremystretch commented on GitHub (Nov 28, 2018): Don't run `runserver` as root. From the Django docs: > DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. Port 8000 is the default for the service. We're specifying `0.0.0.0:8000` here simply to make it accessible via any IP (not just the loopback) since it's likely not being installed on the local machine. I'll add a note to the docs to make it more obvious that the service is running on port 8000.
Author
Owner

@chicks-net commented on GitHub (Nov 28, 2018):

Your docs made it perfectly clear that it wasn't ready for production at this stage in the process. I just discovered this while trying to test it.

@chicks-net commented on GitHub (Nov 28, 2018): Your docs made it perfectly clear that it wasn't ready for production at this stage in the process. I just discovered this while trying to test it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2146