Question

How to setup Ghost with DigitalOcean

I have followed the steps to connect via ssh to the droplet (ssh root@178.128.38.161). I access the droplet and the installation of ghost starts but I get an error in the SSL certificate and it does not launch ghost. Then, when I try to use the “ghost status” command I get the following error:

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 ls’. For more information, see https://ghost.org/docs/install/ubuntu/#create-a-new-user.

I use the command “sudo -i -u ghost-mgr” to access ghost-cli and use the command “service ghost restart”. I am prompted for the root password but I get a configuration error when I enter the password set on droplet creation.

How can I launch the ghost service correctly and fix the root problems?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
July 17, 2022

Hi there,

What I could is before proceeding with the SSL setup itself, you would need to add an A record for your domain name to point to the Droplet’s IP address:

https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/

Once you’ve added the A record, you could then SSH and follow the steps you’ve described.

This is required as Let’s Encrypt validates your domain name by checking if it is actually pointing to the server that you are trying to issue the certificate on.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up