Got myself into a problem trying to install Ghost 0.4.2 on a Digital Ocean Droplet with node 0.10. I used the Dokku Droplet (instead of their Ghost setup) because I'd like to install multiple node apps with different domains.
I git cloned the stable Ghost release and followed the instructions they gave to set it up:
npm install -g grunt-cli
grunt init (and grunt prod if you want to run Ghost in production mode)
I've changed my config.js file (the production part) to
filename: path.join(__dirname, '/content/data/ghost.db')
// Host to be passed to node's `net.Server#listen()`
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
When I use port 2368, it says that "Ghost is running...
Your blog is now available on http://mydomain.co"
But then it gives me a 502 error.
Ok, when I change the production port to 80 (one article suggested this), it throws this error:
throw er; // Unhandled 'error' event
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at process._tickDomainCallback (node.js:459:13)
at process._tickFromSpinner (node.js:390:15)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
I'm guessing this means that port is already in use.
Ok, so here's another part I don't understand. Many sites mention trying "sudo service ghost restart". I always get "ghost: unrecognized service" to this. It's odd because everything is in place and the developer instructions they gave (see the top of this) worked well for installing it. But my system doesn't know it's there.
Also, there doesn't seem to be any /var/www/ghost file. Not sure what that means.
I've sleuthed and googled but can't seem to figure this out. Any hints or tips would be so appreciated.
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.