Discourse not working on private AWS EC2

AI-generated summary

Deepak Bisht reports that Discourse setup on a private AWS EC2 instance fails to recognize the Discourse version when using a private IP mapped via Route 53, though connectivity to the domain succeeds. The issue resolves when using the EC2’s public IP. pfaffman explains that the standard Discourse installation relies on Let’s Encrypt for SSL certificates, which requires a publicly accessible IP. For private deployments, an unsupported setup—such as using a self-managed certificate or placing Discourse behind a reverse proxy with a valid certificate—is necessary. deepak_b requests guidance on implementing such an unsupported installation. The core issue is certificate provisioning for private EC2 instances, which Let’s Encrypt cannot handle without public accessibility.

Hi,
We have setup discourse on AWS private EC2 and we have mapped private IP of EC2 in AWS Route 53(DNS hosting).

On running /discourse-setup getting below which means ec2 machine is able to connect with domain mentioned in Route 53
Hostname for your Discourse? [testkb4.dryice-aws.com]: testkb4.dryice-aws.com
Checking your domain name . . .
Connection to testkb4.dryice-aws.com succeeded.

On running ./discourse-doctor getting below:

Discourse version at testkb4.dryice-aws.com: NOT FOUND
Discourse version at localhost: NOT FOUND

When we are providing EC2 public IP in route 53(DNS hosting) everything is working fine. Will discourse set up run only with public IP or elastic IP of EC2 machine.

Pl. help us in this.

Rgds,
Deepak Bisht

The standard install gets a certificate from let’s encrypt. That requires a public ip. If you need the server not to be accessible from the public internet you’ll have to do some unsupported install, perhaps with a certificate that you obtain some other way or behind a reverse proxy that has a certificate. Running without a certificate isn’t really supported.

Thanks Jay for your response. Can you suggest any unsupported installation of this.