Who, What, Where, When?

When user tries to sign up notes.nodeholder.com by hitting the Subscribe button on the home screen, confirmation email is not sent. This always happens when trying to create a new user.

Untitled

How?

Debugging starts by logging in as root@Ip address of Ghost server.

who: root,ghost-mgr what: log into ghost where: IP of Ghost server from ghost.env when: always

You must have a public SSH key in /root/.ssh/authorized_keys.

# $ghost is set to ip available via doctl
ssh [root@](<mailto:[email protected]>)$gohst

Please switch to the ghost-mgr user to manage Ghost via the CLI:

    sudo -i -u ghost-mgr

Last login: Thu Jun  1 03:07:30 2023 from xx.xx.xx.xx
root@ghost-sfo2-01:~#

Ghost production config is stored in ghost_production.json.

(was Ghost production config) what: ghost_production.json when: investigating production

Email config is stored in ghost_production.json.

Note that Ghost is supposed to use this info to connect to the SMTP server so it can send the confirmation email The SMTP server is one associated with a Placeholder Domains account. SMTP requires the sender be from the email of the owner of the domain name, in this case [email protected] found in /var/www/ghost/ghost_production.json

"mail": {
**"from": "'NH Info' [[email protected]](<mailto:[email protected]>)",**
"transport": "SMTP",
"options": {
"host": "[us2.smtp.mailhostbox.com](<http://us2.smtp.mailhostbox.com/>)",
"port": 587,
"auth": {
**"user": "[[email protected]](<mailto:[email protected]>)",**
"pass": "mysecretpassword"
}}},

Ghost is started automatically in production by systemctl.

Ghost is started automatically in production by systemctl and honors the config file found in /var/www/ghost/ghost_production.json. You can see it running by regular systemctl command:

root@ghost-sfo2-01:~# systemctl status ghost_notes-nodeholder-com.service
● ghost_notes-nodeholder-com.service - Ghost systemd service for blog: notes-no>
Loaded: loaded (/lib/systemd/system/ghost_notes-nodeholder-com.service; en>
Active: active (running) since Fri 2023-05-19 18:19:28 PDT; 1 weeks 5 days>
Docs: <https://ghost.org/docs/>
Main PID: 1856131 (ghost run)
Tasks: 22 (limit: 1130)
Memory: 10.6M
CGroup: /system.slice/ghost_notes-nodeholder-com.service
├─1856131 ghost run
└─1856171 /usr/bin/node current/index.js

Ghost CLI is a wrapper around systemctl when in production mode.

Ghost works in two modes as determined by the NODE_ENVIRONMENT={production,development} variable convention.

ghost-mgr@ghost-sfo2-01:~$ ghost ls

+ sudo systemctl is-active ghost_notes-nodeholder-com
┌──────────────────────┬────────────────┬─────────┬──────────────────────┬──────────────────────────────┬──────┬─────────────────┐
│ Name                 │ Location       │ Version │ Status               │ URL                          │ Port │ Process Manager │
├──────────────────────┼────────────────┼─────────┼──────────────────────┼──────────────────────────────┼──────┼─────────────────┤
│ notes-nodeholder-com │ /var/www/ghost │ 5.47.1  │ running (production) │ <https://notes.nodeholder.com> │ 2368 │ systemd         │
└──────────────────────┴────────────────┴─────────┴──────────────────────┴──────────────────────────────┴──────┴─────────────────┘
ghost-mgr@ghost-sfo2-01:~$