Installing Ghost on Reclaim Hosting

Starting August 1, 2020 Reclaim Hosting launched Reclaim Cloud which allows for more flexibility with applications such as Node.JS, Python, and Ruby. After the launch Reclaim is decommissioning installation of CloudLinux across all new servers. Feel free to check out Reclaim Cloud as an alternative!

With the launch of Node.js support for Reclaim Hosting environments this guide will walk you through the necessary steps to install a copy of the Ghost blogging platform. This is an advanced tutorial that involves using SSH. If you are not comfortable installing Ghost we highly recommend considering a managed hosting environment like https://ghost.org/. That being said, let’s get started.

The first step is to create the database that Ghost will use. We can do this in a series of steps using the MySQL Database Wizard.

Give your database a name, in this case I’ll use ghost_db

Then setup a database user and password (I like to use the same username as the database name to keep things simple)

Finally assign all permissions to the database for the user

While we’re at it, I’m going to go ahead and install an SSL certificate on my domain so that it loads over https. I do this with the Let’s Encrypt option in cPanel following this guide



If we were to load our domain now you’ll see that it’s empty (or if this is a brand new domain you might have a Reclaim Hosting splash page)

Next we’re going to setup our Node.js application that will be running Ghost. This is found under the Software section of cPanel

The panel shows you any Node.js applications created (in our case none) and we’ll click Create to setup one

Ghost requires node version 8 so we’ll select that. For the name of the folder we’ll use ghost (this folder gets added to the root level of the account) and we’re installing it at the main domain, in this case ghost.reclaimhosting.com. For the start file I put index.js which is the file that Ghost will use to run the application.

With the application created if we load our domain now we’ll seeing we are running a Node.js app, but we don’t yet have Ghost installed on it, this is just a basic application that prints the version to the screen.

Now it’s time to switch over to Terminal and SSH into our account. But before we do make note of the path that the Node.js application provides for entering a virtual environment here, you’ll need that.

In terminal the first thing I do is log in to my account, change directory (cd ghost) to the ghost directory, and remove all of the existing content (rm -rf *). Finally I paste in that source command to start my Node virtual environment (source /home/ghost/nodevenv/ghost/8/bin/activate && cd /home/ghost/ghost).

Next we install the Ghost command line interface by running npm i -g ghost-cli. Ghost will require the directory to be empty, however our system links a node_modules folder when the app is created so you’ll need to run unlink node_modules. Once that is done we’ll install Ghost with the following command ~/nodevenv/ghost/8/lib/bin/ghost install --no-setup-linux-user

The installer will ask us a few questions. First it warns we aren’t running Ubuntu which is just fine, so type y to continue

The installer also won’t recognize our MySQL setup but that’s ok as well, type y again

We then get a series of questions about our site URL and database. I use the https URL here and input the database username, password, and database name. The rest of the questions can be answered with No.

The folder structure Ghost uses will not work out of the box so we need to move some things around. Before we begin click Settings in the top right of File Manager and make sure Hidden Files are being show.

If you look in File Manager under the ghost folder at the root of the account you’ll see they have created a versions folder that can contain more than one version and the current folder is a link to a specific version. We’re going to change all this. First delete the content folder since we will be moving a different one into its place.

Now we are going to navigate down into that versions folder. There will be a folder inside of it with the Ghost version number and inside that folder you’ll find the full install here

We need to move all of this up to the main ghost folder. Select all and choose Move. Then type /ghost/ as the location to move everything to.


Finally we can delete the versions and current folders

Lastly for our Node.js application to detect all the new Ghost files we need to run a start script. If you go back to Node.js area of cPanel and edit your application you’ll remember this set of buttons at the top. We are going to run a JS script

Choose start and run it

After a few seconds (the loading page may get stuck so just close out that screen) if you navigate to your domain you’ll have a brand new Ghost installation up and running

You can navigate to /ghost to access the setup and get started with your new blog

3 Likes

I’ve been playing around with Ghost for a while and I’d really like to use it at the root of my own domain. I’ve had no trouble installing it to a subdomain but can’t seem to get it to work when I set it up to work at the root of my domain. Is there anything in this guide that would work differently if I wasn’t planning on installing to a subdomain?

Or is there maybe something I could do with DNS to make my ghost install at a subdomain look like it was at the root of my domain?

You would just use a different Application URL when setting up the Node app in cPanel. I can’t think of any reason the rest of the process would be any different.

Ok, so I would just pick my domain (jadin.me) from the dropdown like this?

Or would I need to specify public_html?

Nevermind I got it. I had been mixing up the name of the database I created…

1 Like

Just a note that as of 9/28/2019, the Ghost package needs NPM 8.x or 10.x and version 9.x is the latest available on Reclaim. So I installed with 8.15.0 (changing the command lines appropriately to /8/ instead of /6/) and things appear to be working…

Good catch, I’ve updated this guide to refer to the correct version recommended now. Thanks!

Messing around with updating my ghost install and it looks like the current version of ghost now requires one of the following versions of node or newer:
8.16.0, 10.13.0, 12.10.0

The current options at least on sebadoh are 6.16.0, 8.15.0, or 9.11.2 so at the moment it seems you are unable to install new installs of ghost unless there is a workaround of some kind!

Hmmm, the docs only reference the larger releases (8.x, 10.x) and not specific subversions. Did you try the upgrade and it failed?

I’ll make sure our servers also have 10 on there and maybe even 11 and 12.

I had the same problem, installation failed because Ghost wants a different version of Node. I’m excited to try out Ghost, looking forward to the Node upgrade.

Yes I had tried and it failed. Those version numbers are what the ghost-cli gave me as the reason why it would not do the install.

This was on a clean install, not an upgrade. My upgrade is not working, but for different reasons I think… I’m hoping to eventually do a clean install and import all my content to the new install.

I’m sure you’re on this, but in case it helps here is a forum talking about this issue, I believe

If the newest version of Ghost is incompatible with the version of Node on our servers you’ll need to stick to an older version until we get a more recent version upstream. The Node.js functionality on our servers is driven by a third party plugin and isn’t something for which we control updates beyond making major versions available. This is very much in the “if it works great but if not sorry” realm in terms of what we can support. Many other webhosts simply don’t offer compatibility with Ghost due to the complexity of how it runs as an application compared to WordPress and other apps. This guide was written as a courtesy but shouldn’t be confused to indicator support on our end.

That’s fair, I totally understand. Just one quick question…how do I know which version of Ghost I’m installing? I’m following your instructions, is there something I can modify within your instructions to install an older version of Ghost? Thanks for your help.

No problem! Just wanted to point this out.

Looks like you should be able to specify a version like this:

~/nodevenv/ghost/8/lib/bin/ghost install 2.15.0 --no-setup-linux-user

from: Ghost-CLI - A fully loaded tool for installation and configuration

@taylorjadin Thanks for the tip! It looks like the node error is generated by the Ghost CLI installer. So, if I specify a Ghost version to install it doesn’t work. Now I’m trying to find out how to install an old version of the Ghost CLI, but haven’t made progress :roll_eyes:

Node has been updated and I was able to install the latest version of Ghost (3.0.2). :metal:

Is there documentation (or can anyone share how) to upgrade from Ghost 2.31.1 to Ghost 3? The Ghost docs just say “run ghost update” but I assume it won’t be that easy :slight_smile:

Hi Chris,

Is this for https://words.fncll.org/? If so (or even if not it might be a good test), take an export backup if need be, then stop node.js and update the version to 10.20.1. After that restart node.js and then login via command line using the following:

source /home/fncllorg/nodevenv/ghost/8/bin/activate && cd /home/fncllorg/ghost

After that, run that update command and see if that works.

Let me know.
Jim