Installing Ghost on Mac
Ghost is a new blogging platform. In fact, it’s still in version 0.4.2 when this post is published. Yes, zero point something, not even one yet. If you like exploring new things, I recommend you to give Ghost a try. It’s released under MIT license, which means everyone is free to use, copy, modify, merge, publish, distribute, sublicense, or even sell it.
I have installed Ghost on my Mac because I wanted to create my own theme. Installing the platform and creating its theme are not rocket science that mere mortal like me can do it. Now, I’d like to share how to install Ghost on Mac.1
Ghost is built on
node.js, so first thing you need to do is install
node.js if you haven’t.2 Go to the download page to download the Macintosh Installer package. Open Finder. Go to your Downloads folder in your Finder. Run the downloaded package (
node.js at any directory you want (but make sure that the location is in your
Alternatively, if you prefer to install
node.js via terminal with command line,3 here are the steps (in this example I install
$ cd ~/Applications $ curl -O http://nodejs.org/dist/node-latest.tar.gz $ tar -zxvf node-latest.tar.gz $ cd node-vX.XX.XX $ ./configure $ make $ sudo make install
Download the latest stable version of node.js to
~/Applicationsdirectory or any location you want, unzip the downloaded package, and then install it. Done.
Installing Ghost is quite simple. Just download the package from its website. Unzip the package and place it anywhere you want (in this example I put it in
~/Applications/ghost). And then install it.
$ mkdir -p ~/Applications/ghost $ cd ~/Applications/ghost $ curl -OL https://ghost.org/zip/ghost-latest.zip $ unzip ghost-latest.zip $ npm install --production $ cp config.example.js config.js
The installation is actually finished here, but before starting Ghost, you need to configure something. Open Finder. Go to the Ghost installation directory (
config.js file. Edit
config.js with any text editor you like. Replace all
url: 'http://my-ghost-blog.com' with
url: 'http://127.0.0.1:2368'. And now Ghost is ready to be started.
$ npm start --production > firstname.lastname@example.org start /Users/nmadjid/Downloads/ghost > node index Ghost is running... Your blog is now available on http://127.0.0.1:2368 Ctrl+C to shut down
Open your browser, go to
http://127.0.0.1:2368. Boom, Ghost blog is running on your Mac.
Running Ghost in background
Starting Ghost with
npm start requires the terminal where you run the command to be always open. If you close the terminal, then Ghost will stop running. To prevent Ghost from stopping, you can use
forever to run Ghost in background. Of course you need to install
forever first if you haven’t.
$ sudo npm install forever -g $ NODE_ENV=production forever start index.js
By starting Ghost with
forever, now you can close the terminal without making Ghost stop running.4 That’s it. Ghost is running nicely on your Mac. Go to
http://127.0.0.1:2368/ghost/ with your browser for signing up an account in your new Ghost blog. When you’ve signed in, you can start writing posts or change some settings. Happy Ghosting!
Update 27 August 2014
The blog is now built on Jekyll.
Update 01 October 2016:
I have moved the blog to Blot. Surprise, surprise!
Mine runs OS X 10.9 Mavericks↩
Node.js is kind of application platform. It’s not necessary to know what node.js is for you to install Ghost, I’m no expert either. However, if you’re interested you can learn more about it at nodejs.org.↩
Just because it looks cool, right?↩
To stop Ghost just type
forever stop index.js.↩