Script Error Enabling Let's Encrypt on new Discourse instance

Plowing through a lot of stuff today! Trying to enable LE via the automated system in Discourse (I’ve done many LE setups on Apache sites, I’d prefer to keep this forum as stock as possible in this instance). The setup script fails after a few encouraging messages, apparently because I have SMTP USER NAME and SMTP PASSWORD commented out since SMTP doesn’t need them within my local Net – that is, Discourse doesn’t use them to feed email to my local relay site.

The setup script says:

Let's Encrypt will be enabled for xxx@xxx.com

then it says that the two ssl templates are enabled (ssl and lets encrypt),
then:

Unfortunately there was an error changing
-d This may happen if you have made unexpected changes.

And of course, https: isn’t actually enabled. Not sure how to clean this up and proceed. Thanks.

That’s right.

Can you suggest a more clear message here?

You can either edit the file by hand and follow this instructions for enabling let’s encrypt or delete app.yml, run it again, and comment out the smtp stuff after you’ve run disourse-setup. You get five seconds after it’s made the changes to your control-c before it starts to

./launcher rebuild app
1 Like

I got ssl up by using this config:

  DISCOURSE_SMTP_ADDRESS: xxx
  DISCOURSE_SMTP_PORT: 25
  DISCOURSE_SMTP_AUTHENTICATION: none
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
  DISCOURSE_SMTP_USER_NAME: foo
  DISCOURSE_SMTP_PASSWORD: bar

They key is to comment out the USER_NAME and PASSWORD again (so that SMTP will work properly) without breaking the Let’s Encrypt section on a rebuild. I’m not sure I’m understanding your instructions on the correct sequence for doing this. Thanks!

3 Likes