Updating Ghost broke my blog

I’ve read a few posts on this subject, but I just updated my ghost using the DO-specific guide and it came up with a 502 error. I followed a couple of questions on how and why this is happening, including debugging it by turning nginx off and then running npm start --production inside my ghost folder. This worked fine, I then restarted nginx and ran the command again and my blog came back up. Problem is that naturally, this will stop working when I close down that terminal window/want to do anything else in the same terminal window, but when I close it and use “service ghost start” or “service ghost restart” I get a 502 bad gateway again. Help? Should note my original install was a DO one-click.


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

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.

What port is Ghost running on? Nginx listens for it on 2368.

The Upstart init script used on the “one-click” droplet essentially just runs npm start --production Here’s a copy of if:

description "Ghost: Just a blogging platform"

start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!12345]

# If the process quits unexpectedly trigger a respawn

setuid ghost
setgid ghost
env NODE_ENV=production
chdir /var/www/ghost

exec /usr/local/bin/npm start --production

pre-stop exec /usr/local/bin/npm stop --production

Are there any errors in /var/log/upstart/ghost.log ?

This comment has been deleted