Members and Subscribing still wont work even on Ghost v4 (401 Error)

Alrighty, so after burning 4 hours on this I finally managed to get subscriptions working. For those reading in the future - what I am about to say applies to self hosted ghost installations on Digital Ocean… perhaps specifically after migrating from v3 to v4. This may apply more generally.

Set up mailgun

After mailgun confirms that you set up your domain correctly then you wont need to do any further configuration on their service. You’ll know you’re good to go once you get an email like this:

Set up Ghost to work with mailgun

At this point you will have a strong temptation to configure the API credentials for mailgun under the subscriptions tab. Go ahead and do that. At this point you will believe that you’re integration is complete but you’re wrong (as verified by @Sarah_Hein ).

Update config.production.json file

Log in to your hosted ghost server.

To quote @ravingDIODE instruction’s to locate the production file… you should:

  1. Navigate to the ghost installation folder: “cd /var/www/ghost”

  2. Then, just to make sure, list the folder contents: “ls”

  3. You should see the following:
    image

  4. To edit the file type in: "sudo nano config.production.json. If the file does not exist, then first run ghost config to create it.

  5. Set the mail configuration as follows:

  6. Replace the user and password field with the ones provided in your mailgun settings (to get your password just click “Reset Password”):

  7. At this point the "secureConnection" key is currently set to true. Taking a tip from @joncojonathan , change the "secureConnection" key to false. (Having it true didn’t work for me).

  8. Then Hit control-s to save and then control-x to quit nano.

Finally, now that you’re back on the command line, run ghost restart to put your changes into effect.

Thank you

Just wanted to give a big shout out to the ghost developers for making Ghost an amazing - if not the most amazing - blogging platform on the Internet. And I am also very thankful to the ghost user community who took time to document parts of their solutions without which I would not have been able to get this feature working. Thank you all!!

1 Like