Setting Up Ghost + DigitalOcean + Cloudflare

Ghost Sep 05, 2020

Recently I stumbled upon a new blogging platform called as Ghost. It had everything I wanted - from a beautiful editor to powerful third party app integrations.

Using Ghost allows me to spend more time on writing and less time on fixing and hacking things which I was previously doing with my Hexo blog. You can find my old blog design here.

Ishan Badgainya
Ishan Badgainya

Migrating to Ghost was quite simple and DigitalOcean made it even simpler. I am back on DigitalOcean almost after 3 years. DigitalOcean offers one click solution to deploy Ghost blog. Here's how I did it in-case anyone is planning the same solution -

Signup at DigitalOcean

Head over to DigitalOcean's website and create an account.

DigitalOcean – The developer cloud
Helping millions of developers easily build, test, manage, and scale applications of any size – faster than ever before.

Create a new Project

Creating Projects

Now we create a 'Droplet'. It's DigitalOcean's way of saying an 'instance' if you are coming over from AWS. Search for Ghost in the marketplace.

Ghost in the Marketplace

Choose a plan. I would recommend the $5 plan. It's more than enough for a small to medium size blog. You can always resize the droplet later.

Choosing a datacenter region

Now this one is a difficult choice. Inititally I selected random region because I did not know if it would make any difference. I live in India and I selected the datacenter region of NewYork. This created a huge latency when accessing my website page or even accessing the server via SSH.

The optimal region here would be to select a region from where your website generates most of the traffic. Also look at this website below which does a latency test of all DigitalOcean's servers.

Digital Ocean Ping Test (Latency) | Cloud Ping Test
Test ping time for different Digital Ocean regions from your web browser

After you have decided which region you want move onto the next step.

VPC Network

Since we are using a single droplet we don't need a VPC network. Either leave it as blank or select the default network.

Choose your authentication method

I recommend SSH keys but for testing purpose you can always go with Password based authentication.

Finalize and create

All other options are pretty self explanatory.

Tap on Create droplet.

Your droplet will be created in a few minutes. SSH into your droplet

ssh [email protected]_your_droplet_ip

Once  logged in, we'll see the installation do its work automatically.

Adding a domain

Now there are two options here - Either use DigitalOcean's own DNS manager or use Cloudflare. I have always used Clouflare since it has tons of extra features on which I will be making a different set of posts.

To add a domain, we need to add an A record in our domain's DNS. This A record will point towards our new IP for our new droplet.

Use your domain name and the Droplet's IP to create an A record. We are pointing it towards our new droplet.

Make sure that when you visit your url, it redirects you to your new Ghost installation. Once that DNS record is working, we can go back to our terminal to continue installation.

Enter some required details asked by the installer and we are done here. The new ghost blog should be accessible via your domain name.


Learn something new everyday.

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.