Tutorial

How to Install Ghost CMS with DigitalOcean Marketplace 1-Click

Published on May 31, 2024
    How to Install Ghost CMS with DigitalOcean Marketplace 1-Click

    Introduction

    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.

    1-Click Deployment

    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.

    Prerequisites

    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.

    Step 1 — Creating a Ghost Droplet

    The Ghost 1-Click Droplet is available on our Marketplace. To begin, select the Create Ghost Droplet button:

    Ghost 1-Click landing page with a button to create a Droplet.
    Ghost 1-Click landing page with a button to create a Droplet.

    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:

    Your DigitalOcean control panel with the Ghost image selected.
    Your DigitalOcean control panel with the Ghost image selected.

    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:

    Choosing a Datacenter

    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).

    Choosing a Plan

    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.

    Choosing an Authentication Method

    The SSH Key option is recommended, rather than Password for your Droplet. Using SSH Keys for authentication is more secure.

    Selecting Additional Options

    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.

    Choosing a Hostname

    Give your Droplet an identifying name. sammy-Ghost is used in this example:

    Entering the name 'sammy-Ghost' as the Droplet name as an 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:

    On your control panel dashboard, after your Droplet is created, 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.

    "Get Started" button highlighted inside the control panel. Clicking this will open up a menu with additional information about your Ghost installation and how to further configure it.

    After making all your selections, you’re now ready to access your new Ghost Droplet in the terminal to continue the installation process.

    Step 2 — Accessing the Droplet via SSH to Enable Configuration

    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:

    1. ssh root@your_server_ip

    When the terminal prompts you to continue connecting, enter yes. Ghost will begin installation.

    Step 3 — Completing the Ghost Installation on Your Droplet

    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:

    The Ghost landing and sign up page
    The Ghost landing and sign up page

    Enter your information into the required fields and press the Create account & start publishing button. You’ll access the Ghost Admin panel:

    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:

    Press the “Write your first post” button to get started with posting.

    You’ll access a blank page to write your post. Enter a post title and the content:

    Enter a blog title and content.

    After entering your content, you can test how a user will view the post by pressing Preview in the top right corner:

    A preview of your post.

    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:

    Prompt to confirm publishing your post.

    You’ll be given another prompt to confirm the posting. Press Publish post, right now to proceed:

    Confirm publishing your content.

    You now have a Ghost server running, an administrative panel, and a new blog post on your site.

    Conclusion

    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.

    Learn more about our products


    About the authors
    Default avatar
    Kong Yang

    author

    Still looking for an answer?

    Ask a questionSearch for more help

    Was this helpful?
     
    Leave a comment
    

    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!

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Join the Tech Talk
    Success! Thank you! Please check your email for further details.

    Please complete your information!

    Featured on Community

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel