This guide provides installation methods for Cachet on Linux servers. Choose the deployment method that best fits your infrastructure.
| Version | Recommendation | Use Case |
|---|---|---|
| v2.4.1 (Stable) | ✅ Production | Recommended for all production deployments |
| v3.x (Development) | 🧪 Testing | Evaluation and testing environments only |
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 1 core | 2+ cores |
| RAM | 512 MB | 2+ GB |
| Storage | 5 GB | 10+ GB SSD |
| Network | 100 Mbps | 1 Gbps |
| Database | Version | Notes |
|---|---|---|
| SQLite | 3.x | Development/testing only |
| MySQL | 8.0+ | Production ready |
| MariaDB | 10.6+ | Production ready |
| PostgreSQL | 14+ | Production ready |
The fastest and most isolated deployment method. Ideal for production environments.
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install -y docker.io docker-compose-plugin
# RHEL/AlmaLinux/Rocky
sudo dnf install -y docker docker-compose-plugin
# Enable and start Docker
sudo systemctl enable --now docker
sudo mkdir -p /opt/cachet
cd /opt/cachet
Create docker-compose.yml:
services:
cachet:
image: cachethq/docker:2.4.1
container_name: cachet
restart: unless-stopped
ports:
- "8080:8000"
environment:
- APP_ENV=production
- APP_DEBUG=false
- APP_KEY=base64:YourGeneratedAppKeyHere==
- APP_URL=https://cachet.example.com
- DB_DRIVER=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=cachet
- DB_USERNAME=cachet
- DB_PASSWORD=YourSecureDatabasePassword
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- SESSION_DRIVER=redis
- QUEUE_DRIVER=redis
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- cachet_data:/var/www/html
networks:
- cachet_network
db:
image: mariadb:10.11
container_name: cachet-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=YourSecureRootPassword
- MYSQL_DATABASE=cachet
- MYSQL_USER=cachet
- MYSQL_PASSWORD=YourSecureDatabasePassword
volumes:
- cachet_db:/var/lib/mysql
networks:
- cachet_network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: cachet-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- cachet_redis:/data
networks:
- cachet_network
volumes:
cachet_data:
cachet_db:
cachet_redis:
networks:
cachet_network:
driver: bridge
# Generate a random app key
docker run --rm cachethq/docker:2.4.1 php artisan key:generate --show
Copy the generated key and update APP_KEY in your docker-compose.yml.
docker compose up -d
# Check container status
docker compose ps
# View logs
docker compose logs -f cachet
Access Cachet at http://your-server-ip:8080 or your configured domain.
Automated deployment for multiple servers or infrastructure-as-code workflows.
# Clone or create your playbook
ansible-playbook -i inventory.ini cachet_deploy.yml -b
See Cachet Ansible Setup for the complete playbook.
Traditional installation for environments without Docker.
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install -y nginx php8.2-fpm php8.2-mysql php8.2-sqlite3 \
php8.2-gd php8.2-xml php8.2-mbstring php8.2-curl php8.2-zip \
php8.2-redis php8.2-intl mariadb-server git unzip
# RHEL/AlmaLinux
sudo dnf install -y nginx php php-mysqlnd php-gd php-xml php-mbstring \
php-curl php-zip php-redis php-intl mariadb-server git unzip
sudo mkdir -p /var/www/cachet
cd /var/www/cachet
sudo git clone https://github.com/cachethq/cachet.git .
sudo git checkout 2.4.1
# Install Composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# Install PHP dependencies
sudo composer install --no-dev --optimize-autoloader
# Create database
sudo mysql -e "CREATE DATABASE cachet CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
sudo mysql -e "CREATE USER 'cachet'@'localhost' IDENTIFIED BY 'YourSecurePassword';"
sudo mysql -e "GRANT ALL PRIVILEGES ON cachet.* TO 'cachet'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
# Copy environment file
sudo cp .env.example .env
# Edit configuration
sudo nano .env
Key settings:
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:YourGeneratedAppKey==
APP_URL=https://cachet.example.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=cachet
DB_USERNAME=cachet
DB_PASSWORD=YourSecurePassword
sudo php artisan key:generate
sudo php artisan migrate --force
sudo php artisan config:cache
sudo php artisan route:cache
sudo php artisan view:cache
See Cachet Configuration for Nginx/Apache configuration examples.
sudo chown -R www-data:www-data /var/www/cachet
sudo chmod -R 755 /var/www/cachet
sudo chmod -R 775 /var/www/cachet/storage
Access the setup wizard at http://your-server-ip:8080/setup and configure:
# Using Let's Encrypt with Certbot
sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d cachet.example.com
# Database backup script
#!/bin/bash
mysqldump -u cachet -p'YourSecurePassword' cachet | gzip > /backup/cachet-$(date +%Y%m%d).sql.gz
docker compose psdocker compose logs cachetContainer won’t start:
docker compose logs cachet
docker compose logs db
Database connection errors:
.env or docker-compose.ymlPermission denied errors:
sudo chown -R www-data:www-data /var/www/cachet/storage
sudo chmod -R 775 /var/www/cachet/storage
500 Internal Server Error:
sudo php artisan config:clear
sudo php artisan cache:clear
sudo php artisan view:clear
Any questions?
Feel free to contact us. Find all contact information on our contact page.