Cachet is an open-source status page system. Cachet does NOT natively support automatically updating the status of devices. Others have created add-ons that do this. By default, you must manually update the page. It's also somewhat of a pain in the ass to install.
Hopefully its a little less painful to install if you follow this guide.
OS: Ubuntu 20.04 LTS
Use PHP7.2
1. Add PHP repository
add-apt-repository ppa:ondrej/php
3. Install Apache, PHP, and unzip
apt install apache2 php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-xml php7.2-gd php7.2-zip php7.2-mbstring php7.2-mysql php7.2-pgsql php7.2-sqlite3 php7.2-opcache php-apcu libapache2-mod-php7.2 unzip
1. Modify PHP config file to match the following parameters. (DO restart Apache when making changes to the PHP conf)
vim /etc/php/7.2/apache2/php.ini
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Denver
1. Install mariaDB and start the service
apt install mariadb-server -y
systemctl enable mariadb.service
systemctl start mariadb.service
2. Run the setup - answer as you see fit.
mysql_secure_installation
3. Connect/Login (the remaining commands are issues within MariaDB)
mariadb
4. Create a new DB for Cachet to use
CREATE DATABASE cachet;
5. Create a new DB user for Cachet to use
CREATE USER 'cachetdb'@'localhost' IDENTIFIED BY 'password';
6. Grant privileges for the new user on the new DB
GRANT ALL ON cachet.* TO 'cachetdb'@'localhost';
7. Make sure to flush privileges to apply all changes
FLUSH PRIVILEGES;
1. Download Composer installer and place in /usr/local/bin
so it is part of the environment
PATH
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1. Start Apache
systemctl enable apache2
systemctl start apache2
2. Enable mod_rewrite
, proxy_fcgi setenvif
, conf php7.3-fpm
a2enmod rewrite
a2enmod proxy_fcgi setenvif
a2enconf php7.2-fpm
systemctl restart apache2.service
3. Create a new virtual host file
vim /etc/apache2/sites-available/cachet.conf
4. The virtual host configuration. Modify it to reflect your setup.
<VirtualHost *:80>
ServerName cachet.example.com
ServerAlias cachet.example.com
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>
5. Enable the new site
a2dissite 000-default.conf && a2ensite cachet.conf
systemctl reload apache2.service
1. Create a new user for Cachet
adduser cachet --disabled-password
2. As ‘root’, navigate to /var/www
cd /var/www
3. Clone Cachet from GitHub
git clone https://github.com/cachethq/Cachet.git
4. Change ownership of the new Cachet
directory and it's contents to the new cachet
user
chown cachet:cachet -R Cachet
5. Login as the new cachet
user
su - cachet
6. cd into the new directory “Cachet
”
cd /var/www/Cachet
7. Git checkout the latest version
git checkout 2.4
8. In the Cachet directory, rename .env.example
to .env
mv .env.example .env
9. Update the values in .env
to reflect your setup.
Any values with spaces in them should be contained within double quotes.
vim .env
APP_ENV=production
APP_DEBUG=false
APP_URL=http://localhost
APP_TIMEZONE=UTC
APP_KEY=base64:
DEBUGBAR_ENABLED=false
DB_DRIVER=mysql
DB_HOST=localhost
DB_UNIX_SOCKET=null
DB_DATABASE=cachet
DB_USERNAME=cachetdb
DB_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxx
DB_PORT=null
DB_PREFIX=null
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
CACHET_BEACON=true
CACHET_EMOJI=false
CACHET_AUTO_TWITTER=true
MAIL_DRIVER=log
MAIL_HOST=null
MAIL_PORT=null
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ADDRESS=null
MAIL_NAME=null
MAIL_ENCRYPTION=tls
REDIS_HOST=null
REDIS_DATABASE=null
REDIS_PORT=null
GITHUB_TOKEN=null
NEXMO_KEY=null
NEXMO_SECRET=null
NEXMO_SMS_FROM=Cachet
TRUSTED_PROXIES=
10. Install Cachet dependancies.
If you encounter an error about "does not contain a compatible set of packages”, DO run ‘composer update
’ and inspect the list of problems it displays to fix the issue.
composer install --no-dev -o
If the above command does NOT appear to work, use this: composer install --no-dev -o --no-scripts
11. Generate an application key.
If the permissions on .env
are set correctly, the APP_KEY
field should populate with an Application Key.
Never change the APP_KEY after installation. This will result in all of your encrypted/hashed data being lost.
php artisan key:generate
12. Setup the application.
When prompted to ‘Configure Cachet before installing’, select ‘No’. Then ‘Yes’ when is asks if you're sure.
php artisan cachet:install
13. Change ownership of the Cachet installation to www-data
chown -R www-data:www-data /var/www/Cachet
14. Navigate to the webserver via your browser to finish the setup process. http://[serveraddress]
1. At http://[serveraddress]/setup
, set the following parameters on the ‘Environment Setup’:
Set the Mail settings as you see fit.
2. The remaining Setup Pages are self explanatory, no docs needed for those.
If you receive a '500 - Internal Server Error' when loading the webpage, try these steps:
Changing permissions on the storage
directory worked for me
chmod -R 777 /var/www/Cachet/storage
rm -rf /var/www/Cachet/bootstrap/cache/*
chmod -R 777 /var/www/Cachet/bootstrap