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
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.