Dashboard Log-in problems

Hello! I’ve been struggling with ghost for a couple of hours. I tried setting up Mailgun as the Bulk Email and as the Transactional. Got the Bulk Email working, but I don’t know what’s the issue with the Transactional, as I’ve edited the config.production.json file as directed in the documentation, and it doesn’t work.

That’s some contextualization of what I’ve been doing prior to the current matter which isn’t that, the problem I’m facing right now is that the Dashboard doesn’t let me log in. I click the “Sign-In” button, and it loads for a couple of minutes before saying that there’s an error with the server. What can it be, and how can it be fixed?

The problem is indeed your (lack of) transactional email. Ghost needs to send an email to get your staff members logged in by default. There’s a report of it just spinning on (some?) Docker setups, when email is mis-configured. Are you on Docker?

Fix:

  • Post some details and get help with fixing your transactional email.

Workaround:

  • Disable device verification. (Note that you’ll still need to fix transactional email so that members can log in, if you’re going to have members, but at least you’ll be able to get existing staff members signed in.) Here’s how (if using config.production.json):
    Configuration - Adapt your publication to suit your needs (scroll to Security if your browser doesn’t auto-scroll)

If on Docker, it’ll be the equivalent:
security__staffDeviceVerification: false

Hey! Thanks for the reply, disabling device verification did get me in!
As for the details:

I’m hosting on DO. I’ve tried different ports (not knowing they were blocked), even 2525 to no avail. My code goes as follows:

"mail": {
    "from": "fromname",
    "transport": "SMTP",
    "options": {
      "host": "smtp.mailgun.org",
      "service": "Mailgun",
      "port": "2525",
      "auth": {
        "user": "[REDACTED]",
        "pass": "[REDACTED]"
      }
    }
  },

Also tried:

"mail": {
    "transport": "mailgun",
    "options": {
        "host": "<api.mailgun.net>",
        "auth": {
            "api_key": "<[REDACTED]>",
            "domain": "<[REDACTED]>"
        }
    }
},

So you’re going to want to take a look at logs. Either Ghost is going to tell you what the problem is (probably in content/logs relative to the Ghost install location – or somewhere else if specified in your config file), or else Mailgun is going to tell you what the problem is. Find the error message when you try to send transactional email (signing up a new user or inviting a new admin user will trigger it) and post it here, and the forum can probably help! :)

1 Like

I’m quite noobish in all of this, so I’m not sure, from all the content it just showed me, what is useful information. This is what I could gather might be useful:

"name":"EmailError","statusCode":500,"level":"normal","message":"Error sending email:
Failed to send email. Reason: Email has been temporarily rejected. Please check your email 
settings and resend the invitation.","help":"\"Please see https://ghost.org/docs/config/#mail for 
instructions on configuring email.\"","stack":"EmailError: Failed to send email. Reason: Email 
has been temporarily rejected.\n    at createMailError 
(/var/www/ghost/versions/5.120.2/core/server/services/mail/GhostMailer.js:81:12)\n    at 
GhostMailer.handleDirectTransportResponse 
(/var/www/ghost/versions/5.120.2/core/server/services/mail/GhostMailer.js:171:19)\n    at 
GhostMailer.send 
(/var/www/ghost/versions/5.120.2/core/server/services/mail/GhostMailer.js:133:25)\n    at 
process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async
 getResponse (/var/www/ghost/versions/5.120.2/node_modules/@tryghost/api-
framework/lib/pipeline.js:259:34)\n    at async Object.ImplWrapper [as send] 
(/var/www/ghost/versions/5.120.2/node_modules/@tryghost/api-
framework/lib/pipeline.js:264:30)","hideStack":false},"msg":"Error sending email: Failed to 
send email. Reason: Email has been temporarily rejected. Please check your email settings 
and resend the invitation.","time":"2025-05-27T12:48:06.312Z","v":0}

Mailgun doesn’t appear to have created any error log in the past 24 hours.

Which set of config file settings (you showed two) corresponds to that error? That looks like you’re set to Direct, which isn’t in either of your two examples.

Yes, my bad, after checking the config doc again I had the API config but had accidentally deleted the transport. Just checked with both configs and the corresponding errors are as follows:

For SMTP: config:

"mail": {
"from": "'...",
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "host": "smtp.mailgun.org",
    "port": 2525,
    "auth": {
      "user": "...",
      "pass": "..."
    }
  }
},

The error:

"name":"EmailError","statusCode":500,"level":"normal","message":"Error sending email: Failed to send email. Reason: 
0078755A157F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version 
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n. Please check your email 
settings and resend the invitation.","help":"\"Please see https://ghost.org/docs/config/#mail for 
instructions on configuring email.\"","stack":"Error: 0078755A157F0000:error:0A00010B:SSL
 routines:ssl3_get_record:wrong version 
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n.\n","hideStack":false},"msg":"E
rror sending email: Failed to send email. Reason: 0078755A157F0000:error:0A00010B:SSL 
routines:ssl3_get_record:wrong version 
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n. Please check your email 
settings and resend the invitation.","time":"2025-05-27T13:18:26.849Z","v":0}

and API: config:

	"mail": {
    "from": "'...",
    "transport": "mailgun",
    "options": {
        "host": "<api.mailgun.net>",
        "auth": {
            "api_key": "<...>",
            "domain": "<...>"
        }
    }
},

The error:

"err":{"id":"2188e810-3afe-11f0-bf6d-
7507c0ba3567","domain":"https://cigarron.com","code":"ERR_INVALID_URL","name":"Internal
ServerError","statusCode":500,"level":"critical","message":"Invalid URL","stack":"TypeError 
[ERR_INVALID_URL]: Invalid URL\n    at bootGhost 
(/var/www/ghost/versions/5.120.2/core/boot.js:581:32)\n    at new NodeError 
(node:internal/errors:405:5)\n    at new URL (node:internal/url:676:13)\n    at transport 
(/var/www/ghost/versions/5.120.2/node_modules/nodemailer-mailgun-
transport/src/index.js:141:26)\n    at module.exports 
(/var/www/ghost/versions/5.120.2/node_modules/@tryghost/nodemailer/lib/nodemailer.js:48:28
)\n    at new GhostMailer 
(/var/www/ghost/versions/5.120.2/core/server/services/mail/GhostMailer.js:103:26)\n    at
 Object.<anonymous> 
(/var/www/ghost/versions/5.120.2/core/server/services/auth/session/index.js:39:16)\n    at 
Module._compile (node:internal/modules/cjs/loader:1364:14)\n    at Module._extensions..js 
(node:internal/modules/cjs/loader:1422:10)\n    at Module.load 
(node:internal/modules/cjs/loader:1203:32)\n    at Module._load 
(node:internal/modules/cjs/loader:1019:12)\n    at Module.require 
(node:internal/modules/cjs/loader:1231:19)\n    at require 
(node:internal/modules/helpers:177:18)\n    at module.exports 
(/var/www/ghost/versions/5.120.2/core/server/web/parent/backend.js:18:30)\n    at 
initExpressApps (/var/www/ghost/versions/5.120.2/core/boot.js:235:66)\n    at bootGhost 
(/var/www/ghost/versions/5.120.2/core/boot.js:538:32)","hideStack":false},"msg":"Invalid 
URL","time":"2025-05-27T13:26:00.725Z","v":0}

which logs are these entries in? I am a noob to setting up ghost and having the same issues on DO

Hey, so these logs are in: /var/www/ghost/content/logs and are named “https___[domain name]_com_production.error.log”. I accessed them with tail -n 50 [log name]

Also, I resolved my issue by using the API config. It might sound stupid, but the issue was that I hadn’t deleted the <> in the host, the API, and domain.

"mail": {
    "from": "'...'",
    "transport": "mailgun",
    "options": {
        "host": "<api.mailgun.net>",
        "auth": {
            "api_key": "<...>",
            "domain": "<...>"
        }
    }
},
3 Likes