3

I'm following this tutorial online https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html

I get to an intermediary step where I want to check if I can access the app on the IP address. I run python manage.py runserver 0.0.0.0:8000 which returns the following:

System check identified no issues (0 silenced).
November 22, 2018 - 17:41:08
Django version 2.1.3, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

So no errors. Then I navigate to my_droplet_ip:8000 and I get a timeout. "took to long to respond."

I am running the runserver command from a user rather than root. Don't know if that matters...

Any idea what's going on here?

Ludo
  • 2,307
  • 2
  • 27
  • 58
  • 1
    try to `telnet your_ip 8000` from local machine, probably 8000 port is closed from external connections by default – Satevg Nov 23 '18 at 07:47
  • Ok I found out that I needed to expose my port on the server doing `sudo ufw allow 8000` – Ludo Nov 23 '18 at 11:37

1 Answers1

4

I had to expose the port 8000 by running the command sudo ufw allow 8080. Wasn't mentioned anywhere in the tutorial...

Ludo
  • 2,307
  • 2
  • 27
  • 58
  • i tried runserver earlier on, on my digitalocean vps and it worked and was displayed in my browser when i visited the link dropletip:8000, but after doing some pull request from my github repo to update the project with new features it has refuse to display or even break to give an error message... exposing the port did not help either – Brian Obot May 09 '22 at 21:02