Installing Ghost on DigitalOceanA guide for installing and configuring Ghost on a droplet.

We’ll cover how to get a Ghost blog working properly on a DigitalOcean droplet from start to finish.


Creating the Droplet

First login to your DigitalOcean account.

After logging in click the Create button in the header of the member’s section, then select Droplets from the menu.

Under the Select Image section there is an Applications tab which happens to contain a pre-built image of Ubuntu with the latest version of Ghost installed (0.4.2 happens to be the latest as of right now).

Select Ghost 0.4.2 on Ubuntu 12.04 as your droplet image, configure everything else to your preference and create your droplet.

After your droplet is ready, your blog should now be up and running! It was that easy? Not quite. Navigate to the management page of your droplet that you just created and fetch its public IP address.

Configuring Ghost

Now that you have Ghost up and running you can navigate to /ghostwhich happens to be the administration area. For me, it happens to be http://192.241.255.119/ghost.

Signup and login immediately as this page is a first come, first serve basis. Whomever signs up first is the admin, and if it’s not you, you’ll have to wipe the droplet and start over again.

We’re not out of the woods yet! We actually have to get our hands a little dirty in code. Switch back to DigitalOcean in your browser and pull up your droplets administrative page so we can access our droplet through the console.

From the droplets administrative page, click on Console Access to start a SSH session to the droplet through your browser.

Ghost happens to use sendmail by default to send out emails, but DigitalOcean doesn’t automatically install it for us so we need to do this manually.

Once you’ve logged in to your droplet via the console enter apt-get install sendmail. If you prefer something other than sendmail you can read more here, but for the purpose of this guide we’re just going to go with sendmail.

After you enter the command you’ll be prompted to confirm whether or not you want to install the software, enter Y and press ENTER.

Once sendmail has finished installing we then need to update our blogs configuration file. From the prompt enter nano /var/www/ghost/config.js to bring it up on the screen.

In this configuration file there happens to be 2 separate URL values. You only need to update one, but if you choose to update both that’s fine too. One is located under the development key, and the under is located under the production key.

config = {  
    development: {
        url: 'http://...',

    production: {
        url: 'http://...',
}

You only need to update the url value for the production key. Go ahead and update the value to be the domain for your blog. Since we’re using nano, you’ll need to use your arrow keys to navigate around.

After you’re done updating your blogs URL you can save and exit the file by entering CTRL + X then typing Y (to save the file) and pressing ENTER on your keyboard.

Now that you’ve created a droplet for your blog, installed sendmail and configured Ghost, you’ll need to update your DNS settings to point to your blog accordingly.


Looking Back

The user interface of Ghost is pretty simple and I love the fact that you write your blog posts in Markdown! If you don’t know what Markdown is, you can read more about it here. It’s pretty much the defacto standard that has been adopted by developers for marking up documentation for their coding projects. This alone gives it major points in my book. I’m a fan of Markdown if you didn’t notice yet.

The only gripe I really had through the process was the fact that you have to manually update the config.js file to properly set the domain of your blog. I’m sure the Ghost team will change this in a future release, it really should be done through the admin web panel. I know that everyone’s not a programmer, even though I am!

Looking back it only took 10 minutes to actually install and configure the blog. The software itself isn’t over-bloated with features, it’s minimal, and I think that’s exactly what has won me over. I don’t want to build an entire website, I just want to blog! If you’re in the same boat as me, take the 10 minutes and give it a shot!

If you had any problems with this guide, or have a suggestion, please leave a comment.


Resources

About Salvatore Garbesi