This guide uses Docker Compose to run Healthchecks for cron job monitoring.
For Docker installation, see Docker.
mkdir -p /opt/healthchecks/{data,postgres}
cd /opt/healthchecks
Create docker-compose.yml:
services:
postgres:
image: postgres:16-alpine
container_name: healthchecks-db
environment:
- POSTGRES_DB=healthchecks
- POSTGRES_USER=healthchecks
- POSTGRES_PASSWORD=secure_password
volumes:
- ./postgres:/var/lib/postgresql/data
restart: unless-stopped
networks:
- healthchecks
healthchecks:
image: linuxserver/healthchecks:4.0
container_name: healthchecks
depends_on:
- postgres
ports:
- "8000:8000"
volumes:
- ./data:/config
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- DB_BACKEND=postgres
- DB_NAME=healthchecks
- DB_USER=healthchecks
- DB_PASS=secure_password
- DB_HOST=postgres
- DB_PORT=5432
- SITE_ROOT=https://your-domain.com
- SITE_NAME=Healthchecks
- DEFAULT_FROM_EMAIL=noreply@your-domain.com
- EMAIL_HOST=smtp.example.com
- EMAIL_PORT=587
- EMAIL_HOST_USER=smtp_user
- EMAIL_HOST_PASSWORD=smtp_password
- EMAIL_USE_TLS=true
restart: unless-stopped
networks:
- healthchecks
networks:
healthchecks:
driver: bridge
docker compose up -d
Check container status:
docker compose ps
View logs:
docker compose logs -f healthchecks
Access web UI at http://SERVER_IP:8000
Create your first account and project.
docker compose exec healthchecks python manage.py createsuperuser
docker compose exec healthchecks python manage.py migrate
docker compose restart healthchecks
docker compose down
docker compose pull
docker compose up -d
./postgres and ./data directoriesMonitor a cron job:
https://hc.example.com/ping/uuid-here)# Backup script with healthchecks monitoring
0 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 https://hc.example.com/ping/uuid-here
Running containers in production? We help with:
Need help? office@linux-server-admin.com or Contact Us