Discourse Install on Lightsail

Hello world, I’m trying to get my first Discourse forum running, and I need some help…

The settings in app.yml all look fine. I’ve tried rebooting, but Discourse is unavailable. Any tip on how I can start troubleshooting would be greatly appreciated.

I’m not very sure about Lightsail but in case of AWS, when a domain is not pointing to their IP properly, 90% of the time, security groups are to be blamed. Can you try opening the necessary ports (80,443,587 etc) in the AWS security group for your vps?

Thanks for your reply. I opened up these ports (443 and 587 were closed) and rebuilt the app, but still no luck. I suspect it’s something on the DNS side, but I’m not sure what else to change. I don’t currently have becomeachiron.com set up, just the subdomain. Seems likely that could break the subdomain, but I am not sure where to host it on Lightsail.

How did You set up just the subdomain ?

We have recently moved to discourse and Amazon lightsail (so I have little expertize)
I have exactly that config and I could install discourse with no problem at all.
I have installed the official Debian AMI from amazon first.
Then configured the hostname to my domain (discourse.becomeachiron.com).
Then upgrade debian to last version

sudo apt update
sudo apt upgrade

And then followed the instructions to install discourse (install git and then discourse).

No problem, it worked.

I had to open 443 port in order to get https working (and configure it in discourse).

The problem you describe seems related to DNS and IP resolve.

In lightsail there are 3 IP address for a machine.

  • The static private IP that is only accesible from internal network machines in the same region as you.
  • The dynamic public IP assigned dinamically when you launch the instance, which is lost each time the machine is stopped and your receive a different one when started.
  • The public static IP address that you can assign to the machine. This address is permanent (but they bill you for it if the machine is stopped, it is very little but you pay for hour if the machine is not running).

Have you assigned a static public IP address to your machine?

If you have, that is the IP you have to configure in your DNS.

If not, you have to use the public IP adress, and change it each time you start the machine, as it changes (I suppose you can install a dynamic ip client in your machine that does that authomatically if you find one compatible with amazon dns).

Then you need wait a while for dns changes propagation.

It doesn’t look like you’ve set up the domain:

 pfaffman@balloon:~$ dig +short discourse.becomeachiron.com @NS-1041.AWSDNS-02.ORG

returns nothing. This link will test for propagation, but at this point, their is no record of your subdomain at the AWS name servers.

There is no record because it seems he is not using Amazon DNS, he says it is working with google dns.

So he has to configure it in google.

discourse.becomeachiron.com resolves right now to

Thank you all for your replies. Ideally, I would host Discourse on the domain - not the subdomain, but every set of instructions I can find insists on a subdomain. Is this a necessity?

I’m also hacking away at all this right now :slight_smile:

I have read it is possible to use the plain domain with no www or discourse subdomain.

But it is not the default config and it seems it is not so easy, perhaps it is better to try first the default way, as you did.

I insist: Have you configures a static ip address for your lightsail instance?

By default it is made dynamic.

If not, create a static IP.

Go to lightsail panel, select your instance and open “network” tab.
Then select the “create static ip”.

Your instance will receive a new permanent ip address.

Then go to google dns and register that ip with your machine name.

Here’s where I am now:

in Lightsail

  • created a static IP and attached it to my instance (thanks, fernando)
  • created a DNS zone

in Google Domains

  • updated the name servers to those from the DNS zone
  • created a subdomain and pointed it to the static IP

Discourse is set up properly - I can access it via public IP. Unless I’ve missed something, now I wait until propagation.

Your are doing something wrong.

Your SOA registers point to aws dns servers, not google, and you say you are changing the dns registers in google.

primary name server = ns-612.awsdns-12.net
responsible mail addr = awsdns-hostmaster.amazon.com
serial = 1
refresh = 7200 (2 hours)
retry = 900 (15 mins)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)

becomeachiron.com nameserver = ns-1041.awsdns-02.org
becomeachiron.com nameserver = ns-1824.awsdns-36.co.uk
becomeachiron.com nameserver = ns-216.awsdns-27.com
becomeachiron.com nameserver = ns-612.awsdns-12.net

Change your dns settings in amazon dns, or change your soa registers to point to google if you are using google dns.

1 Like

Right! That’s what I was saying. I guess I should have included the whois record. You did a better job of explaining than I did.

So change either the whois record or update aws name servers.

1 Like

I had not understood you, sorry.

1 Like

I’m confused… I registered through google domains but Lightsail generated the name servers.

You can register the domain with one registrar and use the dns in other provider.

When you purchase a domain you purchase just the name and the SOA register that resides in the server of the domain registrar.

DNS services are independent of domain provider.
The SOA register tells you were your dns servers reside.

Of course many domain registrars offer you DNS service included in the prive, like google domains.

But you have purchased DNS services with amazon lightsail and it has changed your SOA register in google.

I have not purchased DNS services with amazon, I am using external dns services (amazon charges you for dns service, as long as I know).

In that case you have to update DNS records by your own in your provider (google in your case).
In this case you have to change the SOA register to the default configuration in Google dns.

Or you can use amazon dns services and update registers with them. In this case you leave the SOA register as is and use amazon tools to change dns records.

If you are using mail service with amazon, may be that you have accepted to change your SOA register and point it to amazon services.

1 Like

What you essentially need is the public IP address of the lightsail vps and then choose to manage your dns wherever you like.

If you’d like to manage those through amazon, you can use route53 and it will give you nameservers that you can update in your domain’s settings at registrar (i.e. google)

Or you can edit the current zone file (in the manage DNS section of your domain) and update your A record there.

As I read above, you’d like to host on primary domain, I can help you set that up. It’s just like normal install and it’s totally okay to do so as sometimes, people just want their forum on a different domain

E.g. twitter community forum

1 Like

Thank you all again! I’m in business: http://discourse.becomeachiron.com/

I’m still sorting out how these pieces exactly work together - I don’t dabble in DNS stuff regularly. Now I need to get my primary domain up somehow :slight_smile:


Seems like you’re using AWS route53 to manage Your DNS

So for primary domain, take these steps:

  1. Create an Alias (A) record for primary domain (Denoted by @) Pointing to Your Lightsail IP
  2. Edit Your app.yml file to use primary domain
  3. Rebuild
  4. Run a discourse remap

That’s all You have to do.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.