Report this

What is the reason for this report?

Django server stopped running

Posted on March 4, 2019

The web server was running, everything was OK. But after rebooting it runs only on local IP (python manage.py runserver). When I’m trying to run command python manage.py runserver ip_address:8000 it is just thinking a lot without any result. Can you help me, please?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try this and see if it helps:

python manage.py runserver 0.0.0.0:8000

Cheers

Heya,

For anyone having similar issues you can follow some of these steps:

The Django development server (python manage.py runserver) binds to 127.0.0.1:8000 by default. To serve on a specific IP address, you need to explicitly specify it:

python manage.py runserver 0.0.0.0:8000
  • Replace 0.0.0.0 with your server’s IP address if required.

If it hangs or takes too long:

  • Confirm that the IP address is valid.
  • Check for firewall rules (next steps).

Ensure that the server allows traffic on port 8000. Use the following commands to check and open the port:

sudo ufw status
sudo ufw allow 8000

If this is for deployment, the Django development server is not recommended. Use a production-ready server like Gunicorn or uWSGI with Nginx or Apache.

Example with Gunicorn:

pip install gunicorn
gunicorn --bind 0.0.0.0:8000 project_name.wsgi:application

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.