Removing Let's Encrypt from installation choice

AI-generated summary

In a self-hosting discussion titled “Removing Let’s Encrypt from installation choice,” KWCT encountered an issue during a new Discourse installation where the Let’s Encrypt option was incorrectly auto-populated as “SMTP username” due to a copy/paste error. Despite re-running ./discourse-setup, the option remained stuck. pfaffman clarified that entering “OFF” (not “n”) disables Let’s Encrypt, but KWCT confirmed that “n” only retries the setup without resetting the Let’s Encrypt field. An error message (./discourse-setup: line 413: [: SMTP: binary operator expected) suggested a corrupted or outdated setup script. KWCT resolved the issue by completely wiping /var/discourse and reinstalling from scratch, which worked but also deleted the database. pfaffman later advised that users can instead delete only containers/app.yml to reset configuration without losing data, and noted the error might indicate an outdated version of the setup script. The thread highlights how configuration errors during setup can be resolved either by full reinstall or targeted config cleanup.

Hi there,
Due to a copy/paste mess up when running ./discourse-setup on a new installation the last option is:

Let's Encrypt : SMTP username

I can’t get rid of this even when I re-run the setup. I guess that I’ll have to edit some file or something. Any help greatly appreciated.

Thanks.

I believe that the prompt says that you can enter “n” to turn it off.

Edit: But what it says is “Enter 'OFF' to disable”.

Thanks Jay, there is an “n” option, but that is just to “try again” - that still goes through the same questions without offering the Let’s Encrypt one - it’s always auto-populated for me.

I have just noticed that there is an error though after I’m asked for my SMTP Password this line is shown:

./discourse-setup: line 413: [: SMTP: binary operator expected

I guess the data that was copy/pasted in earlier has overwritten some important lines. I’m inexperienced with linux, but I’ll see if I can clean that up. I’d ideally like to wipe it all and start again from scratch at this stage.

Ah, I guess I can just start all over again. I’ve just done this and it has allowed me to put in all new info.

rm -r /var/discourse
sudo -s
mkdir /var/discourse
git clone https://github.com/discourse/discourse_docker.git /var/discourse

Hopefully there are no long term affects from doing it this way, but it seems to be reinstalling just fine now. Thanks for your help.

It was the weekend and I was on my phone. This is the prompt I was talking about (it’s “OFF” not “n”):

Also, this output:

./discourse-setup: line 413: [: SMTP: binary operator expected

Hmm. That makes me think that you had an old version. Was this a recent install?

The way that you started over blew away your database, which I hope was ok.

But if anyone else stumbles here, it might be helpful to know that this would delete just the app.yml and let you start again with the config file, but not wipe your data.

cd /var/discourse
rm containers/app.yml
./discourse-setup