Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
I’m having an issue on my droplet. Once, I have restarted the service (‘sudo service ghost restart’), I am receiving a 502 Bad Gateway Error. So, I tried to (‘sudo service ghost start’) then it says ‘Starting Ghost ghost’. I’m still getting the 502 Bad Gateway error. Then when I go to look at the status (‘sudo service ghost status’) it says ‘ghost is not running’. How do I force ghost to start again??
@tjmaynes: Ghost is apparently failing to start. Try running it manually and see if it outputs any errors:
<pre>cd /var/www/ghost node index</pre>
To answer my own question, you can run NODE_ENV=production node index to get the production blog running in a console
I’ve noticed that the author uses sudo sometimes for starting the ghost service. This is not required if you run the pre-installed Ghost droplet (with Ubuntu 12.04).
As a matter of fact, I would advise beginners (target audience of this tutorial) to try and avoid using sudo. If your command doesn’t work without sudo in front of it there is probably something “special” happening, so tread carefully…
(perhaps updating this tutorial to encourage best practice is appropriate)
Hi paul.van.klaveren,
Thanks for the feedback. Let me explain my thought process.
The beginning portion of the article actually assumes that you are logged in as an unprivileged user that you can create by following a guide like this:
https://digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04
While running sudo in front of commands unnecessarily certainly is a security risk, removing the sudo while running as the root user (which is the default of our image) will not give you an additional benefits. In fact, you have even more potential for destruction. I recommend that you configure unprivileged users on any server that you are working with and use them for most tasks.
Starting with the “How to Upgrade Ghost” section, the article specifies that you should log in as the root user. This is because nearly every step after that point is modifying files that you would not have access to as a regular user and is dealing with configuration as opposed to general system tasks like starting and stopping services. It still may be preferable to log in as a regular user, but you would instead have to add sudo before each command anyways, negating much of the benefit.
Let me know if that makes sense or if you have any questions.
Hello!
Just upgraded to Ghost 0.5 and the command “service ghost stop” gives me “stop: Unknown Instance”. Everything still works but this command is not anymore. Any idea why?
Hi! Do i need to run my Ghost installation as root? Can I change to another user? And how would I go about permissions for /var/www/ to make it work and have write access (to upload themes, etc.)?
I’m wondering if it is a good solution to have a sqlite db. Isn’t better to have something like postgres?