Ghost is a brand new CMS that specifically targets bloggers and other content writers, while doing an incredible job at it. While installing the Ghost CMS is a bit different than any other content management system that you may have previously installed, this article fully teach you how to install Ghost.
Note: You will need a VPS or dedicated server with root access to install Ghost.
First, log into your server via SSH. As nearly every process of the Ghost installation and setup will be done via SSH, we recommend at least a basic understanding of how a Linux command line works.
As Ghost depends on Node.js, you will first need to have it installed and running on your server. Once Node.js is fully installed on your VPS or dedicated server, you're ready to continue on to the next step.
To move to your desired directory, download, and extract the Ghost core files, you will want to run commands similar to the following. Of course, change the username to a valid user.
Now, create a new folder in your home directory for Ghost to reside.
Then, move into that directory.
Next, you just need to download the core files for Ghost. To do so, run the following command.
Now, you just need to extract the zip file that is provided by Ghost. Running the following will do so.
From here, the Ghost setup files will then be extracted to the directory that you are in. Now, we're ready to continue with installing Ghost. To do so, run the following command.
npm install --production
Once the previous command finishes, Ghost is now installed to that directory. In the next steps, we will walk you through configuring Ghost.
Next, you will need to download the core files for Ghost. Keep in mind, that the location that you place the files, will be the location of your Ghost installation so you will want to put them in a good place. For this, I recommend placing them in your home directory for a poarticular cPanel user. For example, if your cPanel user is userna5, you will place the files within userna5 in the next step.
As Ghost is its own, standalone server process that does not use a standard HTTP server such as Apache, these processes will need to be stopped and disabled before you can set Ghost to run on your site.
First, you will need to disable the Apache service from restarting. This can be done from either within cPanel, or manually changing the file that controls it. As we are already in the command line, it is easiest to just manually change the file. To do so, you may run the following.
nano -w /etc/chkserv.d/chkservd.conf
Running this command will allow you to change the configuration file that determines what services are automatically restarted if they are down. Here, you should see a line that says:
To disable Apache from automatically restarted and taking control over port 80 instead of our Ghost installation, we will need to turn this option off. To do so, just change the 1 to a 0. After you are done making the change, hold the Ctrl key down and press X. Then, press Y to confirm that you want to save your changes.
Now that Apache will no longer restart itself if it is turned off, its time to stop the Apache service. To stop Apache, issue the following command.
service httpd stop
Now that Ghost has been installed and Apache has been disabled to allow Ghost to run on port 80, its time to configure Ghost.
First, you will need to open the file in a text editor. In this example, we will use nano, but if you are familiar with the Linux command line, feel free to use any text editor that you want.
nano -w config.js
The file will then open up in the text editor. Here, you will see a few entires that you will need to change. In the Production section, you will see the following:
Here, you will change the host option to reflect the IP of the server, and the port will be changed to port 80 as this is the port that will be used by default when an individual types in your domain into their web browser.
Once done making these changes to the Ghost config.js file, press Ctrl+X to exit, and Y when you are asked to save your changes.
Now that Ghost is configured, you will just need to start it up. From your command line, inside the directory that you have Ghost installed on, enter the following command.
screen npm start --production
This will allow you to start Ghost within a screen session so that you can run it in the background. Without using the screen command first, if your SSL session were to close, your site would be down as well. After you have entered this command, you can detach the screen session by holding the Ctrl key down, pressing A, then pressing D. The screen should then display as detached so that you can leave Ghost running in the background.
Creating your first Ghost user account
Of course, your installation is no good unless your have a user to modify content. To create your first Ghost user, simply go to your admin panel at:
Ghost should then prompt you to create a new user and log you into the admin panel.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!