How to Install Cachet on Linux


Cachet is an open source status page system which allows you to inform your users about outages, planned maintances and much more. In this guide we will be installing Cachet on Linux server already running Apache, PHP, and MySQL.


  • Git
  • Apache2.4+
  • MySQL Server
  • CURL

Install Cachet

First, we have to clone Cachet itself from its Github repository in a directory which we’ll be using for it later. Let’s assume our directory is /opt/cachet/:

cd /opt/git clone cachet/cd cachet/


By default Cachet comes with an .env.example file. We’ll need to rename this file to .env, regardless of the type environment you’re working on. Once renamed, we can edit the file and configure Cache it:



Cachet insists on a database in order to store data. In this guide, we’ll be using a MySQL database. Create a new database using the following command:

mysql -u root -pCREATE DATABASE cachet;

Note: using mysql -u root -p assumes you do not have a /root/.my.cnf with your MySQL server credentials.

We can now create a new MySQL user which is authorized to access our fresh database:



Cache it requires composer to function. Below is how we can install it:

curl -sS | sudo php -- --install-dir=/usr/local/bin --filename=composer

Application Key

Cachet provides a built-in method to generate an application key. Cachet uses this application key for all data which is being encrypted. That said, you would want to backup the key somewhere safe.

php artisan key:generate


Now you’re ready to install Cachet using another simple command:

php artisan app:install 

Note: Never change your application key after this installation; otherwise, Cache will fail to decrypt the data, rendering your installation corrupted.


Cachet itself is a web-based application. Therefore, we’ll be using Apache to serve it, thus allowing access to it via browser.

Note: Cachet requires mod_rewrite to be enabled on your Apache server.

a2enmod rewrite

We can now continue with creating our VirtualHost. For this step, create a new file called cachet.conf in the /etc/apache2/sites-enabled/ folder:

<VirtualHost *:80>    # Domain from where Cachet will be accessed    ServerName     ServerAlias     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 can now start working with Cachet. Simply restart Apache2 using the following command:

service apache2 restart


You should now be able to access your fresh Cachet installation on the domain you set before in the Apache2 config.


Cachet is a pretty well designed open source status page which works on nearly any UNIX and even on Windows based servers. As a result of that Cachet is open source, we can easily implement our own plugins if we’re familiar with PHP. Happy Hacking!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.