“Tried and Tested” - 2 days ago - Discourse install via DO & MG/Brevo

Dear Prospective Discourse Self-Hoster,

Following the long-standing Discourse partnership with Digital Ocean [1] and circumstances of 2 days ago, i’d apprecate any feedback on the below description of the actions from within a Windows 11 screen recording…


Start with Mail Gun

reaching out to their Support team to get your Free plan activated is important.

Timestamp Description
1:27 1. Navigate to login.mailgun.org in your favourite browser.
2:06 2. Click “Signup” knowing you’ll need afresh email address to register
2:35 3. Enter your full name with a friendly company name
2:56 4. Enter your work email that’s the email you’ll use to login
2:58 5. the password you choose must be at least 12 characters
6. make sure your on the desired plan type, you know what plan type you are registering for, this was to the right of the browser window
5:17 7. Enter your card details in one line of the form!(you might get an authorisation charge but i didn’t notice one)
4:00 8. don’t forget to tick-box reCAPTCHA
5:47 9. Once you’ve pressed the red button agreeing to the ToS, the next page load will be quite slow…
7:00 10. the home page you get to will tell you you should have confirmation email, but i never got one.
39:07 11. Navigate to the provider where you purchased your domain name, e.g. namecheap
12. Choose Advanced DNS settings for your root domain
38:20 13. Create a Domain in MailGun, you’ll probably want discourse. or forum., even mg.
40:36 14. Verify the domain after adding the records, if you chose root domain instead the host would be @ (namecheap). You may need to “Enable _dmarc” and expect the last record to propagate slightly slower than the rest🙂
12:24 15. Create Support Ticket to activate account in MailGun, you’ll need to scroll to bottom of help page for this important step.

Proceed with DO (Digital Ocean) SignUp

Timestamp Description
13:56 1. Navigate to digitalocean.com
14:16 2. Blue SignUp button at top right
14:28 3. you can Sign Up with Google
4. SSO will request basic profile information
14:43 5. DO will want to know what your role and Purpose is, how big your team will be to acomplish this
15:01 6. Homepage will appear Quickly - you can select “Deploy a virtual machine”
15:14 7. Choose the region, e.g. United Kingdom, that’s closest to your user base
15:40 8. Notice the “Billing” prompt
15:43 9. Scroll down to “Add Payment Method”
16:45 10. I used Card, don’t know Alipay, but there’s also PayPal option
17:25 12. After adding my credit card, i chose to close the previous tab, and start the “create droplet” process again
18:12 13. I chose a different option than 25.04 ubuntu. 24.04 i think
18:26 14. A Basic Premium AMD with 2GB RAM was what i chose. $21 /month
18:59 15. For “Authentication Method” i chose SSH key
19:08 16. press “Add SSH Key” undelined blue to the right
17. Install if you haven’t already got PuTTyGen
19:18 18. Generate randomness, saving private key
20:00 19. paste the whole key into DO
20:10 20. give it a friendly name and press “Add SSH key”
20:32 21. For $21 /month let’s “create droplet”
20:55 22. the droplet will take some time to initialise
24. Install if you haven’t already got PuTTy
24:30 25. Expand SSH in PuTTy, go to Auth → credentials
24:32 26. open the saved SSH key
24:53 27. return to “Session” and enter the IPv4 from DO
25:04 28. Connect and the root user will immediately log in, the SSH key file provided the necessary authentication
26:30 29. run ufw allow ssh and ufw enable
35:20 30. create an A record in namecheap, this will match what we tell discourse it’s domain is for browser (not email).
56:21 31. (opionally) create a URL redirect record in other domains you own that could be likely misspellings of the actual domain name for your discourse.
31:07 32. run apt install docker.io
31:32 33. run apt install git
31:44 34. run sudo -s
31:57 35. run the git clone
32:05 36. change into directory we cloned to
32:11 “change mode” of that folder to 700
32:20 start ./discourse-setup
35:59 the container will try to talk to itself
40:40 gather SMTP username and password from MailGun
42:10 the discourse setup process begins
49:11 the discourse setup process finishes
50:30 ran ./discourse-doctor proactively to diagnose outbound email
50:57 Problem connecting to MailGun via port 587
51:22 Access the app.yml
51:38 change port from 587 to port 2525
51:50 started ./launcher rebuild app
57:17 the rebuild finishes
57:29 the (optional) URL redirect works
57:46 mail test now we’re on port 2525
57:58 support didn’t get back to me, so the doctor is correct in saying my MailGun account isn’t activated yet

Brevo is quicker to setup

timestamp description
58:40 decided to setup Brevo provider
58:24 they allow SSO with Google
1:01:12 select the “Free” plan for most use cases
1:02:29 replace the DNS records from MailGun to Brevo
1:02:40 I chose to use my root domain, but you can opt for a subdomain. Perhaps have O365 Business Basic on your root domain?
1:04:37 populate app.yml from MailGun to Brevo
1:06:08 Don’t be put off by DISCOURSE_SMTP_DOMAIN being wrong
1:42:10 ran ./discourse-doctor
1:42:25 sucessful outbound email
1:42:55 email appeared to local client

mail-receiver is very useful

timestamp description
1:45:13 copy from sample configuration to i’m ready for container to be made/bootstrapped becuase of me
1:46:16 make granular API key in Discourse UI
1:50:00 run chmod o-rwx containers/mail-receiver.yml for belt and braces security?
fix by enabling a few settings in the UI

  1. About page on Discourse.org ↩︎

1 Like

Did that slow load cause you to think something had gone wrong, or did you expect a delay?


Was the lack of response from Mailgun the main factor that pushed you toward Brevo?


Had you already used SSH keys before, or was this your first time generating and loading one into DigitalOcean?


Do you think adding redirects for common misspellings is worth it for most self-hosters, or more of a nice-to-have?


How did you figure out that this didn’t actually matter for your setup?


Did you find the mail-receiver sample configuration clear enough, or did you have to experiment to get it working?