How To Install Ghost on CentOS

There is a script that will automatically do the entire installation of Ghost for you which you can find in our One-Click Ghost Install Script for Ubuntu and CentOS article. If you would like to use that, great! If not, this page will describe how to go from a clean CentOS basic server install, to having a Ghost blog running on Node.js

First make sure CentOS is up to date and install some additional packages that will be needed to compile Node.js. To check run

yum update -y
yum install -y wget

Installing Node.js From Source

Run the following commands to install Node.js:

curl -sL | bash -
yum install -y nodejs

Download and Installing Ghost

Download and unpack Ghost with the following commands:

mkdir -p /var/www/
cd /var/www/  
curl -L -O  
unzip -d ghost  
cd ghost
sudo npm install --production

Configure Ghost

sudo vi config.example.js

In the "Production" section, change the following:

host: '',


host: '',

Create Ghost User

useradd ghost
chown -R ghost:ghost /var/www/ghost/

Now to start Ghost, you will need to log into your "ghost" user.

su - ghost
cd /var/www/ghost/

Now that you are logged in with your "ghost" user you can start Ghost:

npm start --production

Browse to

Proxy to Port 80 and Keep Ghost Running

There you have it, Node.js is installed, Ghost files are located in /var/www/ghost, and Ghost has been started. You can keep Ghost the way it is currently setup if using for a development environment and do not mind adding :2368 to the end of your url. If you are looking for more of a production setup, we would highly recommend you check out the following two articles to help get your Ghost blog ready:

  • How to Proxy Port 80 to 2368 for Ghost with Nginx
  • Keep Ghost Running with PM2
  • Next Steps:

    Learn Ghost from the Ground Up

    Head to "Ghost for Beginners" to learn everything you need to know about learning and customizing Ghost

    Find the Perfect Ghost Theme

    Go to our Ghost themes section of this site to browse all of your Ghost theme options in one place.