Please simple ways to change smtp_password

I was forced to change my email password and desperately searched for where to put the new smtp_password in the admin panel.
I finally understood (here) that it was necessary to go through a modification of a file (yaml?). I have SSH access, but I am not at all comfortable with it. Could someone give me a link or complete explanations so that I can manage it: the command to edit the file to modify, where to put the smtp_password (should it be encoded?), save the file? restart Discord?
Thanks in advance.

Hi there, all you need to do is SSH in, and just do this:

nano containers/app.yml

That will open up the text editor to change the SMTP details.

Then, you can run:

cd /var/discourse
./launcher destroy app
./launcher start app

for the changes to take effect.

A simpler way would be to run ./discourse-setup again, and fill out the details again.

Thank you very much for this fast answer.

If I run ./discourse-setup All my settings will be destroyed ?

No, I don’t believe it does. I would suggest the first option, if you have more things to edit.

.\discourse-setup will likely not work, use .\launcher rebuild app after CTRL+x in nano containers/app.yml

Thank you all for the quick answers. I’ll summarize for beginners like me:

  • Log in via SSH

  • Edit the file containing the password
    sudo nano /var/discourse/containers/app.yml

  • Find the line containing the password
    DISCOURSE_SMTP_PASSWORD: “your_smtp_password”

  • Enter the new password in plain text (deleting the old one)

  • Save the new file ctrl x / Then confirm O (yes) or Y (yes) / Then enter

  • Rebuild (this may take time)
    cd /var/discourse
    ./launcher rebuild app

1 Like

i would recommend backing up the database before (and after) rebuild, but you probably did that before logging in via SSH

i like that you’ve included instructions for how to use the nano text editor

Do I have to rebuild? Rebuilding is too slow :weary_face: