Report this

What is the reason for this report?

Can't reach django app when running python manage.py runserver 0.0.0.0:8000

Posted on May 23, 2021

I have followed the https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04 tutorial on setting up a django server but i cant reach my app outside the server, i have already open up port 8000 using ufw, what might be the error?



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.

After many many hours of research i came across this post in stackoverflow https://stackoverflow.com/questions/56117774/digital-ocean-open-port-8080-for-spring-boot-application basically the important part was this I’m not 100% sure why, but the Firewall rules from the Digital Ocean Firewall Control panel were interfering with my droplet configuration.

I’ve deleted the Firewall rules from the control panel and now netstat reports that my 8080 port is open and I’m able to talk to the server from the outside world, finally.

I deleted the Droplet firewall rules and let only the rules created with ufw and the issue was fixed. hope it helps

Hi @marosersa,

I see you found a solution but yes, by Default ports are closed to public reach unless specifically specified. As such you had to open the port on either UFW or Iptables depending if ufw is enabled.

Additionally, there are times where if you configured rules on the Digital Ocean Firewall Control panel they can further interfere with the reach on certain port.

Anyway, thank you for posting your findings and solutions for other users that find this Quesiton.

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.