How to Set up the Ghost Blog in Azure

choubertsprojects

VPN offers!

1. NordVPN

2. Surfshark

3. ExpressVPN

This blog post is a step-by-step guide on how to set up your own personal web server in the cloud with Azure, using Ghost.

The “how to host a ghost platform on azure” is a blog post that explains how to set up the Ghost blogging platform in Azure. The article also includes a link to the official documentation for setting up your blog.

How to Set up the Ghost Blog in Azure

The Ghost blogging platform is an open-source, quick, and easier method to get started blogging than WordPress. You can obtain Ghost on Azure in no time if you have a Microsoft Azure subscription and a little bit of time.

I strongly suggest these Pluralsight courses if you need to brush up on Azure App Services before jumping in. You may sign up for a free 10-day trial of Pluralsight here if you don’t already have one.

It’s worth noting that you’ll be charged for any Azure resources you use. Beware if you set up your blog and then receive a fee a month later! Always make sure you know the expenditures ahead of time, even if they should be modest.

Using an App Service to deploy Ghost 2.0 on Azure

The first step is to establish an Azure web app or app service and then install Ghost on it. Fortunately for you and me, Radoslav Gatev, a Microsoft Azure MVP, has designed a one-click deployment for us in his GitHub repository, making this procedure a breeze.

  1. In the Ghost GitHub repo, click the Deploy to Azure button.

Installing Ghost on AzureInstalling Ghost on Azure

2. If you’re already signed into Azure, you’ll get a list of alternatives for deploying Ghost 2.0 to Azure.

Configuring the Ghost Azure blogConfiguring the Ghost Azure blog

After you complete the deployment, your subscription will shortly include an Azure App Service.

On Azure, set index.js as the default document.

When browsing to the root of our app service, this is essential for Ghost to appear.

In the Azure portal, locate your Azure App Service, then click Configuration, then Default Documents, and add index.js as seen below.

Creating a standard documentCreating a standard document

Always On is enabled.

Although it is optional, I recommend that you use the Always On functionality to avoid your app service from shutting down unexpectedly.

Activating Always On will ensure your site is always as fast as it can be. To do so, go the Configuration section of your app service and click on General settings. In here, you’ll find the option to Always On is enabled. as shown below.

Activating Always OnActivating Always On

Create a unique domain

At this point, you could be up and running with Ghost on Azure if you’re OK with a <sitename>.azurewebsites.net domain name. Most of the time, I’m assuming that you’ll want to use your own domain. In that case, you’ll need to configure a custom domain.

  1. Select Add custom domain from the Custom domains section of your app service.

Using Azure App Service to add a custom domainUsing Azure App Service to add a custom domain

2. Type your domain name into the box and hit the Validate button.

Adding your own domainAdding your own domain

You’re nearly done configuring Ghost on Azure!

Set up DNS records

To make this work, you’ll need to put up a few DNS entries in your DNS provider. I went with the A record.

You’ll need to create an A record that points to your app service’s External IP address.

You will also need to create a TXT record for Azure to verify you own the domain. The TXT record needs to point to<appservicename>.azurewebsites.net.

Click Validate once more after creating the A record to send traffic from your domain to your app service URL and the TXT record. It should verify after a while and enable you to establish the custom domain.

Only enable HTTPS.

Although it is an optional setting, I suggest using HTTPS Only to guarantee that all communication is secured. You may accomplish this by turning on the HTTPS Only option, as seen below.

Only allow HTTPS on custom domainsOnly allow HTTPS on custom domains

Cleanup

Finally, you may delete the previously established TXT DNS record. That TXT record was simply necessary to verify your domain ownership.

Summary

Hosting your own Ghost blog is a fantastic free alternative to paying for one. Hosting Ghost on Azure, on the other hand, is an excellent project to learn more about Ghost and Azure App Services if you have some Azure credit or a low-traffic blog.

Further Reading

Another excellent resource is this one, which explains how to set up an Azure static site to interact with Cloudflare.

The “arm template viewer” is a command-line tool that allows you to view ARM templates. The ARM template viewer can be found in the Azure CLI.

Related Tags

  • visualize azure resources
  • azure app service 32 or 64 bit
  • azure app service use32bitworkerprocess
  • arm template builder
  • armviz