google mail app password
Because Ghost uses email-based sign-in, I needed an email account.
When signing in to Ghost, it sends a login link instead of using a password.
So, an email account is required, and I created a new Gmail account.
I initially tried setting up my own mail server, but configuring everything took too much time—setting up the mail server, dealing with the '535 5.7.8 Authentication failed' error, configuring DNS settings, and more.
Without a properly configured email account, signing in results in an error message like "Failed to send email: blah blah..."
The solution is simple—just update the config.production.json file.
An app password may be required if two-step verification is enabled.
cd /var/www/ghost
(or cd /var/lib/ghost/)
nano config.production.json
"mail": {
"transport": "SMTP",
"options": {
"service": "Gmail",
"host": "smtp.gmail.com",
"port": 587,
"secure": false,
"auth": {
"user": "your-email@gmail.com",
"pass": "your-app-password"
}
}
}security setting
port 587 (for TLS ) → "secure": false
port 465 (for SSL) → "secure": true
Check again. and done.
