How to install Cachet status page system on Ubuntu Server 18.04

One of the things the Linux server doesn't have is an elegant way to communicate to users downtime and outages. This can be crucial information to users of your services so that they know when to prepare for servers being down for maintenance (or other reasons).

Fortunately, there is an outstanding tool you can install on your Linux servers that can easily inform those users of pending downtime. That tool is Cachet. Cachet can be installed on almost every Linux distribution, but I will walk you through the process of installing this tool on the Ubuntu Server 18.0 platform.

SEE: Disaster recovery and business continuity plan (Tech Pro Research)

What you need

The only things you need to get Cachet up and running are:

Although I will demonstrate the installation without using SSL, you can optionally configure Cachet to work with your installed certificates.

Installing dependencies

The first thing we must do is install the necessary dependencies. Log into your Ubuntu Server and issue the following command to take care of these first dependencies:

Next, PHP must be installed. To take care of this, issue the following command:

Install the database

We'll use MySQL as our database, which can be installed with the command:

When the installation completes, secure the database server with the command:

Answer no for the VALIDATE PASSWORD plugin and then create a secure password for the MySQL administrator. Answer yes (with a Y) for the remaining questions.

Next, we must create the database. Log into the MySQL prompt with the command:

Create the database, the database user, and give the user the necessary permissions with the following commands:

Where PASSWORD is a strong, unique password.

Install and configure NGINX

Now we need a web server. If your server already includes either Apache or NGINX, you can skip the installation section. To install NGINX, issue the command:

Configure NGINX with the command:

Paste the following into this new file:

Where SERVERNAME is either the name or IP Address of your server. Save and close that file.

If you need to include SSL, you need to add the following lines in the cachet.conf file (below the index line):

Where /path/to/certificates is the full path to your SSL certificates, CERTNAME is the name of your .cer files, and DOMAIN is the domain used for your certificates.

Activate the new configuration with the command:

Reload NGINX with the command:

Install composer

Now we need to install Composer. This is done with the following five commands:

Install Cachet

We finally can install Cachet. First, create a new directory with the command:

Change into that new directory with the command cd /var/www/cachet and download the Cachet source code with the command:

Copy the configuration file with the command:

Open the file for editing with the command nano .env. In this file, you'll want to change the following:

Where PASSWORD is the password you created for the cachet user. If you want to optionally make use of the email system, you'll also need to edit the following section (to reflect your SMTP server settings):

Note: Email settings can also be set during the final set-up phase. Save and close that file.

Install the Cachet dependencies with the following command:

Set up the application and install Cachet with the following commands:

After running the second command above, you'll be prompted to answer two questions. Make sure to answer No to both of these (otherwise the set up will fail). When the installation completes, change the ownership of the cachet directory with the command:

Complete the set up

You can now point your browser to http://SERVER_ADDRESS/setup (where SERVER_ADDRESS is either the domain or IP of the server). You will be greeted with the set up completion wizard (Figure A).

Select Database as the option for the three drivers, and fill out your mail options. Click Next and continue configuring Cachet (such as site name, admin account, etc.). When you finish the set up you'll be prompted to log in with the administrator account and then find yourself on the Cachet dashboard (Figure B).

Congratulations, you're ready to start using the Cachet status page system. Using the system is fairly straightforward. Spend a bit of time poking around the dashboard, and you'll figure it out fairly quickly.

Also see