Ghost is an open-source content management system (CMS) used to publish blogs and other written content. It’s built on a Node.js technology stack and is highly customizable. Like other management systems, Ghost comes with pre-built templates you can use, or extend, as you build your blog.
This tutorial will guide you through spinning up a DigitalOcean Droplet with Ghost pre-installed using the DigitalOcean Ghost 1-Click App. You can create a free DigitalOcean account to use the Marketplace App.
After installing the Ghost 1-Click app, you’ll be ready to start creating posts through Ghost CMS.
The Ghost 1-Click comes pre-installed with the following packages:
Package | Version |
---|---|
Ghost | Latest |
Nginx | 1.18.0 |
MySQL Server | 8.0.29 |
Node.js | 16.x |
As of this writing, these packages are running on an Ubuntu 22.04 server along with the latest version of Ghost 5.33.3.
To get your Ghost 1-Click up and running on your browser, you need a domain name. You can use the DNS quickstart guide to learn how to set one up using DigitalOcean DNS.
The Ghost 1-Click Droplet is available on our Marketplace. To begin, select the Create Ghost Droplet button:
Your DigitalOcean Control Panel will list the Ghost 1-Click Droplet as your selection under the Choose an image section. If it’s not already selected, you can use the keyword searchbox to find it:
If the Ghost image is not already selected, use the search box to search for Ghost.
Once the Ghost image is properly selected, you can accept the defaults or adjust settings according to your use case. We typically recommend the following changes:
To avoid potential latency, it is recommended that you select a datacenter region closest to your user base. In some regions, we have more than one datacenter. There is no difference between these same region datacenters (e.g., SFO3 and SFO2).
Select a plan that works for you. Bear in mind that you can resize your Droplet depending on your needs. For Ghost CMS, we recommend using a Droplet with at least 2 CPU cores and 4GB of RAM.
The SSH Key option is recommended, rather than Password for your Droplet. Using SSH Keys for authentication is more secure.
Adding improved metrics, monitoring, and alerting to your Droplet helps you follow your Droplet resource usage over time. You may also want to consider enabling automated backups. You can return later to enable backup functionality on Droplets you’ve already created.
Give your Droplet an identifying name. sammy-Ghost is used in this example:
After entering a name and making your selections, press on the Create Droplet button. Your Droplet will begin the installation process and may take some time to complete. Once it’s finished, you’ll receive an IP address:
1-Click Marketplace applications come with additional resources you can access by pressing the Get started link. This includes an app overview, further installation settings, and links to relevant tutorials from our Community site. You can also get support by reviewing the official Ghost documentation.
After making all your selections, you’re now ready to access your new Ghost Droplet in the terminal to continue the installation process.
After spinning up your Ghost Droplet, connect to it via SSH. If you haven’t used a terminal program like SSH or PuTTY before, check out How To Connect To Your Droplet with SSH. When you’re ready, open a terminal on your computer and log into your Droplet as root via SSH with this command, substituting the IP address with your Droplet’s IP address:
- ssh root@your_server_ip
When the terminal prompts you to continue connecting, enter yes
. Ghost will begin installation.
After the setup wizard boots, there is a prompt requesting your domain name and email address. Press ENTER
to proceed with the installation:
. . .
Ghost will prompt you for two details:
1. Your domain
- Add an A Record -> your_IP_address & ensure the DNS has fully propagated
- Or alternatively enter http://your_IP_address
1. Your email address (only used for SSL)
Press enter when you're ready to get started!
. . .
You’ll receive the following output during this installation step. Note that it may take a few minutes to complete:
Output. . .
✔ Checking system Node.js version - found v16.17.0
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
☲ Downloading and installing Ghost v5.33.3 > Installing dependencies > [4/5] Linking dependencies...
. . .
Once the installation is complete, enter your domain name:
. . .
✔ Finishing install process
? Enter your blog URL: your_domain_name
Then, enter an email address to set up a LetsEncrypt SSL certificate:
. . .
✔ Configuring Ghost
✔ Setting up instance
+ sudo useradd --system --user-group ghost
+ sudo chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
✔ Setting up "ghost" mysql user
+ sudo mv /tmp/your_domain/your_domain.conf /etc/nginx/sites-available/your_domain.conf
+ sudo ln -sf /etc/nginx/sites-available/your_domainconf /etc/nginx/sites-enabled/your_domain.conf
+ sudo nginx -s reload
✔ Setting up Nginx
? Enter your email (For SSL Certificate) your_email_address
After a few moments, you’ll be greeted with the following output:
. . .
✔ Starting Ghost
Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/config/#mail
------------------------------------------------------------------------------
Ghost was installed successfully! To complete setup of your publication, visit:
https://your_domain/ghost/
------------------------------------------------------------------------------
For any further commands, please switch to the ghost-mgr user to manage Ghost.
sudo -i -u ghost-mgr
------------------------------------------------------------------------------
After obtaining your certificate, navigate to https://your_domain/ghost/ to access your Ghost server. It may take a moment before the landing page of your new instance is generated:
Enter your information into the required fields and press the Create account & start publishing button. You’ll access the Ghost Admin panel:
Now that you have access to the administrative panel, you can create your first post. Press the Write your first post button on the left navigation panel:
You’ll access a blank page to write your post. Enter a post title and the content:
After entering your content, you can test how a user will view the post by pressing Preview in the top right corner:
Exit out of the preview by pressing Editor on the top left corner.
When you’re finished making edits to your post, press Publish. A prompt with a few dropdown menu selections will appear. Leave the options as the default to publish the post immediately:
You’ll be given another prompt to confirm the posting. Press Publish post, right now to proceed:
You now have a Ghost server running, an administrative panel, and a new blog post on your site.
Now that you’ve set up your own Ghost server, you can continue to experiment with it by using the various options to customize your server to your desired appearance and settings. If you want to learn more about getting started with publishing on Ghost, you can review their library of resources. You can also refer to the Ghost developer documentation for a deeper dive into the technology and API capabilities.
To learn more about creating your own template and further customization using Next.js and TailwindCSS, review our How To Build Your Blog on DigitalOcean with Ghost and Next.js tutorial.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!