How to install Discourse in the AWS EC2 Instances(Ubuntu Server LTS)?

I tried to visit Instances’s IPv4 Public IP, and it displayed that:

You need to use the name you’ve configured in DNS to access your instance, not the IP.

Accessing discourse via IP address isn’t supported.

1 Like

@Stephen Umm, I tried to visit the FQDN I input in ./discourse-setup , but:

So you’ve not done anything to tell NameSilo about your EC2 server at Amazon?

The way DNS works is that you tell the DNS server about the resources you’re trying to publish under that domain name. You need to configure an ‘a’ record at NameSilo for your Discourse instance, linked to the IP at Amazon.

Your screenshot shows discourse.example.com - I’m assuming that’s not the domain you’ve trying to work with. It might help if you give us more information about the specific configuration so that we can advise on which records to create.

NameSilo and/or Amazon aren’t psychic, they have no knowledge of one another, it’s up to you to create the necessary DNS entries so that one refers to the other.

Once DNS is correctly configured you will need to wait for the records to propagate, then rebuild your app (./launcher rebuild app) so that Let’s Encrypt can enroll the certificate.

1 Like

You need to go to NameSilo and create an A record that connects your FQDN to your site.

You might also need to make sure that ports 80 and 443 are not blocked.

1 Like

Thanks, I have

so, don’t need to check ports 80 and 443 are not blocked, right?

Thanks, the FQDN is discourse.tircklehub.com. But why I need to rebuild my app again?

If you’re using Let’s Encrypt then once DNS is configured it needs to generate a certificate, which is done when the container is built.

2 Likes

I’m using Let’s Encrypt. I rebooted Instance and without rebuild app, but the page loaded successfully. Why did it happened?

Isn’t I need to generate a certificate again when I rebooted Instance?

According to my browser, that domain doesn’t resolve.

1 Like

Because I stopped the Instance(AWS only provide 750 hours EC2 Instance free tire.). But when I rebooted Instance and without rebuild app again, the page can load successfully.

Now I start the Instance without ./launcher rebuild app. I can visit is successfully. What about you?


So why @Stephen said that?

First question, [at]Stephen told me, I need to:

because of I’m using Let’s Encrypt, and the reason is:

But, I rebooted Instance, configured DNS and without run command ./launcher rebuild app, the welcome page loaded successfully. So the question is how did it happened?


Second questions, how to auto renew Let’s Encrypt certificate?
Should I

like this Topic said(I’ve already using ./discourse-setup to enable Let’s Encrypt)?

It will auto renew. You’re all set.

1 Like

So you mean it will auto renew and generate certificate automatically?

1 Like