Get Ghost running with Passenger on a DreamHost VPS

Ghost is the most popular blogging platform for node and in this tutorial I will show you how to install it on a VPS using Passenger. First read up on how to set up NVM on the Dreamhost KB here https://help.dreamhost.com/hc/en-us/articles/217185397-Node-js-overview. I recommend upgrading NPM as well, since older versions tend to fail when installing node modules.

Enable passenger node support via the DreamHost panel for the domain that you will be using. Visit https://panel.dreamhost.com/index.cgi?tree=domain.manage&and click the edit link to the right of the domain. Next check the passenger checkbox along with the node check box. Once you have everything set up you can begin to install you application.

SSH into your site and user and then cd into the main site directory.

From here we are going to fetch the latest version of Ghost at this time which is version 0.11.0.

In the next step we install the all the node modules needed for production. We run this form within our site/app directory.

This will take a few minutes and once done we move on to setting up our MySQL connection. Head on over to https://panel.dreamhost.com/index.cgi?tree=goodies.mysql& and create your db, hostname, user, and password. Next we are going to copy the example config file and edit it with our MySQL information.

Open up the file and modify the production settings with your domain information and MySQL info.

I highly recommend sticking to MySQL instead of attempting to use the SQLite adapter as it is not compatible with the version of on the server as of this moment. Make sure there is a forrward slash at then of the URL or you will get a Ghost error.

Next we will create an .htaccess file and add our Passenger specific directives as the startup node file isn’t app.js so we must tell passenger what it is.

In the file we will add the following.

Now open your domain in your browser and you should see your new Ghost blog. To set up your admin account visit yourdomain.com/ghost and fill out the form.