How to: Configure Ghost email SMTP for iCloud custom domain

Struggling to configure Ghost to use iCloud? Here’s how to do it.

How to: Configure Ghost email SMTP for iCloud custom domain
Ghost accessing email

Ghost is a fantastic platform for self-hosting your blog, however you may hit a roadblock when it comes to configuring your email provider, especially if you are using iCloud as your email provider. Fret not, here is how to configure your email settings to support iCloud.

There are two ways of setting these options, the first is via environmental variables, the second is via the config file at /var/www/ghost/config.production.json

Environmental Variables

[email protected]
[email protected]

Environmental variables - pass these to your instance at runtime

Configuration File

"mail": {
    "transport": "SMTP",
    "from": "noreply@yourdomain"
    "options": {
      "host": "",
      "port": 587,
      "auth": {
        "user": "[email protected]",
        "pass": "your-app-password"

The trick to ensuring Ghost can use iCloud is to remove the service option that is usually specified when using Mailgun, SES or Google. Also ensure that you are using an app password (as you're likely using 2FA) and not your iCloud password- you can generate one following these instructions:

Finally, make sure that the from address, is a real email address that you have created in your iCloud custom domain account. You will receive an error otherwise and users will be unable to sign up.

And that’s it!