Question

How to set up ghost

Posted May 5, 2021 134 views
DigitalOceanGhost

I purchased a domain and attempting to use digital ocean ghost image.
This has failed as follows:

? Enter your blog URL: https://blog.johnnyscott.co.uk
✔ 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 [skipped]
+ sudo mv /tmp/blog-johnnyscott-co-uk/blog.johnnyscott.co.uk.conf /etc/nginx/sites-available/blog.johnnyscott.co.uk.conf
+ sudo ln -sf /etc/nginx/sites-available/blog.johnnyscott.co.uk.conf /etc/nginx/sites-enabled/blog.johnnyscott.co.uk.conf
+ sudo nginx -s reload
✔ Setting up Nginx
✖ Setting up SSL
+ sudo mv /tmp/blog-johnnyscott-co-uk/ghost_blog-johnnyscott-co-uk.service /lib/systemd/system/ghost_blog-johnnyscott-co-uk.service
+ sudo systemctl daemon-reload
✔ Setting up Systemd
+ sudo systemctl is-active ghost_blog-johnnyscott-co-uk
+ sudo systemctl start ghost_blog-johnnyscott-co-uk
+ sudo systemctl is-enabled ghost_blog-johnnyscott-co-uk
+ sudo systemctl enable ghost_blog-johnnyscott-co-uk --quiet
✔ Starting Ghost
One or more errors occurred.

1) Setting up SSL

Message: Uh-oh! It looks like your domain isn't set up correctly yet.
Because of this, SSL setup won't work correctly. Once you've set up your domain
and pointed it at this server's IP, try running `ghost setup ssl` again.

Also getting these errors when running suggested solution…

root@ghost-ubuntu-s-1vcpu-1gb-nyc3-01:~# ghost doctor
You can't run commands as the 'root' user.
Switch to your regular user, or create a new user with regular account privileges and use this user to run 'ghost doctor'.
Working directory is not a recognisable Ghost installation.
Run `ghost doctor` again within a folder where Ghost was installed with Ghost-CLI.
ghost-mgr@ghost-ubuntu-s-1vcpu-1gb-nyc3-01:~$ -i -u ghost-mgr
ghost-mgr@ghost-ubuntu-s-1vcpu-1gb-nyc3-01:~$ ghost setup ssl
Working directory is not a recognisable Ghost installation.
Run `ghost setup` again within a folder where Ghost was installed with Ghost-CLI.

Should the blog url be only the domain name or with a prefix like blog that I added ?

Any suggestions please ?

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi there,

Regarding the SSL error, you would need to first point your A record for the blog subdomain name to the Droplet’s IP address. This is how Let’s Encrypt and certbot validate if you actually own the domain name and then issue a certificate.

Regarding the second error, you need to first log in as the ghost-mgr user, you can do that with the following command:

sudo -i -u ghost-mgr

Then access the directory where the Ghost installation is stored at with the cd command:

 cd /var/www/ghost/

Once you are in that directory you could run the ghost setup ssl command.

Let me know how it goes.
Regards,
Bobby

The problem occurred using the option to create a ghost droplet. https://marketplace.digitalocean.com/apps/ghost

I believe the domain set up had had not propagated from godaddy ahead of the script running hence the error “Uh-oh! It looks like your domain isn’t set up correctly yet.”

Browsing to the droplet ip address gave a NGINX error.
Tried re-installing NGINX after domain working but still would not work.
There is no clear option to restart the script again.

Solution after domain direction working was to DESTROY the droplet using REBUILD option, you can search for GHOST and find the original droplet to re-install.

This will reset the root password - set a new one via digital ocean website and logon to trigger the re-install.

This seemed to work fine - I did not seem to do anything about database set up.