How to Host a Ghost Blog for Free

Ghost is a popular open-source blogging platform that allows users to create a beautiful blog in minutes – it’s what I used when I first started this blog.

If you’re interested in creating a blog but don’t want to spend money on hosting, keep reading and we’ll show you how to get started with free ghost hosting.

Alternatively, if you’re looking to create a personal blog or something more lightweight, then check out Banner Blog, where words take center stage.

Why Create a Ghost Blog?

Ghost is considered by many to be one of the best blogging platforms out there at the moment, with a focus on performance and a sleek and user-friendly user interface.

It comes with tones of features including:

  • Beautiful pre-made site templates
  • Email newsletter functionality built-in
  • Membership management
  • Native analytics
  • Fully open-source
  • Integration with 100s of other tools

Ghost offers a fully hosted plan starting at $9 / month, which is the best ghost hosting plan if you want an easy life, with CDN and support included.

However, if you’re a cash-conscious founder who’s looking to reduce the number of subscriptions you’re using while starting your business, keep reading to get your free ghost hosting!

Should You Host a Ghost Blog For Free?

The short answer is maybe.

Free blog hosting is great if:

  • You’re making an incredibly small site – e.g. you’re making a site just for a small group of friends/family
  • You want to try out blogging before financially investing in it

And that’s about it.

As I mentioned in the introduction, I used the exact method I’m outlining below to start a free blog when I launched Solo Innovator (this blog). At the time, I was new to blogging and wanted to test the waters to see if it was something I was interested in long-term before I committed money to pay for hosting, and I’m glad I did!

However, after I’d written about 10 posts and had caught the bug for creating content, I decided to upgrade to a paid plan. That’s because, with hosting, you get what you pay for. So if you don’t pay anything, you can’t expect much in return.

For me, I found the following issues with my free hosting:

  • Unreliable uptime: Sometimes the site would go down for no reason
  • Slow Responses: Because my site was on a server with lots of other websites, sometimes I’d have incredibly slow page-load times
  • Limited storage: After uploading just 10 pages, with a few images on each page, I found that I was running out of storage space on my free plan

Because of these issues, after a few months of running the free plan, I bit the bullet and spent around $30 for a year of website hosting with another company.

So with that covered, if you’re still interested in hosting a free fly.io Ghost blog, then keep reading.

How Can I Host a Ghost Blog For Free?

Hosting a free ghost blog is simple thanks to an amazing app deployment platform called Fly.io. I used this exact technique when originally setting up this blog, so you’re in safe hands for a simple setup.

To get started, we’re going to go through the following steps:

  1. Install the Fly.io command line interface
  2. Sign up for Fly.io
  3. Deploy Ghost using the pre-made Docker image
  4. Configure an SQLite database to store the Ghost data
  5. Deploy the app
  6. Setup our custom domain (if appropriate)

Let’s cover each of these steps in more detail to help you get started.

If you’re not used to command line tools before, don’t fret, I’ve laid out the simple commands below for you to copy and paste. All you need to do is open Command Prompt on Windows (or Terminal on Mac) and follow the steps below.

Note: At the time of writing, the Docker Ghost version is 5.66.1, which can be found on this docker page. Although I don’t expect anything to change, be aware that installation commands can change with different versions. If you notice anything off with the installation commands, let me know in the comments and I’ll try my best to help!

Installing the Fly.io Command Line Interface (CLI)

Firstly, we need to install the command line tools for Fly.io in order to be able to deploy the application.

To do this, run the following commands in your command prompt or terminal:

Windows:

curl -L https://fly.io.install.sh | sh

Mac with Homebrew:

brew install flyctl

(If you don’t have homebrew installed on your mac, run the following command first)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Create a Fly.io Account

After successfully installing the Fly.io CLI, we need to create an account to be able to deploy.

Run the following command to open a browser window in order to create an account.

flyctl auth login

After creating an account by either using an email address or GitHub, you will be required to enter your billing details in order to create any resources.

Fly.io provides a generous free tier, meaning you won’t exceed your limit from hosting a Ghost server on your account, but they require you to enter your card details in case you decide to upgrade your plan later down the line.

Full details of Fly.io pricing can be found here.

After you’ve logged in successfully, you should be able to return to the command line to continue deploying the ghost app.

Deploying Ghost Using the Pre-Made Docker Image

Next, we are going to create an app on Fly.io to host the latest Ghost docker image.

If these words sound like technical mumbo jumbo to you, then don’t worry as they won’t affect the blog once you’re fully set up. Just keep reading and following the steps and you’ll be fine.

We need to create a folder on our computer in order to store the configuration files. In this example, we will call the folder blog.

mkdir blog
cd blog
flyctl launch --image=ghost --no-deploy

Follow the instructions that appear on the terminal screen to set up your Fly.io instance.

At one step in the process, you’ll be asked to enter a name for your application. This name must be unique for every site hosted on Fly.io, meaning that you may need to try a few different names for it to work

Make sure to remember this name, as you’ll need it for some steps later.

Configure an SQLite Database to Store the Ghost Data

Next, we’ll need to create a database to store your blog posts in (Fly.io calls this a volume).

Run the following command to create a 3GB volume called data for the instance:

flyctl volumes create data -s 3

When following the instructions, make sure you choose the same region that your Ghost deployment is located in.

Configure Your Blog

Before we actually make our blog available online, we need to edit a configuration file.

In the folder that you recently created (we’ve called it blog in this tutorial), open the fly.toml file using notepad (or TextEdit on a Mac) and update the following sections.

[env]  
  url = "https://blog.fly.dev"  
  database__client = "sqlite3"  
  database__connection__filename = "content/data/ghost.db"  
  database__useNullAsDefault = "true"  
  database__debug = "false"
  
[mounts]
  source="data"
  destination="/var/lib/ghost/content"

[[services]]  
  internal_port = 2368

Some of the section titles (such as [env]) may already exist in the file. If they do, just add the config values below the pre-existing title.

Make sure that you replace the URL in the config with the name you gave when creating the fly application.

For example, if your deployment name was called my-new-blog, then update the url to be "https://my-new-blog.fly.dev".

Set Your Ghost Blog Live

Now that the blog has been configured, you can deploy it by running the following command:

flyctl deploy

This process usually takes a few minutes, so feel free to go and make a coffee while you wait.

Once it’s done, you’ll be able to go to your blog’s web address (e.g.  https://my-new-blog.fly.dev) and see your new Ghost blog.

Create an Account

In order to edit the look of your blog and create new posts, you’ll need to create an account.

To do this go to yourBlog.fly.dev/ghost in the search bar and fill in your details.

How do I Set Up a Custom Domain For My Free Ghost Blog?

If you would like to use a fly io custom domain name for your project, i.e. for this blog be able to type in soloinnovator.com rather than soloinnovator.fly.dev to access the blog, then keep on reading.

For the rest of this guide, I’ll presume that you have bought a domain name and have access to the relevant panel to change DNS records. If you don’t, a quick Google search of how to do this would be useful.

Register the Domain on Fly.io

To get started, run the following commands from the folder that you were working in earlier in the post, replacing host.com with the custom domain name that you wish to use.

fly domains add host.com
fly certs add host.com

After running this command, you will see an output like the one below

You are creating a certificate for host.com
We are using lets_encrypt for this certificate.

You can direct traffic to host.com by:

1: Adding an A record to your DNS service which reads

A @ XX.XX.XX.XX

You can validate your ownership of host.com by:

2: Adding an AAAA record to your DNS service which reads:

AAAA @ XXXX:XXXX:X::X:XXXX

Follow these instructions to add the A and AAAA records to your DNS in order to set up the fly custom domain.

Note that it normally takes around 15 minutes to verify the domain and issue an https certificate.

Update the Config and Redeploy

While you’re waiting for the certificates to be generated, open the fly.toml configuration file and update the url parameter to be the new certificate that you created

After updating this value, run the following command to redeploy your ghost application.

flyctl deploy

The redeployment process may take a few minutes, then you will be able to access the site from your new domain.

How do I Set Up the Transactional Mailer

The transactional mailer is used to send simple emails, such as notifications and signup confirmations from Ghost through an SMTP configuration. To do this, add the following configuration options to the [env] title in your fly.toml file (replacing the blank values with the credentials to your SMTP server).

[env]  
  mail__from = "..."  
  mail__transport = "SMTP"  
  mail__options__host = "..."  
  mail__options__port = ...  
  mail__options__auth__user = ...  
  mail__options__auth__pass = ...

Note that bulk emailing (such as sending newsletters) needs to be configured on the Ghost admin panel using Mailgun.

Overview

Congratulations on setting up your Ghost blog free hosting! You can edit your blog’s site and write some blog posts by heading to /ghost and read up about everything that Ghost can do here.

I’d also recommend that you have a look at our full guide to improving your site’s SEO so that you can get your posts appearing in Google quickly.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *