Friendly Ghost
Command Line
Blogging usually implies WordPress, but Ghost presents a serious challenge.
According to an analysis by W3Techs [1], neither Google nor Amazon control the Internet – the WordPress content management system (CMS) does. They say the open source CMS now drives 30 percent of all websites, which translates to a market share of just over 60 percent. Thus, you are unlikely to go a day without stumbling across a WordPress page while browsing.
Even though most web developers are looking for one of the usual candidates from the CMS trio of WordPress, Joomla, and Drupal, you should take a look at the CMS inhabiting the bottom of the W3Techs list. The still quite new Ghost [2] has only secured a small share of the market, but its modern approach and its active community make the CMS interesting for open source-minded bloggers.
Ghostly
In contrast to WordPress, the Ghost CMS does not rely on PHP, but on JavaScript and Node.js, which makes it a bit difficult to get started. However, the modern web platform plays to its strengths. The idea for Ghost came from Hannah Wolfe and John O'Nolan, who gained great experience in CMS as the former deputy head of design of the WordPress team. O'Nolan no longer sees WordPress as the simple tool for bloggers that it once was, but as a platform for all kinds of web projects [3]. With a handful of plugins, you can set up virtually any project on the web, from a bug tracker to a web shop to an online community.
Its great flexibility is also the biggest weakness of WordPress: The CMS has lost its focus on the original target group, bloggers, which are exactly who Ghost is now targeting. The project was given a significant boost by a successful Kickstarter campaign. In just under a month, around £200,000 came together, which was far more than the £25,000 funding target [4].
The Ghost Foundation emerged from the accumulated capital and developed and managed the code under the MIT license as a non-profit organization. The foundation currently employs eight people, and the steadily growing community contributes time and code to the project. As with WordPress, the Ghost CMS is available for self-hosting, or Ghost(Pro) [5] is offered as a hosted version for a fee starting at $19 a month.
Drafted
Ghost recommends Ubuntu 16.04 with 1GB of RAM, MySQL as the database back end, and Nginx as the web server. As a JavaScript application based on Node. js [6], Ghost provides its own web server. Node.js listens for requests on port 1024 or greater so that the service does not have to run with root privileges, and Nginx accepts requests on ports 80 and 443 (for SSL) as a reverse proxy before passing them on to Ghost. In a test on Ubuntu Server 17.10, Ghost proved in our lab that it can handle a state-of-the-art software stack.
As a prerequisite, we assume that the server can be reached over an Internet domain. In the case of a home server connected to the Internet via DSL or cable, you must ensure that the URL is accessible via DynDNS and forward ports 80 and 443 from the router to the server. Refer to the Installation Guide [7] to update the server and install Nginx and MySQL. The system requests a root password for the SQL server (which you must remember); then, you need to activate the web server in the firewall (Listing 1).
Listing 1
Activating Web Server
$ sudo apt update $ sudo apt full-upgrade $ sudo apt install nginx mysql-server $ sudo ufw allow 'Nginx Full'
Nodes
Ghost developers recommend using the 6.x LTS branch of Node.js. Ubuntu 16.04 and newer is the easiest way to load it via nodesource.com. The installation script inserts a package source into the system, from which it then installs the application. With the node package manager (npm
), you can install the ghost-cli
setup wizard:
$ wget https://deb.nodesource.com/setup_6.x $ chmod +x setup_6.x $ sudo ./setup_6.x $ sudo apt install nodejs $ sudo npm i -g ghost-cli
At first glance, this procedure might seem complicated, but it saves much time and effort in the long run.
At this point, you have created the necessary prerequisites to put the blog system on the server:
$ sudo mkdir -p /var/www/ghost $ sudo chown <User>:<Group> /var/www/ghost $ cd /var/www/ghost $ LANG=C ghost install
The first line creates the /var/www/ghost/
working directory; the second line assigns the user rights to the folder. Next, you switch to the newly created directory, which must be empty, and run the installation wizard. The LANG=C
changes the language settings to the default locale; otherwise, the script runs into an error and terminates.
The installation routine first wants to know the blog URL, the address of the MySQL server, the root login, and the previously assigned MySQL password, as well as a name for the database. You can enter the URL to access the blog later. If the blog and database are on the same computer, the address for the MySQL server is localhost. The database does not have to exist: The setup creates it, if necessary.
The Ghost command-line interface (CLI) handles most of the maintenance work and the installation. You can install the current version with ghost update
. Alternatively, take a look at what's going on behind the scenes with ghost log
. For information on all options of the Ghost client for the command line, enter ghost help
.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.