I went to make a post on my site (the last one I did was early February) and saw I was logged out of the admin console on my desktop browser — nothing to do with Ghost I don’t think, this is just a thing that Safari seems to do. When I tried to log in the “sign in” button below my email and password sat spinning for a good while and then a red bar appeared at the top of the screen saying “There was a problem on the server.” I can access the rest of the site just fine so I ssh’d into the server, ran ghost doctor, and nothing reported a problem. I restarted the server entirely, same issue. For good measure, I checked for an update and saw that there was a point release (I was on 6.20, so I updated it to 6.20.1) and tried again. Still no dice.
I am still logged into the admin panel on my phone and tablet and can poke around in it just fine (I successfully made the post I was intending to do on my computer from my phone instead), but the sign in on my desktop isn’t working. I tried different browsers and different internet connections to no avail, but I’m hesitant to sign out of the other devices and try signing in again given the inability to sign in on my desktop.
“ghost doctor” doesn’t report any issues, though weirdly when I did “ghost stop” and “ghost start” in the command line, it gave me an error saying “Invalid database type. Supported types are mysql and sqlite3” and then “ghost doctor” kept repeating the same line at the same point in the startup and wouldn’t begin the Ghost instance. Restarting the server completely once more got it working again.
I have made zero changes to the configuration whatsoever and as mentioned I was able to make a new post (from my desktop) in February and a new post (from my phone) today. Nothing’s been done to the installation, configuration, or server aside from updating Ghost to 6.20.1 today when I saw I couldn’t sign in on my desktop. I’m confused and not really sure what’s going on.
Ghost switched a while back to sending an email code for admin logins. If your transactional email is not set up correctly, that’s the behavior you get. (Transactional email is needed for newsletter sign ups also, so you probably want to fix it! If your site has no subscriptions or memberships, you could disable this behavior instead of fixing email. Search the forum for staffDeviceVerification.
I still seem to get the newsletter emails fine (I got one after I made the post from my phone this afternoon) but in checking that when I tried to sign in as a commenter just now (as opposed to the admin panel login with a password) it said “failed to send magic link email” when in the past this has worked and I haven’t changed anything on my end. I checked Mailgun and it doesn’t seem to be showing any issues.
I have looked at the logs and dug around and ghost is saying there’s a connection timeout when sending emails. I also can’t telnet into smtp.mailgun.org either so I think DigitalOcean has suddenly blocked the port on my droplet when previously it was fine. I’ve raised a ticket with them but I suspect that’s the issue given I’ve changed nothing but it’s inexplicably not working when it had previously.
DO started blocking outbound smtp the middle of last year. Try port 2525 to mailgun (wasn’t blocked at least initially — might have changed), or configure api-based delivery. Note that these changes go in config.production.json or the docker env variable equivalent. Yes, you configure email in two locations. What’s on the ghost dashboard is just newsletters, and that’s not your problem.
It was working for me at least until Feb 8 when I last made a post on my site and would have needed to log in to do it, so I don’t know if this suddenly got someone’s attention or what.
I changed it to port 2525 and at least that is giving me a straight-up rejection instead of only timing out now; trying to sign in as a commenter gives me the error “Failed to log in, please try again,” and trying to log into the admin panel gives me the error “Failed to send email. Please check your site configuration and try again.”
If you will use Mailgun for your transactional mails as well, I would suggest “not” to use SMTP to avoid hosting provider issues, and use mailgun api instead. Change your Ghost config like below:
Hi there, I appear to be having the same problem. I am using PikaPods, not Digital Ocean. NOTE: BIG UPDATE BELOW
Many of the details are the same as the OP, but I will recount my experience anyway, just in case there’s an extra clue in here.
I was logged out on my desktop (Safari) too, so I went to sign in. Upon clicking Sign in, I get a never-ending spinning wheel. It spun for at least 15 mins before I tried to refresh. I never saw the red bar with “There was a problem” as OP described. Refreshing or trying again or opening a new window just took me back to sign-in. I tried to restart the pod in PikaPods but I get the same experience.
The site works just fine otherwise. I even tried to sign up with an alternate email account and got the “confirm your sign-up?” email. I see the other comments in here say that Ghost sends an email code for logins. I don’t see a code anywhere, not even in Junk Mail, and checking Mailgun’s logs, I don’t think one was sent out. Like I said though, Mailgun sent out a signup email just fine, so that appears to be correctly configured?
It sounds like you are using a different domain for your admin area but missing the config that sets it as the known admin url. See https://docs.ghost.org/config#admin-url
There was a recent tightening of staff session security which you’ll be running into with a misconfigured admin url.
Thank you Kevin, that sounds like it makes a lot of sense. But, um, how would I go about fixing it? I’m not super technically aware (which is why I’m hosting on PikaPods).
EDIT: To be clear, I read the URL Kevin helpfully provided (thank you!) but I’m not sure I understand what I need to do. I think I can FTP into my Ghost site on PikaPods, but I don’t see any config files anywhere so I’m not sure if I’m seeing everything. I get that I have to write in my URL to that admin thing, but I don’t know where to put it or even if I’d be putting it in the right place.
It’s pikapods, so you’d set environment variables in the pikapods dashboard. If the one you need isn’t exposed, you may need to flag that for the pikapods team.
On my end, it was indeed DigitalOcean blocking SMTP on my droplet suddenly. They removed the restriction and I can log in fine once again. I’m not very clear on why they did this out of nowhere as it’s been working for a year up until at least a couple of weeks ago, but it looks like it wasn’t a problem with anything in my control.
@muratcorlu thanks for that config, I had seen other suggestions about using the api but I couldn’t figure out how to set it up. I assume it’s a moot point now that DO has removed the restriction but if there are issues again I’ll try that.
Dear all,
I have been locked out too - our site is hosted by ghost, and we did not make any changes.
I did not understand the explanations given here.
I will try Ghost support. Let me know know if you have a quick fix.