Digital Ocean Droplet installation doesn't work

Hi guys, I’ve having trouble using the Ghost Digital Ocean droplet. I expect for this to be a 1-click install but it looks like it can’t create a mysql user. Any advice?

This is my trace:

Ghost will prompt you for two details:

1. Your domain
 - Add an A Record -> 104.236.198.111 & ensure the DNS has fully propagated
 - Or alternatively enter http://104.236.198.111
2. Your email address (only used for SSL)

Press enter when you're ready to get started!



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.17.1
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v5.75.2
✔ Finishing install process
? Enter your blog URL: https://example.com
✔ Configuring Ghost
✔ Setting up instance
+ sudo useradd --system --user-group ghost
+ sudo chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
✖ Setting up "ghost" mysql user
+ sudo mv /tmp/example-com/example.com.conf /etc/nginx/sites-available/example.com.conf
+ sudo ln -sf /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
+ sudo nginx -s reload
✔ Setting up Nginx
? Enter your email (For SSL Certificate) email@gmail.com
+ sudo mkdir -p /etc/letsencrypt
+ sudo ./acme.sh --install --home /etc/letsencrypt
+ sudo /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain example.com --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail email@gmail.com --keylength 2048
✖ Setting up SSL
+ sudo mv /tmp/example-com/ghost_example-com.service /lib/systemd/system/ghost_example-com.service
+ sudo systemctl daemon-reload
✔ Setting up Systemd
+ sudo systemctl is-active ghost_example-com
+ sudo systemctl start ghost_example-com
+ sudo systemctl stop ghost_example-com
✖ Starting Ghost
One or more errors occurred.

1) ConfigError

Error detected in the production configuration.

Message: connect ECONNREFUSED 127.0.0.1:3306
Configuration Key(s): database.connection.host / database.connection.port
Current Value(s): 127.0.0.1 / 3306

Help: Ensure that MySQL is installed and reachable. You can always re-run `ghost setup` to try again.


2) ProcessError

Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain example.com --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail email@gmail.com --keylength 2048
[Thu Dec 28 19:10:15 UTC 2023] Invalid status, example.com:Verify error detail:24.144.82.249: Fetching http://example.com/.well-known/acme-challenge/R-9-f8YLAzriWd47lYxC836tiPde7rzUe_3baJPOxMU: Timeout during connect (likely firewall problem)
[Thu Dec 28 19:10:15 UTC 2023] Please add '--debug' or '--log' to check more details.
[Thu Dec 28 19:10:15 UTC 2023] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

[Thu Dec 28 19:10:01 UTC 2023] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Thu Dec 28 19:10:01 UTC 2023] Create account key ok.
[Thu Dec 28 19:10:01 UTC 2023] Registering account: https://acme-v02.api.letsencrypt.org/directory
[Thu Dec 28 19:10:02 UTC 2023] Registered
[Thu Dec 28 19:10:02 UTC 2023] ACCOUNT_THUMBPRINT='t3lU1ryCjlgPAeCXn9It6kYcivr7jgt-2G3sRotpa2w'
[Thu Dec 28 19:10:02 UTC 2023] Creating domain key
[Thu Dec 28 19:10:02 UTC 2023] The domain key is here: /etc/letsencrypt/example.com/example.com.key
[Thu Dec 28 19:10:02 UTC 2023] Single domain='example.com'
[Thu Dec 28 19:10:02 UTC 2023] Getting domain auth token for each domain
[Thu Dec 28 19:10:03 UTC 2023] Getting webroot for domain='example.com'
[Thu Dec 28 19:10:03 UTC 2023] Verifying: example.com
[Thu Dec 28 19:10:03 UTC 2023] Pending, The CA is processing your order, please just wait. (1/30)
[Thu Dec 28 19:10:06 UTC 2023] Pending, The CA is processing your order, please just wait. (2/30)
[Thu Dec 28 19:10:08 UTC 2023] Pending, The CA is processing your order, please just wait. (3/30)
[Thu Dec 28 19:10:11 UTC 2023] Pending, The CA is processing your order, please just wait. (4/30)
[Thu Dec 28 19:10:13 UTC 2023] Pending, The CA is processing your order, please just wait. (5/30)

Exit code: 1



3) GhostError

Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED 127.0.0.1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_example-com -n 50

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.17.1
    Ghost Version: 5.75.2
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost install --auto --db=mysql --dbhost=127.0.0.1 --dbport=3306 --dbname=ghost_production --dbuser=root --dbpass=f4b3344279f7f804afa663b10ac6a0fce6964c2a3342ddd6 --dir=/var/www/ghost --start'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2023-12-28T19_10_21_516Z.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.

------------------------------------------------------------------------------

For any further commands, please switch to the ghost-mgr user to manage Ghost.

    sudo -i -u ghost-mgr

------------------------------------------------------------------------------

Looks like MySQL is not running, or is not running where Ghost expects it to be. What does netstat -antp | grep 3306 show?

I wouldn’t use Digital Ocean, had a lot of problems with that. Look for managed solutions like Pikapods. 70% cheaper and they do all the work updating the pod, and fixing in case of some problems. No backup tho, you must do it by yourself every once in a while.

Thanks you. I ended up going with Pikapods.

1 Like