By Muiren
I used the One-Click Install for Discourse. During install and setup of the Admin, I forgot that Gmail addresses don’t work with Discourse. What command do I use from the droplet console to update SMTP to the transactional mail service I have now?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya @muiren,
If you’ve installed Discourse using the one-click install and wish to update your SMTP settings after the fact, you’ll need to modify the app.yml configuration file and then rebuild the Discourse container.
Here are the steps to update the SMTP settings:
SSH into your droplet:
ssh root@Your_Droplet_IP
Navigate to the Discourse Docker directory and edit the app.yaml:
cd /path/to/directory/of/discourse
Once in there do
`nano containers/app.yml`
Find and update the SMTP settings. They usually look something like this:
DISCOURSE_SMTP_ADDRESS: smtp.example.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: user@example.com
DISCOURSE_SMTP_PASSWORD: yourpassword
# DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, true by default)
Update the above values with your transactional mail service details.
Save and exit. If you’re using nano, you can do this by pressing CTRL + X, then Y, then Enter.
Rebuild the Discourse container. This step applies the changes you made to the app.yml file.
./launcher rebuild app
The rebuild process may take a few minutes. Once completed, your Discourse instance should now use your new transactional mail service for sending emails.
Remember, if you’re using a new SMTP service, ensure you have set up SPF and DKIM records properly for your domain to avoid email deliverability issues. Also, double-check that your mail service allows the volume of transactional emails required for your forum and that it doesn’t block or rate-limit messages coming from your Discourse instance.
Hello, @muiren
You can update the Discourse SMTP settings by running the following command in your droplet console:
- sudo discourse-setup
This will open the Discourse setup wizard, where you can update the SMTP settings.
To update the SMTP settings, select the “SMTP” tab and enter the following information:
Once you have entered the SMTP settings, click the “Save” button.
After you have updated the SMTP settings, you need to restart the Discourse service. To do this, run the following command:
- sudo systemctl restart discourse
Once the Discourse service has restarted, you should be able to send and receive emails from your Discourse forum using your transactional mail service.
Note: If you are using a transactional mail service such as Amazon SES or SendGrid, you will need to generate an API key and enter it in the Discourse setup wizard.
Here is an example of how to update the Discourse SMTP settings to use Amazon SES:
- sudo discourse-setup
Select the “SMTP” tab.
Enter the following information:
email-smtp.us-east-1.amazonaws.com587Your_SES_UsernameYour_SES_API_KeyClick the “Save” button.
Restart the Discourse service:
- sudo systemctl restart discourse
Once you have completed these steps, you should be able to send and receive emails from your Discourse forum using Amazon SES.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.