TheRobExperimentHow To Install Ghost With Custom GitHub Storage Adapter On DigitalOcean + CloudFlare—Solutions

How To Install Ghost With Custom GitHub Storage Adapter On DigitalOcean + CloudFlare—Solutions

A step-by-step walkthrough on how to effectively set up a new Ghost instance in a DigitalOcean Droplet, coupled with a MySQL database, use of GitHub as a Custom Cloud Storage, and CloudFlare as a trusty web infrastructure middleware! 👍🏻

How To Install Ghost With Custom GitHub Storage Adapter On DigitalOcean + CloudFlare—Solutions

This disclaimer informs readers that the views, thoughts, and opinions expressed in the following article belong solely to the author, and not necessarily to the author's employer, organization, committee, or other group or individual. The following write-up is a personal perspective based off the author's personal experience and account.
The author shall take no responsibility or be affiliated to any of the readers' own take or experiments to replicate the results expressed in this article. Readers are reminded to practice self-caution, safety, and calculated-risks prior to any experimentations, as well as to double-check on details prior to any potential actions or purchases.

Why Ghost?

I came to known of the existence of the Ghost CMS Platform a few years back and have fallen in love with their platform's simplicity and the ability to have full ownership over the content I put together.

However, installing Ghost required a VPS setup and I was already comfortably running on my trustworthy WordPress setups, based off my shared CPanel Hosting for the last 18 years. I hung on tight and didn't make the switch back then.

Eventually, over the last year, I had realised my writing experience on WordPress became a bit cumbersome as my setup got pretty bloated with custom CSS and plugins that over-complicated the writing process.

I needed a much simpler change and found the new Ghost v4.1.2 very enticing and sought to find a way to make the switch.

At the end of the day... I hoped for a writing platform that can get me as close to an experience like Medium, yet enabling me to have full ownership and control over all my content and media like WordPress.

• • •

Caveat

This setup requires some Basic technical-knowhow on how to use the following toolset:

  • Terminal (macOS) or Command Prompt (Windows),
  • Command Line Interface (CLI), and
  • GitHub.

However, this guide is designed to be "Beginner-friendly", and should not pose as a challenge to many as long as you are willing to try. ✌🏻


This solution will also be ideal setup re-start for those who had previously faced an Error 521 (Web Server Is Down) issues with their CloudFlare connection upon a fresh installation of a Ghost instance.


• • •

The Setup

Everyone's choice of setup is different. I have been building my own sites for the last 18 years and the following is my current ideal web-stack for installing Ghost while having the choice to migrate easily elsewhere where necessary.

This writeup took me roughly 5-days to test it out and set this article up but it will roughly take <1 hour for you to run through it! Good luck!

Assuming that you know how to setup your Domain Name or had already purchased one and linked it up with CloudFlare. If you have not, you can get one at NameCheap as they are affordable and easy-to-use!


A. Hosting Platform

  • DigitalOcean Droplet—Do sign up here for a new account & get USD100.00 Free Credits to test out their platform if you have yet to have an account.
  • Ghost CMS Platform—Installs easily with DigitalOcean's 1-Click Marketplace App Installs.
  • MySQL Database—Given that it is production-installation, MySQL will be automatically installed with the DigitalOcean Droplet installation, which serves as a more robust database when compared to the SQLite3 database that comes installed by default, when Ghost is installed locally as a development-installation.
  • Custom Storage Adapter (GitHub)—Media cloud storage for "unlimited" uploads with Global CDN support and ease of management for future site backups or migration. There are various other Storage Adapter options like Amazon S3, Google Cloud, Google Drive, Microsoft Azure, Backblaze B2, Clouldinary, etc.

    I chose GitHub as a no-budget option that serves as a blazingly-fast Global-CDN. However, the caveat here is that you need to set your Repository to Public, so if you have photos that are private or you do not intend any of your media for public-access, then you should look either into just using the default local-file-store, Cloudinary or the other cloud-based options available.

B. Web Infrastructure Middleware

  • CloudFlare Free Plan—Comes with a great suite of services like CloudFlare's caching, DNS Management services and Free SSL/TLS Certificate amongst others. These are very useful to ensure a more secured setup with some site-redundancy in place.
• • •

Let's Get Started!

The primary setup here will focus on (i) Installing Ghost on the DigitalOcean Droplet, and (ii) Establishing a secured HTTPS connection with CloudFlare & Ghost.

Only thereafter, will we setup (iii) Ghost's Custom Storage Adapter, before you can fully make use of your new Ghost website!


Tagged in: