Maintaining uptime of your core IT services is an important part of internal customer service. Even with heavy investments into infrastructure, there will inevitably be downtime. Communicating that outage, planned or not, is also important to customer service. A status page can provide a consistent location for your users to check. Informed users will find if an issue is already known or if they need to report the problem. This should allow the technical talent to focus on returning the service to operational status rather than answering the question of an ETA a dozen times.
For that reason, I began looking into status page software that would provide the service and templates for reported outages. I setup Cachet, a free and open source software that provides the status page service. While it has some rough edges, it’s certainly usable and would be an improvement over Twitter, emails, or whatever hodge-podge way is chosen to notify users of an outage that day.
The documentation lacked a little in details for somebody that doesn’t do this every day but I was able to stumble through it and am writing them up here.
I setup a 1024MB VPS using Vultr running CentOS 7. Once the server was setup, I updated my domain’s DNS to point to the server and SSH change the root password through SSH.
You need at least PHP >= 5.5, Composer and the following PHP extensions installed to run Cachet:
A database driver for your DB, such as php-mysql, php-pgsql etc
We also advise using Git to download and pull down updates.
So, we need to install Apache, PHP, Composer, Git, MySQL, and PHP extensions on CentOS 7 before we even get to Cachet.
We basically need a simple LAMP stack with some additional specifics. SSH into the server.
Install Apache (you could use nginx if you would prefer)
yum install httpd
Set Apache to start automatically with the server
systemctl start httpd.service systemctl enable httpd.service
Allow http/https traffic through the firewall
firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload
Install MariaDB (MySQL replacement)
yum install mariadb-server mariadb
Set MariaDB to start automatically with the server
systemctl start mariadb systemctl enable mariadb.service
Run a script that helps prompt for a secure MariaDB configuration, including setting the root SQL password
Install PHP and the extensions (and getting the right versions)
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install php56w php-mysql php-mbstring php-apcu php-xml php-pdo php-intl tokenizer OpenSSL yum install yum-plugin-replace yum replace --enablerepo=webtatic-testing php-common --replace-with=php56w-common
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer
yum install git
Login to MariaDB
mysql -u root -p Provide root MySQL password when prompted
Create the database
CREATE DATABASE cachet;
Create the database user
CREATE USER 'statusdbuser'@'localhost' IDENTIFIED BY 'p@$$w0rd!';
Give the database user permissions to the database
GRANT ALL ON cachet.* TO 'statusdbuser'@'localhost' IDENTIFIED BY 'password';
Enable the new permissions
FLUSH PRIVILEGES; exit
Download Cachet to your server
cd /var/www git clone https://github.com/cachethq/Cachet.git cd Cachet git tag -l git checkout v1.2.1
(Replace v1.2.1 in the last line with whatever the latest version is from the Cachet releases on GitHub)
Configure Cachet – Uncomment the relevant lines and configure the database and other settings like email
cp .env.example .env nano .env
composer install --no-dev -o
Migrate the databases and generate a security key
php artisan migrate php artisan key:generate
Add the Virtual Host
Add the following to the configuration file you just opened:
<VirtualHost *:80> ServerName compstatus.com # Or whatever you want to use ServerAlias compstatus.com # Make this the same as ServerName DocumentRoot "/var/www/Cachet/public" <Directory "/var/www/Cachet/public"> Require all granted # Used by Apache 2.4 Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
We should be all done and be able to visit our site in a browser and run through the first-run configuration but I found myself receiving a blank page when visiting the site, so some permissions had to be adjusted.
chmod -R gu+w storage chmod -R guo+w storage
You should now be able to visit the site and complete the simple first-run configuration. Follow the prompts to configure the site basics and create your first admin user. After that, you can login to the site dashboard at yoururl.com/dashboard and finish the site setup so that it works for your organization. You can add users, service components, customize colors and CSS, and enter incidents and scheduled maintenance for those service components.
You can see how your site could look from the screenshot below or by visiting the Cachet demo page.