I just manually set up this Ghost blog on a Digital Ocean droplet running Ubuntu.
Digital Ocean offers a one-click solution for deploying Ghost, but I assume (and do not know) that the one-click solution doesn't allow for Nginx proxying, which is a requirement for me.
And, I wanted to set this up myself anyways...
However, the setup process was initially counterintuitive to how I tend to deploy new sites on my droplet, so it took a bit more time to get going than I might have hoped.
Once I understood I was thinking about the setup backwards, things moved in the right direction very quickly.
My usual workflow for deploying sites to my droplet is to:
- Build locally
git pushto production
(This is, of course, a massive simplification, but these are the important steps.)
I attempted this same pattern with Ghost, only to have Ghost's
grunt processes complain at me about not having access to a git working tree on the server. This is because I tend to use bare git repos on the server; there is no working tree by design.
At this point, I reached out to the Ghost community Slack, and in less than two minutes heard back from Ghost's CTO and lead developer, Hannah Wolfe. She pointed out that the better workflow is to install an official build directly to the server.
Of course Digital Ocean already had an article describing in detail my exact needs, i.e. how to:
- Install a Ghost build directly to Ubuntu
- Edit the Ghost config file
- Proxy with Nginx
- Fire up the blog server permanently with modules like
What worked for me
Digital Ocean's excellent "How To Create a Blog with Ghost and Nginx on Ubuntu 14.04" guide by Tammy Fox got me 95% of the way there.
A couple of minor hickups for my setup worth calling out:
forever. The guide only covers
forever, but it's the same concept, so the
foreversection of the guide is still worth reading for
forever, you might input:
NODE_ENV=production forever start index.js
pm2it would be:
NODE_ENV=production pm2 start index.js
(Side note: The
productionenvironment variable is important, as Ghost will launch in
developmentmode without it. See your Ghost config file for details.)
I hit the
sqlite3module snag that some people see when firing up the Ghost blog server. This Ghost troubleshooting guide helped me sort that out fairly quickly.
Hopefully this gives you a few hints that help speed up deployment of your Ghost blog.