A Docker setup for Cachet - an open-source status page system built with Laravel.
This repository provides a complete Docker setup for running Cachet with the following components:
- Cachet Application - The main web application
- Queue Worker - Handles background jobs
- Scheduler Worker - Manages scheduled tasks
- MariaDB Database - Database backend
Before you begin, ensure you have the following installed on your system:
- Docker (v20.10 or higher)
- Docker Compose (v2.0 or higher)
- Git (for cloning the repository)
git clone https://github.com/steffjenl/docker-cachet.git
cd docker-cachetCopy the example environment file and customize it:
cp .env.example .envEdit the .env file and update the following required variables:
# Application settings
APP_NAME=YourStatusPage
APP_URL=http://localhost:8080
APP_KEY= # Will be generated automatically# Database settings
DB_PASSWORD=your_secure_password_here
# Mail settings (optional but recommended)
MAIL_MAILER=smtp
MAIL_HOST=your.smtp.host
MAIL_PORT=587
MAIL_USERNAME=your_email@domain.com
MAIL_PASSWORD=your_email_password
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"docker compose up -dThis will start all services in the background:
- Cachet web application on port 8080
- MariaDB database
- Queue worker for background jobs
- Scheduler worker for automated tasks
After the containers are running, generate the Laravel application key and paste into your .env file:
docker compose exec cachet-app php artisan key:generate --showSet up the database tables:
docker compose exec cachet-app php artisan migrate --forceCreate the first user by following the prompts:
docker compose exec -it cachet-app php artisan cachet:make:userOpen your web browser and navigate to:
http://localhost:8080
Follow the setup wizard to complete the installation.
The .env file contains all configuration options. Key variables include:
| Variable | Description | Default |
|---|---|---|
APP_NAME | Your status page name | Cachet |
APP_URL | Base URL for your installation | http://localhost |
APP_DEBUG | Enable debug mode (set to false in production) | false |
DB_PASSWORD | Database password | ExamplePassword!2020! |
MAIL_MAILER | Mail driver (smtp, log, etc.) | log |
By default, the application runs on port 8080. To change this, edit the docker-compose.yml file:
ports:
- "YOUR_PORT:80"To use a custom domain:
- Update
APP_URLin your.envfile - Configure your web server/reverse proxy to forward requests to the Docker container
- Ensure SSL/TLS certificates are properly configured if using HTTPS
- Change default passwords: Update
DB_PASSWORDin your.envfile - Use HTTPS: Configure SSL/TLS certificates
- Secure database: Restrict database access and use strong passwords
- Environment variables: Keep your
.envfile secure and never commit it to version control - Updates: Regularly update the Docker images
server{listen80;server_namestatus.yourdomain.com;location / {proxy_passhttp://localhost:8080;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;}}To update to the latest version:
docker compose pull
docker compose up -ddocker compose exec cachet-mariadb mysqldump -u root -p cachet > backup_$(date +%Y%m%d_%H%M%S).sqldocker compose exec -i cachet-mariadb mysql -u root -p cachet < backup_file.sqlView application logs:
docker compose logs -f cachet-appView all service logs:
docker compose logs -f- Permission errors: Ensure Docker has proper permissions
- Port conflicts: Make sure port 8080 isn't already in use
- Database connection issues: Verify database credentials in
.env
To start fresh:
docker compose down -v
docker compose up -dWarning: This will delete all data including your database.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License. See the Cachet license for details.