Discourse on Google Cloud port issue?

Hi all! I have tried a couple of times now to get Discourse up and running on Google Cloud. Currently on my third attempt with creating a VM instance (Ubuntu 18.04 minimal), and manually installing Discourse through terminal. Following the guide, everything seems fine - but having finished ./discourse-setup, I can’t reach the site.

I also tried installing Discourse with Googles Marketplace “One-click” deployment solutions (Google’s own and Bitnami’s). Doing so, I could access the Discourse landing page.

I suspect something is up with Google and the ports (and that this problem was avoided with the readymade installs) - but I know too little about all of this to debug it on my own. Any thoughts?


Could this be related to firewall?
As per my understanding G Cloud needs us to check two checkboxes to allow public access to a VM. The same can be configured later if need be


Hey Bhanu, and thanks for suggesting!

Those boxes are already checked!

Still not working. Trying to ping the site, all seems good:

SSH:ing in to the site, and running netstat to check ports gives this:

But I’m not that familiar with netstat.

1 Like

I am now thinking that perhaps I am not running a web server? Do I need to install Nginx before/after I install Discourse or something? Following a train of thought from this thread, identical to my issue.

Okay, I am beginning to think that this is the issue. It seemed like Nginx was installed, but wasn’t running. I killed the PIDs 14311 and 14295 of docker-proxy, and then ran Nginx. Now Nginx is bound to port 80 and when I access my site, I am welcomed by Nginx!
Now to get the Docker/Discourse thing running again.

I also found this guide on installing Discourse/Nginx on an older Ubuntu version. They seemed to change the port for Docker, from port 80 for some reason. Perhaps there is some conflict here.

Somehow managed to have both the Nginx running on port 80, and the Docker-proxy listening on ports 8060 for http and 9443 for https (as suggested by some other tutorial). But having achieved this, I am now lost again. Discourse seems like a such a nice forum, but apparently impossible to install on Google cloud for noobs like me.


You don’t have to run a dedicated web server unless you plan to use server for more than hosting discourse since discourse comes with nginx server already built in. Could you confirm your server is assigned with a public IP address and the same is configured to allow external connections to ports 22, 80, 443 ?

See: VPC firewall rules overview  |  Google Cloud


Yes. My VM instance on Google has a public IP and is allowing traffic on 22, 80, 443.

I reckon this was also demonstrated when I killed the docker-proxy process PIDs (on ports 80 and 443) started Nginx (on port 80) and was able to access the Nginx landing page on my site.

1 Like

So it indicates something wrong with the installation itself.
If it’s a fresh install, its probably easier to just nuke the VM and set up again.


I’ve actually installed it 3 times already, and the ports turn out unbound everytime. Have done three successful installs, but never been able to access the forum. So I’m looking into just using the Google version, (which works but doesn’t let me set SMTP), and then find a way to set SMTP from the Google version.

1 Like

Can I somehow set up SMTP after the installation is complete?
Following “Step 11” on this link I could [create, because it doesn’t exist, and] edit the discourse.conf file. After doing so, I apparently could restart the “discourse service”, and test my email settings?

So that means that I don’t have to reinstall Discourse, correct?

Looking at my running services, however, I see nothing called “discourse”, eventhough my Discourse forum is obviously up and running.
Shouldn’t Discourse be visible here? Is there some other service here that I could restart, which in turn would restart the Discourse service?


I’m sorry, I have no clue as to how the Google cloud image is set up. I have done more than a dozen installs (including one in last week) and I’m pretty confident it is probably something to do with the way your VM is configured.

This is my prep steps before following the official install Guide:

  1. Set up compute engine to allow HTTP & HTTPS traffic.
  2. Set up DNS and confirm
  3. Ensure connectivity to my VM through SSH.

I can assure that the process works

Ps: I generally use the minimal version of Ubuntu on Gcloud to install discourse

1 Like

Have you not been doing Discourse official Standard Installation?

1 Like

Hm. So weird. But thanks for confirming that it is indeed possible on Google Cloud. I also think Discourse installs well, and that the VM/ports are the issue. Will give it a fourth try tomorrow then. Eventhough I’ve done those prep steps each time. Thanks Bhanu.

@pfaffman I have.


Also, it’s not really the “Computer Engine” that you allow HTTP/HTTPS traffic to, right? It’s the “VM instance” ?

1 Like

Compute engine is the Google lingo for a VM iirc

1 Like

Discourse-setup checks ports when your run it. Are those tests passing?


Gonna look into it now. Just removed old instances and project, started new project and instance on Google cloud. Will try to install Discourse now and report back the ports checked!


Okay, so a couple of days later. It is working!

I did the same process one more time, but I was more careful with each step this time.
Scratched my instance and project on Google Cloud, and began with a fresh project.

I then created a new project, and a new instance. Ubuntu 18.04 LTS minimal. HTTP/HTTPS enabled. Before following the official guide, linked above, I did as Bhanu said and tested connectivity. I followed Google Clouds “welcome tutorial” which also involves trying on a python server script on port 80, etc.

During the “official guide” process, I was very careful setting up SMTP. For some reason I decided to not use Mailgun, but instead ending up using Sendinblue. Which works great!

I really don’t know what was the difference this time, but it is working now. Thanks for discussing with me in the thread!


I don’t know why I can’t edit my previous post, but moderator may merge them.
I just wanted to add that I think my problem and solution MIGHT have been that I was too eager.

Because of having installed a faulty plugin, I recently had to scratch and reinstall my discourse instance. When I started this new instance, I got a new IP. So I went to my hosting service, updated my A-pointer/DNS, which points my subdomain discourse.mydomain.com to the IP of my Google Cloud instance, and then I went back to my Google Cloud SSH to run the setup.

When you run ./discourse-setup the first time, the setup checks the ability to bind to ports 80 and 443. But for some reason, it once again refused to bind to 80 and 443. I looked up the DNS by who.is and the subdomain resolved fine to the IP and all - but it still didn’t work. Tried running ./discourse-setup 3 times, no luck. Checked with netstat -ltnpu, nothing special. Waited 5 more minutes, ran it a fourth time, and now it worked.


Can’t edit my previous post. But I actually had issues installing again. This time I also added the following allowances in my firewall:

The SMPT probably isn’t necessary, but the “Egress” for 80, 443 seem to have been.

1 Like

I think there is no need to configure any outbound rules as all ports are open by default except port 25 which is always blocked.