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.
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.
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