How do I Change Email Adress in admin/settings/emails?

I started running discourse set up in Digital Ocean, and got the following error message, and now my Discourse board at wespenreboards.com does not load.

1 Like

It looks like you tried to put your IP address in rather than your domain name. The value in the square brackets is what is there already, so for those that you’re not updating you can press ‘enter’ and move to the next without changing anything.

You should be able to restart your instance by running:

./launcher restart web_only

2 Likes

Awesome! That worked… thank you! Now the website loads. So, the host name is the web address? I put in the IP because in WinSCP HOST is listed as the IP address.

WinSCP snap

1 Like

For that bit in discourse set-up you should just be able to press ‘enter’ and skip to the next step for that one, as it already knows it from last time. And then when you get to the SMTP specific ones you can add the new information in to overwrite what was there.

But it doesn’t work with IPs, only domains. :+1:

3 Likes

I just thought I’d check in and see how you’re getting on. :slightly_smiling_face: Have you managed to get it going yet?

2 Likes

Thanks for checking in, Jammy. I’m a little slow because I’m also in the middle of moving to another country. So, I haven’t tried yet.

I had already logged out of the console when you suggested I continue there, so I think I need to start all over with my host name. And again, it’s the discourse.example.com, right?

If something goes wrong in the process that affects the users negatively, e.g., Discourse goes down like last time, is there a “universal” command to undo what I did, so Discourse at least works as before I started using the console? Just want to cover my back :slight_smile:

2 Likes

That’s okay, I don’t want to rush you. :slightly_smiling_face:

I’ll put a step-by-step in so you can refer to it when you’re ready:

  • Open up your Digital Ocean console
  • cd /var/discourse
  • ./discourse-setup

This will then ask a sequence of questions. As your forum is already up and running, you’ll see that the values in the square brackets (eg [discourse.example.com]) are prefilled with your existing information:

wespenreboards.com

If that information doesn’t need changing, then you can just press ‘enter’ and move to the next question.

Here are the questions it asks:

Hostname for your Discourse? [discourse.example.com]: 
Email address for admin account(s)? [me@example.com,you@example.com]: 
SMTP server address? [smtp.example.com]: 
SMTP port? [587]: 
SMTP user name? [user@example.com]: 
SMTP password? [pa$$word]: 
Let's Encrypt account email? (ENTER to skip) [me@example.com]: 
Optional Maxmind License key () [xxxxxxxxxxxxxxxx]:

The ones you want to add new information for are the SMTP ones. The SMTP port will still be 587, so you can just press ‘enter’ for that one too. The other information you’ll need to get from your mail provider (sendinblue, I believe).

Once all the information is entered, it will give you an opportunity to review what you’ve put, and then will rebuild your instance with that new information. All being well, that’s all you need. :+1:

If for some reason it doesn’t work (like yesterday), then running ./launcher restart web_only should bring back your pre-rebuild version again.


From one of your previous screenshots, it looks like you could do with a bit of server maintenance too, but we can go over that if you’re interested once we’ve got your email working. :slightly_smiling_face::+1:

2 Likes

This is great help! Thank you. I’ll be back here as soon as I’ve tried, and whether successful or not, I’ll let you know :slight_smile:

2 Likes

I ran it and got the following error message at the end:

Then I tried to restart web_only and got the following error message, and now my Discourse is down. What to do?

1 Like

It looks like the letsencrypt email wasn’t accepted.

But to bring your old one back you can:

./launcher restart data

And then

./launcher restart web_only

1 Like

It still doesn’t let me. Do I need to logout from the console first and then run restart data and then web_only?

Not sure what this means, either: Cannot link to a non running container: /data AS /web_only/data

1 Like

In my container, it looks like this. Don’t know if that’s how it should look like?

container

1 Like

Those extra web_only files are the two tries we’ve had at updating it. They’d be cleaned up during a cleanup (though don’t run one until we have your site up and running, as it will tidy up anything not actively attached to something :slightly_smiling_face:).

I have mirrored your set up on a test site (two container and sendinblue SMTP) to try and get a better idea of what’s happening. When I received the Cannot link to a non running container: /data AS /web_only/data message, restarting the data container and then restarting the web_only container worked for me. But I’ve just tried to snarl up a re-run of discourse-setup in a similar way to try and replicate your exact situation for a better understanding.

I maybe should say that a one container install is much more widely supported, so if this is proving too frustrating an alternative option could be to create a new Digital Ocean droplet and install a fresh instance using the standard install guide. You can then restore a backup, and hopefully have a much easier time looking after it.

1 Like

You can do a

 ./launcher destroy web_only
 ./launcher start web_only

And that will get you connected to the data container.

If all you want to do is change the smtp settings then you might just edit the web_only.yml with nano and then do the destroy, start sequence above.

3 Likes

I logged out of the console and opened up a new one and followed your instructions, but I get the same error message, cannot link to a non-running container.

Is there any way I can just get things back to where it was before I did the smtp setup in the console? I can’t do a complete new setup of Discourse now. It’s too frustrating when I’m in the middle of moving.

Thanks Jammy.

2 Likes

Luckily the cavalry has arrived again. :slightly_smiling_face: And I can see your site is now back up. :partying_face:

2 Likes

@pfaffman Thanks goodness, that worked. Thanks Jay!

I think I need to let this be until I am at my new location by the end of next week. The important thing right now is to keep the forum up. It seems like people can still change passwords and sign up to the forum by using their existing Google password. So, we’ll do that for now. And you showed me how to make a hard drive backup from WinSCP yesterday. So, we’ll work with that for now, I think.

Thanks again!

EDIT: When I said it’s working, I meant the site is up and running. I still need to try the rest of your suggestions to change the SMTP directly, but I will probably do that later.

2 Likes

I have a hard time giving up LOL. Jay, Jammy, or someone else, can you see any discrepancies in this? For example, I typed OFF after LETSENCRYPT_ACCOUNT_EMAIL:: Not sure if that was correct…

## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: smtp-relay.sendinblue.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: wespenre2@gmail.com
  DISCOURSE_SMTP_PASSWORD: "removed in this paste"
  DISCOURSE_SMTP_ENABLE_START_TLS: false           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: gmail.com
  DISCOURSE_NOTIFICATION_EMAIL: wespenre2@gmail.com


  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: OFF

  ## TODO: configure connectivity to the databases
  DISCOURSE_DB_SOCKET: ''
  #DISCOURSE_DB_USERNAME: discourse
  DISCOURSE_DB_PASSWORD: (removed in this paste)
  DISCOURSE_DB_HOST: data
  DISCOURSE_REDIS_HOST: data

1 Like

I left my letsencrypt_account_email as the default me@example.com (having a non-email in there will break the rebuild). I also left the DISCOURSE_SMTP_ENABLE_START_TLS: as the default true as well.

And your email domain should be your domain name, and then I think you want your notification email to have a noreply@ or similar in front of it.

Let me go and get a copy of mine

DISCOURSE_SMTP_ADDRESS: smtp-relay.sendinblue.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: admin@jammydodger.monster
DISCOURSE_SMTP_PASSWORD: "secret-password"
#DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
DISCOURSE_SMTP_DOMAIN: test.jammydodger.monster
DISCOURSE_NOTIFICATION_EMAIL: noreply@test.jammydodger.monster

## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
1 Like

Thanks Jammy. Whew, I’ll give it another try and will be back here… LOL.

Before I start, want to make sure: the noreply email, should that be noreply@gmail.com? Gmail is the only email domain I’ve been using on Discourse. Does that automatically create a noreply option at Gmail, or which domain do I use for the noreply email? Or can I, instead of having a noreply email type in wespenre2@gmail.com?

I edited the following in WinSCP (see below) by right-clicking web_only.yml, but I haven’t refreshed it yet. Want to hear your opinion first.

Then, if everything looks okay, and I refresh it, I run ./launcher destroy web_only and then ./launcher start web_only, after the refresh, right, and then it should work?

How about this?

 ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: smtp-relay.sendinblue.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: wespenre2@gmail.com
  DISCOURSE_SMTP_PASSWORD: "password"
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: gmail.com
  DISCOURSE_NOTIFICATION_EMAIL: noreply@gmail.com


  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: wespenre2@gmail.com


1 Like