I’m having an issue on a new instance, running in ubuntu 22.04 vm, installed per documentation just minus NGINX as I have that setup outside of this VM.
My error is “unkown database error” ECONNREFUSED ::1:3306
server@Ghost:/var/www/ghost$ ghost start
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_blog-trever-cloud
+ sudo systemctl reset-failed ghost_blog-trever-cloud
✔ Checking system Node.js version - found v18.20.6
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
+ sudo systemctl is-active ghost_blog-trever-cloud
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.20.6
+ sudo systemctl start ghost_blog-trever-cloud
+ sudo systemctl stop ghost_blog-trever-cloud
✖ Starting Ghost: blog-trever-cloud
A GhostError occurred.
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_blog-trever-cloud -n 50
Debug Information:
OS: Ubuntu, v22.04.5 LTS
Node Version: v18.20.6
Ghost Version: 5.108.1
Ghost-CLI Version: 1.26.1
Environment: production
Command: 'ghost start'
Additional log info available in: /home/server/.ghost/logs/ghost-cli-debug-2025-01-30T15_07_24_190Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
Running ghost doctor, this is my output:
server@Ghost:/var/www/ghost$ ghost doctor
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
✔ Checking system Node.js version - found v18.20.6
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
System checks failed with message: 'Missing package(s): nginx'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
System stack check skipped
ℹ Checking system compatibility [skipped]
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_blog-trever-cloud
+ sudo systemctl reset-failed ghost_blog-trever-cloud
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.20.6
server@Ghost:/var/www/ghost$ ghost start
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_blog-trever-cloud
✔ Checking system Node.js version - found v18.20.6
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
+ sudo systemctl is-active ghost_blog-trever-cloud
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.20.6
+ sudo systemctl start ghost_blog-trever-cloud
+ sudo systemctl stop ghost_blog-trever-cloud
✖ Starting Ghost: blog-trever-cloud
A GhostError occurred.
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_blog-trever-cloud -n 50
Debug Information:
OS: Ubuntu, v22.04.5 LTS
Node Version: v18.20.6
Ghost Version: 5.108.1
Ghost-CLI Version: 1.26.1
Environment: production
Command: 'ghost start'
Additional log info available in: /home/server/.ghost/logs/ghost-cli-debug-2025-01-30T15_20_26_155Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
And running the suggested ‘journalctl -u ghost_blog-trever-cloud -n 50’ I get:
server@Ghost:/var/www/ghost$ journalctl -u ghost_blog-trever-cloud -n 50
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] INFO Ctrl+C to shut down
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] INFO Ghost server started in 0.264s
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] INFO Bootstrap client was closed.
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] ERROR connect ECONNREFUSED ::1:3306
Jan 30 15:20:25 Ghost node[19113]:
Jan 30 15:20:25 Ghost node[19113]: connect ECONNREFUSED ::1:3306
Jan 30 15:20:25 Ghost node[19113]: "Unknown database error"
Jan 30 15:20:25 Ghost node[19113]: Error ID:
Jan 30 15:20:25 Ghost node[19113]: 500
Jan 30 15:20:25 Ghost node[19113]: Error Code:
Jan 30 15:20:25 Ghost node[19113]: ECONNREFUSED
Jan 30 15:20:25 Ghost node[19113]: ----------------------------------------
Jan 30 15:20:25 Ghost node[19113]: Error: connect ECONNREFUSED ::1:3306
Jan 30 15:20:25 Ghost node[19113]: at /var/www/ghost/versions/5.108.1/node_modules/knex-migrator/lib/database.js:57:19
Jan 30 15:20:25 Ghost node[19113]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
Jan 30 15:20:25 Ghost node[19113]:
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] WARN Ghost is shutting down
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] WARN Ghost has shut down
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] WARN Your site is now offline
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] WARN Ghost was running for a few seconds
Jan 30 15:20:25 Ghost node[19113]: [2025-01-30 15:20:25] INFO Bootstrap client was closed.
Jan 30 15:20:25 Ghost systemd[1]: Stopping Ghost systemd service for blog: blog-trever-cloud...
Jan 30 15:20:26 Ghost node[19085]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Jan 30 15:20:26 Ghost node[19085]: throw error;
Jan 30 15:20:26 Ghost node[19085]: ^
Jan 30 15:20:26 Ghost node[19085]: {
Jan 30 15:20:26 Ghost node[19085]: message: {
Jan 30 15:20:26 Ghost node[19085]: statusCode: 500,
Jan 30 15:20:26 Ghost node[19085]: errorType: 'DatabaseError',
Jan 30 15:20:26 Ghost node[19085]: level: 'critical',
Jan 30 15:20:26 Ghost node[19085]: id: 500,
Jan 30 15:20:26 Ghost node[19085]: help: 'Unknown database error',
Jan 30 15:20:26 Ghost node[19085]: code: 'ECONNREFUSED',
Jan 30 15:20:26 Ghost node[19085]: property: null,
Jan 30 15:20:26 Ghost node[19085]: redirect: null,
Jan 30 15:20:26 Ghost node[19085]: hideStack: false,
Jan 30 15:20:26 Ghost node[19085]: message: 'Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306',
Jan 30 15:20:26 Ghost node[19085]: name: 'DatabaseError',
Jan 30 15:20:26 Ghost node[19085]: errno: -111,
Jan 30 15:20:26 Ghost node[19085]: syscall: 'connect',
Jan 30 15:20:26 Ghost node[19085]: address: '::1',
Jan 30 15:20:26 Ghost node[19085]: port: 3306,
Jan 30 15:20:26 Ghost node[19085]: fatal: true
Jan 30 15:20:26 Ghost node[19085]: }
Jan 30 15:20:26 Ghost node[19085]: }
Jan 30 15:20:26 Ghost node[19085]: Node.js v18.20.6
Jan 30 15:20:26 Ghost systemd[1]: ghost_blog-trever-cloud.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 15:20:26 Ghost systemd[1]: ghost_blog-trever-cloud.service: Failed with result 'exit-code'.
Jan 30 15:20:26 Ghost systemd[1]: Stopped Ghost systemd service for blog: blog-trever-cloud.
Jan 30 15:20:26 Ghost systemd[1]: ghost_blog-trever-cloud.service: Consumed 1.068s CPU time.