Lyra / Members / Ghost on GCP

Hi. I am running into a slew of problems with a Lyra install, aiming to set up member access etc.

  • I can’t get the mailgun to send the login or sub emails, though it seems configured correctly in config.production.json (and is configured correctly at Mailgun and domainhost). In fact when I add emails the login page tells me to enter a valid email address.

// [Fixed thanks to @daniel1 ] I can’t see to get the css files to recompile. I am running a test version on localhost and have yarn dev running on the theme folder, but it doesn’t seem to recompile the css?

// [Pending fix, with input from @daniel1] I don’t know how or where to get any subscription pages or info to show? Have looked through documentation extensively.

Tips welcome, thanks.

Hi @jmanooch,

i tried to subscribe on your site and indeed, your members.js gives back a 500 error.
Could you please double check, that you entered the right mail configuration in your config.production.json?
It should look like this, if you use mailgun:

"mail": {
    "transport": "SMTP",
    "options": {
        "service": "Mailgun",
        "host": "smtp.eu.mailgun.org",
        "port": 465,
        "secureConnection": true,
        "auth": {
            "user": "postmaster@example.mailgun.org",
            "pass": "1234567890"
        }
    }
}

Thanks. It seems to be well configured on the server. See below (have removed actual password).

"mail": {
"from": "perspectives@mail.jmanoo.ch",
"transport": "SMTP",
"host": "smtp.eu.mailgun.org",
"options": {
  "service": "Mailgun",
  "port": 465,
  "auth": {
    "user": "postmaster@mail.jmanoo.ch",
    "pass": "[redacted]"
  }
}

}

Regarding Mail:
Troubleshooting Steps:

  1. Add “secureConnection”: true, in your config, like shown in my example
  2. Check if “Allow free member signup” is enabled (found Members in Labs)
  3. run $ghost doctor in your ghost folder, check for errors
  4. Check error.log at `/ghost/content/logs/*.error.log

Regarding CSS:
Does your terminal look like this when running yarn dev?
If so, css and hbs file changes should reflect on your development site on reload

image

Regarding Subscribtion Page:

Subscription Pages depend on the theme you’re using.
Usually it’s in the signup.hbs (domain/signup/) and visible after you’re logged in as a member.
Other than that, you can create any info/pricing page you want, by editing existing pages or just create new ones.

On the CSS issue - it looks like for some reasons the blog was reverting back to Caspar theme, and since I didn’t know how Lyra and Caspar themes are the same at the front end, I didn’t notice. Seems like it is working, will revert if it keeps switching back. Thanks.

On mail, I added that line, but now Signup and Signin forms now just ask for a ‘valid email address’, even if I use ones that are both real and already in the subscriber list. So …

On the actual pages, thank you, I will get round to that when the mail issue is fixed

Thanks for all your help!

Mail:
Have you activated “Allow free member signup” in Ghost Admin - Labs - Members?
If not, please activate it, otherwise users aren’t able to signup via signup/signin form

Yes, that is live.

I have downloaded the log files, but am not sure what I am looking for!

Thanks.

Please have a look at the *production.error.log file.

It contains more information, about errors that ghost encounters.
The name usually matches domain or IP followed by .production.error.log So in your case it’s the one with 35_224_…

The normal production.log includes general information like requests

Whats with the .log.0 log.1, one might ask?
Logs get rotated, meaning the existing log file gets archived and renamed after a certain time or file size, and a new .log file is created. Otherwise the logfile would get way to big over time.
The current log is always the one without any trailing number.
Look at the last changing date (hint: day and hour) of the older log files and you should even find out a pattern, how ghost archives logs :wink:

Back to your troubleshooting:

Please let me know, what your error.log prints out, after you tried to signin/signup.

Cheers!

Appreciate your input greatly.

Here’s the latest error log, not sure what I am looking at, so please do guide!

https://pastebin.com/2TdNtSNe

Actually, it looks like (checking datestamps) that error log is the wrong one (I was listing before in alpha order, and have since added a domain to the IP). This should be the correct log:

https://pastebin.com/CPGkLSqX

Hi @jmanooch,

i had a look at your log file and it is an smtp authentication error.

I’m 99% sure, that you just filled in the wrong “user” and/or “pass” in your config.production.json.

Please go to Mailgun - Sending - Domain Settings - SMTP Credentials (make sure you selected your domain on the top bar and not the sandbox domain)

  • postmaster@*.domain.de is your “user”
  • Reset Password to get a new smtp password and copy to “pass”
  • smtp.(eu).mailgun.org below is your host (you did that correctly already)
  • try port 587, as port 465 isn’t considered a standard port for smtp anymore

Copy&Paste below and fill in pass:

"mail": {
   "transport": "SMTP",
   "from": "perspectives@mail.jmanoo.ch",
   "options": {
     "service": "Mailgun",
     "host": "smtp.eu.mailgun.org",
     "port": 587,
     "auth": {
       "user": "postmaster@mail.jmanoo.ch",
       "pass": "your smtp pass..."
     }
   }
 },

Well here’s the config.production.json file after changes and ghost restart, and here’s the mailgun domain config page (copied a fresh password using their integrated copy), and it still says … enter a valid email address! !!!

Thanks again for keeping on this!

Screen Shot 2020-07-07 at 16.14.55

Try to paste the “host” into “option” like my above example.

Boom. Fixed. Thanks so much. I just checked the documentation on Ghost dev pages, and it does have the host config inside the options block, but in the default file it’s outside, and I should have noticed that difference. Thanks so much for taking a lot of time on this. Much appreciated.

1 Like

Glad it works now!