Can't start the development server at

Hi guys, need some help.

I’ve installed Ubuntu 18.04 on a GCP VM. Installed Django and the ‘mysite app’ from Django. Then initiated the following command ‘python3 runserver’. I’m getting the error from below on a chrome browser.

I’ve already allowed all ingress traffic on the GCP firewall.
Any ideas why I can’t start from the mysite folder and view it on a browser?
Thanks in advance!

This site can’t be reached refused to connect.


ERR_CONNECTION_REFUSED is the localhost address - it’s a reference to the machine on which the browser is running. It’s not the address of your GCP VM.

Additionally, I suggest you read the runserver documentation, especially the parts about not using runserver in a production environment.


Try to figure out your GCP VM ip address, let’s say it’s, then your Django server should be available at

Thanks both! Tried with the public IP and still doesn’t work. I’ve identified my GCP VM public IP address and used that with ‘http://’ as prefix and port :8000 as a suffix. Here it it:

I also tried to ‘runserver 80’ so that it runs on port 80.

I changed the firewall ingress to allow all TCP / HTTP traffic, and still doesn’t work.

I also checked for any firewall rules in the Ubuntu OS but they are already disabled.

Any suggestions?

Again, I suggest you read the runserver documentation, also referencing the section Listening on different addresses


If you receive the error message that port is already in use, tell Django to use a different port by entering python runserver 8001, and then cycle through higher numbers until you find an open port.