Search code examples
djangoipdigital-oceandroplet

django app not being served on digitalocean droplet


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?


Solution

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