How to configure/fix admin invites

I have configured Ghost CMS using Digital Ocean’s pre-built image. I have configured SMTP to send via SendGrid. I am trying to invite my team members but the invitation link looks wrong and does not work. I have searched the codebase and searched the documentation and I don’t see anything on this topic.

  • My URL: http://138.68.231.194/ (I am not concerned with domain name yet)
  • Ghost-CLI version: 1.14.0
  • Ghost version: 3.27.0
  • I used the Digital Ocean built-in image, and then ran ghost update 3.27.0.
  • I also edited config.production.json to include my SMTP settings for SendGrid.
  • Node version: v12.16.3, database: none, OS: Unbuntu & browser: Chrome

The source code seems to use config.get('admin:url') for the URL value in the invitation email, and so I have added admin.url in my config.production.json file, as described here: Configuration - Adapt your publication to suit your needs

But when I receive the admin invitation email, the value is wrong. Instead, the domain is one of my CNAME entries from Cloudflare. This value does not exist anywhere in my server instance, and so, I don’t know how it got there.

I’m feeling a lot of frustration with this issue, because it appears to be undocumented, and the invitation email doesn’t provide the link as plain-text, which I have seen in invite emails from other services before. Having the link as plain-text is a smart thing to do, as in situations such as this. I guess I will have to edit the source code to get properly formed URL.

Could someone please tell me what’s going on with this? Thanks for your help.

I edited the file at /var/www/ghost/versions/3.27.0/core/server/services/mail/templates/invite-user.html using vim via SSH, and just removed the anchor tag, replacing it with text, and this fixed the issue for me.

Best guess, the original URL was hidden from me by the gmail client.

I would really appreciate it if the ghost developers would take this into consideration and change the template.

Ghost expects to be used in production with a properly configured domain.

If you choose to run it in production without a properly configured domain, then it’s absolutely expected that you will run into multiple edge cases as a result.

It’s not realistic to skip setup steps, ignore configuration instructions, and then complain that the experience is frustrating when things don’t work as a result.

Instead of being rude, you could have asked if I had found the relevant setup instructions (which I had not).

Looking at your Ubuntu guide, it seems that a lot of these steps need to be skipped when using the Digital Ocean image.