Script Error Enabling Let's Encrypt on new Discourse instance

AI-generated summary

The user L30110 is trying to enable Let’s Encrypt on a new Discourse instance but encounters an error during the setup script, which fails after indicating that SSL templates are enabled. The issue appears to stem from having DISCOURSE_SMTP_USER_NAME and DISCOURSE_SMTP_PASSWORD commented out, as the script interprets this as an unexpected change. pfaffman suggests either manually editing the configuration or deleting app.yml, running discourse-setup again, and commenting out SMTP settings afterward. L30110 confirms that enabling SSL works with specific SMTP settings but needs clarification on the correct sequence to avoid breaking Let’s Encrypt during a rebuild.

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

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!