I’m feeling a bit stupid because I can’t get member registration to work on my blog. I’ve done several older tutorials that are here on the forum, and I haven’t been able to get anywhere.
When a user tries to register on the blog, they get the error: “Failed to sign up, try again.” and in the browser’s Inspect I get a 500 error on “send-magic-link”.
I’m using Ghost Self Hosted with Ubuntu on Digital Ocean.
Node v20
CLI: 1.27.0
Ghost: 5.121.0
I’m using Mailgun’s paid plan for 10k users. The blog is able to register a member through the admin panel. This member receives emails normally when I publish a new post. But it’s not possible to register through the blog.
My config.production.json file has the “mail” configuration like this:
By the way, I used noreply@ because that’s the email I receive in the newsletter. But I also tested it as postmaster@ and also with an email I created in Mailgun’s SMTP session and the error was the same. And I also tried ports 25, 587, 2525, and 465.
Digital ocean is now blocking outbound smtp. Try port 2525, as some users have had success with that. Or it’s possible to use the api instead of smtp… if you search the forum for recent posts about digital ocean and smtp, you should find it,
But it just didn’t work. So I decided to destroy the Digital Ocean droplet and manually do it on a new server on Linode. I had the same error, with the same problems.
Given the cost of paying for these droplets + the cost of mailgun, I decided to sign up for Ghost Pro and run my blog with them. I no longer have the same patience I used to have to debug these things. All these problems seem to be intentional to me.
For Mailgun SMTP, the user would normally be postmaster@mydomain.com (or a specific SMTP user you’ve set up) and the SMTP password for that user, not an API key or your account password. You can manage that by looking at the “SMTP credentials” page for your domain in the Mailgun dashboard.
Digital Ocean is blocking your outbound SMTP ports (except maybe 2525). That’s definitely ‘intentional’, but it isn’t about driving you into managed hosting. It’s about preventing spam and protecting their reputation. That’s not the Ghost team’s fault.
I recommended that you search the forum (because I was on my phone when I responded to you previously) for directions for the API, since I expect that DO will probably block port 2525 at some point, too. The first hit links to the second hit, which is this one, and includes a configuration file sample for how to use the API: Make onboarding emails also work via API (not only SMTP) - #4 by vikaspotluri123 . For anyone who comes later and needs it, I’ve updated the link above with a complete configuration example.
This is an excellent reason to select managed hosting. Self-hosting requires the willingness to deal with configuration issues, including linux server administration, mailserver adminstration, integrations, firewalls, database management, etc. It isn’t for everyone!
And yes, if you’re going to send a daily newsletter to a bunch of users, Ghost Pro is actually cheaper than Mailgun for some numbers of members.