After installing Ghost blog on a Digital Ocean server, I have attempt to invite additional users to be collaborators. It led me to realise Ghost blog email function does not work directly out of the box.

The solution is to integrate an external email service provider like Mailgun.
According to Ghost blog official documentation,

We highly recommend using Mailgun which allows up to 10,000 emails per month for free.

1. Signup for a Mailgun Account

Signup an account at Mailgun. A valid debit/credit card will be required for validation purpose. But we won't be charged unless we go beyond 10,000 emails and 100 validations each month.

2. Create a new domain in Mailgun (



3. Update DNS record to verify the domain

i) Add CNAME record

Mailgun Domain Dashboard

Digital Ocean DNS

ii) Add TXT record

Mailgun Domain Dashboard

Digital Ocean DNS

iii) Add MX record

Mailgun Domain Dashboard

Digital Ocean DNS

Final Result of DNS


Note that the DNS records may take some time to update. So be patience.

4. Modify config.production.json

SSH into the server and navigate to the directory of ghost installation. Open config.production.json with nano editor.

$ cd /var/www/ghost/
$ sudo nano config.production.json

Identify the mail configuration:

"mail": {
    "transport": "Direct"

Change the configuration to specify Mailgun as the email service provider:

"mail": {
    "transport": "SMTP",
    "options": {
        "service": "Mailgun",
        "auth": {
            "user": "",
            "pass": "1234567890"
    "from": "'Custom Name' <>"

Remember to replace the user and pass with the credentials from Mailgun domain dashboard.

Also, 'Custom Name' and <> will be shown in the 'from' of the email sent.

After edit is done, ctrl + o and ctrl + x to save and exit.

Lastly, restart the Ghost blog for changes to take effect.

$ ghost restart

5. Invite new user to check if the email works

Try inviting people under Ghost admin dashboard team section. Send an invitation to your own email to verify whether the Ghost Blog can send email via Mailgun now.


Hopefully you are able to successfully integrating Mailgun to Ghost blog. 😃
Please let me know how it goes in the comments below. Thank you for reading! 😊


  1. Ghost blog official documentation: Config Mail
  2. Mailgun + DigitalOcean