Ghost One-Click Application

Ghost is a powerful open-source publishing platform for creating professional blogs, magazines and websites. It consists of a Node.js core API, an Ember.js admin client, and a flexible Handlebars.js front-end theme SDK.

The Ghost One-Click application provides an easy way to get started with Ghost by automatically installing the officially-recommended Ghost stack on a Ubuntu 18.04 Droplet.

An official fully-managed service is also available via Ghost(Pro), which lets you configure and manage everything from a browser.

Components

Droplets created using this One-Click have the following software components:

Component Version
Linux Ubuntu 18.04.1
Ghost Ghost’s automatic setup
Ghost-CLI Ghost’s automatic setup
Nginx Ghost’s automatic setup
MySQL server Ghost’s automatic setup
Node.js Ghost’s automatic setup

Quickstart

You’ll need a registered domain name to finish completing the Ghost setup. We recommend setting up an A record from the domain (e.g., example.com) to the server’s IP address.

After the Ghost One-Click Droplet is created and the domain and DNS records are set up, you’ll need to log into the Ghost Droplet to complete its setup. From a terminal on your local computer, connect to the Droplet as root. Make sure to substitute the IP address of the Droplet.

ssh root@use_your_droplet_ip

As soon as you log in, the Droplet will automatically make sure it’s running the most recent version of Ghost, and will prompt you to press ENTER to finalize the setup.

Ensuring Ghost-CLI is up-to-date…
…

Ghost will prompt you for two details:

Your domain
Add an A Record -> your_droplet_ip & ensure DNS has fully propagated
Or alternatively enter http://your_droplet_ip
Your email address (only used for SSL)
Press enter when you’re ready to get started!

Follow the installation prompts to configure Ghost.

As soon as you’re done, make sure to configure the admin user using the administrative interface at http://use_your_droplet_ip/ghost (making sure to substitute the Droplet’s IP address in the URL). Until you configure the admin user, anyone who discovers the site can configure the administrative user, take control of the Ghost site, and potentially take control of the Droplet.

Once the installation and setup is fully complete, you can access the new Ghost site by visiting the Droplet IP address in your browser.

Maintenance

To upgrade or maintain the Ghost install in future, you’ll always have to become the ghost-mgr user in order to have the correct permissions:

sudo -i -u ghost-mgr

After that, all tasks can be completed with the Ghost-CLI tool. Run ghost help for an overview of available commands, or check out the Ghost-CLI docs for full details.

API Creation

In addition to creating a Droplet from the Ghost One-Click application via the control panel, you can also use the DigitalOcean API.

You can list all One-Click application images using the API. As an example, to create a 4GB Ghost Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

curl -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer '$TOKEN'' -d \
    '{"name":"choose_a_name","region":"sfo2","size":"4gb","image":"ghost-18-04"}' \
    "https://api.digitalocean.com/v2/droplets"

Next Steps

Once Ghost is running and secured, you can learn about ways to customize or extend it. Check out the Ghost documentation for more information.

Contributed by Ghost co-founder and CEO, John O’Nolan.