Fixing DigitalOcean’s one click Discourse install with Mailgun.

Andrew Kuznetsov
2 min readAug 24, 2018


Recently, I discovered that DigitalOcean’s Discourse install is currently not quite ‘one-click’ (even if you follow all of the DigitalOcean and Mailgun instructions). For some reason, you just can’t get the admin confirmation email to send out of box.

Thankfully, I’ve found the solution.

First, try sending an email using ./discourse-doctor. I was getting rejects and a note that looks like this:

Failed: → [MY EMAIL ADDRESS] ‘[Discourse] Email Deliverability Test’ Server response: 550 5.7.1 Unauthenticated email from is not accepted due to domain’s DMARC 5.7.1 policy. Please contact the administrator of domain if this was 5.7.1 a legitimate mail. Please visit 5.7.1 to learn about the 5.7.1 DMARC initiative. c4-v6si6756289pfa.285 — gsmtp

The problem, it turns out, is that DigitalOcean sets Discourse’s default notification email (according to the below helpful link):

This default causes all emails to not send, but in order to login and change this setting you need to confirm your admin email …. yikes.


Make a new account via command line using the following instructions from

Access Console

Connect to your Droplet via SSH, or use Putty 45 on Windows:

ssh root@

Replace with the IP address of your Droplet.

Switch to your Discourse folder:

cd /var/discourse

Enter the container:

./launcher enter app

Create New Account with Admin Privileges

Run this command from console:

rake admin:create

You will be asked for Email, Password and Confirm Password.

After providing required information a new account will be created with random username.

Now you will be asked: Do you want to grant Admin privileges to this account? (Y/n). Press enter to continue.

Now, login with your new email, change the following setting:

Try logging in as your original admin email and you’ll get a message prompting you to ‘resend activation email’. Hit that button and enjoy.

Hopefully this helped!



Andrew Kuznetsov

Doing things and writing about them - a happy medium 👻