Skip to main content

How to set up a Ghost blog on DigitalOcean

Introduction

The price for a Ghost blog on DigitalOcean is $5 per month for basic hosting plus $1 per month for backups. I recommend using backups in case you encounter an error while updating Ghost and don't know how to fix it. If you have a backup, you can revert your blog to the backup and try the update again.

Prerequisites

The following instructions assume that you already have a domain (e.g., example.com) and know how to use it. If you do not have a domain, then I recommend purchasing one at Google Domains, Dynadot.com, or Porkbun.com.

I recommend using Cloudflare for your DNS nameservers. Cloudflare can help prevent DDOS attacks and make your website faster by caching content. Create an account at dash.cloudflare.com, add a domain, and point your nameservers to Cloudflare. Detailed instructions on how to do this are available here.

Setup

  1. Create a DigitalOcean account. (this is my referral link)
  2. Set up an SSH key.
  3. Add your SSH key to your account. Give it an appropriate name.
  4. Visit the Ghost page at the DigitalOcean Marketplace. Read the page details.
  5. Click Create Ghost Droplet.
  6. Click $5/mo under Basic Droplets.
  7. You do not need block storage.
  8. Choose a Data Center near you or your audience.
  9. Click IPv6 and Monitoring.
  10. Choose your SSH key.
  11. Name your droplet (your hostname).
  12. Add tags and select your project as appropriate.
  13. Enable backups.
  14. Click Create Droplet.
  15. Wait for your droplet to be created.
  16. After the droplet is created, scroll down and click "Start using Floating IPs".
  17. Click Search for a Droplet, click your new droplet, and assign a Floating IP.
  18. Copy the IP address of the Floating IP. Visit the website of your DNS provider for your domain and add an A record to point your domain to your new Floating IP. For example, if you are using Cloudflare as your DNS provider, then click DNS, click Add record, choose type A, enter @ as the Name for your root domain (domain.tld), then enter your Floating IP address xxx.xxx.xxx.xxx under IPv4 address. Repeat the process with www as the Name. Learn more about A records here.
  19. SSH into your droplet using your Floating IP.
  20. Follow the prompts to configure your Ghost installation. Press Enter on your keyboard and wait for Ghost to install. When prompted, enter your domain to set up your blog (domain.tld), and enter email to get notifications if the SSL renewals fail.
  21. Visit http://your_floating_ip_address/ghost or http://your_domain/ghost to create your admin account. If you do not do this right away and someone else does it, then you need to restart the process.

At this point, you have set up your Ghost blog.

There are more steps to make your server more secure and further set up your blog.

  1. Make your server more secure by updating your dependencies. Type the following command in your command prompt and press Enter. Choose No Configuration for Postfix. Choose "keep existing" if you are asked whether to keep something that has been changed locally.
    sudo apt-get update && sudo apt-get dist-upgrade -y
  2. Update your Ghost installation.
  3. Set up a www to non-www redirect if desired.

Next Steps

  1. Learn more about how to further configure your blog such as how to set up mail.
  2. Find a theme at Ghost Marketplace or on GitHub.
  3. Have fun writing. 😄

Ghost Pro

If this all sounds too hard, troublesome, or not worth your time, then you can sign up for managed Ghost blog for $15/month ($9/month when paid annually) at Ghost.org.

Resources

Troubleshooting

Please contact me if you have any issues.