Nov 18, 2018 2 min read

Run Ghost 2.x on Azure

A "how to" guide to running Ghost 2.x on Azure

Run Ghost 2.x on Azure

I wanted to get blogging fast, but first I needed a blogging platform. It needed to be simple, fast, have nice out-of-the-box theme but still be completely customizable. After some research, and seeing it in action with Waldek Mastykarz and Paul Schaeflein, I ended up with Ghost.

Ghost is an awesome platform that let's you focus on writing. You can either run it hosted for a monthly fee (called Ghost Pro) or self-host. I chose to self-host on Azure, as I already had an App Service Plan that I wasn't fully using.

Installation

I'm no hero with node.js, but fortunately Radoslav Gatev created a Github repository with an easy deploy mechanism to Azure!

  1. Fork the repository into your own account
  2. In your own account, click the Deploy to Azure button
  3. Fill in the fields. For Sku, choose at least Basic. It allows to have a custom domain with SSL. Leave Email Service to not configured, we'll set it up later.
  4. Click Next and review, if correct click Deploy

Custom Domain

It's not very personal to have a yourname.azurewebsites.net address for your blog, so time to add your custom domain!

  1. Go into the Azure Portal and open your newly deployed Azure App Service
  2. In the left menu, click Custom Domains.
  3. Turn HTTPS Only to On, this will redirect all http requests for your website into https.
  4. If you already own your domain, continue with Add hostname and follow the steps. If not, click Buy domain and follow the guidance.

Now that your domain is correctly associated to your Azure App Service, we still need to make your Ghost blog aware of it:

  1. In your Azure App Service, navigate to Application Settings
  2. Find the App Setting named url and update it's value to your domain

Your Ghost installation can now be accessed by directing a browser to your domain. At this stage, you will probably get a certificate error since we didn't create a certificate for our HTTPS settings yet. We'll solve this in a next post, with Let's Encrypt and Azure Functions!

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Yannick Reekmans.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.