The Easy Way To Build Your Self-Hosted Ghost Blog
Want to start writing on a modern blog platform? Learn how to start quickly and for cheap!
Ghost is a modern and intuitive blog platform. Unlike WordPress, it does not support e-commerce and landing page creation. Ghost is focused on blogging and content creation.
The Ghost’s greatest strength is the simplicity it provides for writing. The experience is very similar to that of the Medium blogging platform. The difference is that you own your platform.
Once you have chosen a theme, all you have to do is concentrate on writing your articles. Ghost offers excellent performance and SEO tag optimization. In addition, it integrates perfectly with a lot of third parties.
Concerning hosting, two choices are possible for your ghost platform:
- Managed-hosting: you don’t have any maintenance or upgrades to manage. The platform is hosted on Ghost’s servers. In return, you pay more for your hosting.
- Self-hosting: you deal with hosting and you have to manage updates and maintenance of Ghost but it is cheap.
In this article, I will show you how I built my own self-hosted Ghost blog with DigitalOcean.
Create The Ghost Hosting With DigitalOcean
DigitalOcean is a cloud provider and official hosting partner of the Ghost open-source project. To create the server for Ghost, we will use a DigitalOcean droplet.
“DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.”
In the right sidebar, click on “Manage” and choose “Droplets”:
Then click on “Create” and choose “Droplets”:
Now you have to choose an installation image for the new droplet. DigitalOcean offers a specific image for Ghost. Quite a time-saver, isn’t it? Type “ghost” in the search bar:
Once selected, you can customize the Ghost server:
The droplet image contains the Ghost server and a MySQL database instance. For getting started, I advise you to start with a “Basic” type with 1 vCPU, 2GB of RAM and 25GB of disk storage. I tested with only 1GB of RAM and the consumption quickly reaches 90%.
When your needs will evolve, you can resize the droplet. Note you can increase and decrease the number of vCPUs and RAM but that once the disk storage is increased it cannot be decreased.
For better security, use SSH authentication by key and not by password: many bots on the internet attempt brute force attacks.
For a little extra, you can have backups. I highly recommend this option!
Finish the Droplet creating by clicking on “Create Droplet”.
Take notes of the Droplet public IP when creation is done. We will need it in the next section.
Configure The Ghost Platform
To configure Ghost, we will connect to the droplet from the command line using SSH.
To do this, load the private SSH key corresponding to the public one you used when creating the droplet:
$ eval `ssh-agent`
# Change the path with your own private key if it is different
$ ssh-add $HOME/.ssh/id_rsa
Connect to the droplet using the public IP address:
$ ssh root@your_droplet_public_ip
Once logged on the server, a prompt for the ghost configuration is displayed. You need to fill in your domain name and email for the SSL certificate:
Ghost will prompt you for two details:
1. Your domain
- Add an A Record -> xxx.xxx.xxx.xxx & ensure the DNS has fully propagated
- Or alternatively enter http://xxx.xxx.xxx.xxx
2. Your email address (only used for SSL)
Press enter when you're ready to get started!
Once finished, go to https://your_domain/ghost. On the welcome screen, click “Create your account”:
Enter your email, create a user and password, and enter a blog title:
Invite additional members to your team if you want or click “I’ll do this later, take me to my blog!” at the bottom of the page:
Configure Ghost Settings and Theme
On the left menu, you have the menu with the posts and elements to manage:
You can configure the Ghost settings by clicking on the gear icon at the bottom left:
You can customize the branding and theme :
Ghost offers free themes to start. You need to download the theme and upload it in the interface:
Have a good writing!