Docker image & resource cleanup helper, on a schedule!
A sleek, lightweight web interface to automatically clean up Docker resources on a schedule. Built with Python (Flask) Β· Docker SDK Β· APScheduler Β· Gunicorn
Keep your Docker host tidy with scheduled cleanup of unused images, containers, networks, and volumes.
- π Flexible scheduling - Daily, Weekly, or Monthly cleanup runs
- π Timezone aware - Configure your local timezone
- π 12/24-hour time format - Choose your preferred time display
- π§Ή Selective cleanup - Choose what to prune: containers, images, networks, volumes
- π Smart notifications - Gotify or ntfy.sh support with optional change-only alerts
- π¨ Modern UI - Dark theme with smooth animations and responsive design
- π Safe & controlled - Manual trigger option and detailed logging
- π Detailed reports - See exactly what was cleaned and how much space was reclaimed
The overall look and feel of the PruneMate dashboard
Configure when and how often PruneMate should clean up your Docker resources.
Select which Docker resources to clean up and configure advanced options.
Set up notifications via Gotify or ntfy.sh to stay informed about cleanup results.
Get detailed statistics notifications about what was cleaned and how much space was reclaimed.
Gotify :
ntfy :
docker-compose.yaml:
services:
prunemate:
image: anoniemerd/prunemate:latest
ports:
- "7676:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./logs:/var/log
- ./config:/config
environment:
- PRUNEMATE_TZ=Europe/Amsterdam # Change this to your desired timezone
- PRUNEMATE_TIME_24H=true #false for 12-Hour format (AM/PM)
restart: unless-stoppedVolume explanations:
/var/run/docker.sock- Required for Docker API access./logs- Stores application logs (rotating, 5MB max per file)./config- Stores configuration and state files
| Variable | Default | Description |
|---|---|---|
PRUNEMATE_TZ |
UTC |
Timezone for scheduling (e.g., Europe/Amsterdam, America/New_York) |
PRUNEMATE_TIME_24H |
true |
Time format: true for 24-hour, false for 12-hour (AM/PM) |
PRUNEMATE_CONFIG |
/config/config.json |
Path to configuration file |
Access the web interface at http://localhost:7676/ (or your server IP) to configure:
Schedule Settings:
- Frequency: Daily, Weekly, or Monthly
- Time: When to run the cleanup (supports both 12h and 24h format)
- Day: Day of week (for weekly) or day of month (for monthly)
Cleanup Options:
- βοΈ All unused containers
- βοΈ All unused images
- βοΈ All unused networks
- βοΈ All unused volumes
Notification Settings:
- Provider: Gotify or ntfy.sh
- URL: Your notification server URL
- Token/Topic: Authentication token (Gotify) or topic name (ntfy)
- Only notify on changes: Only send notifications when something was actually cleaned
- Scheduler runs every minute checking if it's time to execute
- Loads latest config from persistent storage
- Executes Docker prune commands for selected resource types
- Collects statistics on what was removed and space reclaimed
- Sends notification (if configured and enabled)
- Logs everything with timezone-aware timestamps
/config/
βββ config.json # Your configuration (persistent)
βββ prunemate.lock # Prevents concurrent runs
βββ last_run_key # Tracks last successful run
/var/log/
βββ prunemate.log # Application logs (rotating, 5MB max)
Gotify is a self-hosted notification service.
Setup steps:
- Install and run Gotify server
- Create a new application in Gotify
- Copy the application token
- Configure in PruneMate:
- Provider: Gotify
- URL:
https://your-gotify-server.com - Token: Your application token
ntfy.sh is a simple pub-sub notification service (self-hosted or public).
Setup steps:
- Choose a unique topic name (e.g.,
prunemate-alerts) - Configure in PruneMate:
- Provider: ntfy
- URL:
https://ntfy.sh(your self-hosted instance) - Topic: Your chosen topic name
Subscribe to notifications:
- Web: Visit
https://ntfy.sh/your-topic - Mobile: Install the ntfy app (Android / iOS) and subscribe to your topic
- Desktop: Use ntfy desktop app or web browser
| Problem | Solution |
|---|---|
| β Can't access web interface | β’ Check if port 7676 is available and not blocked by firewall β’ Verify container is running: docker psβ’ Check logs: docker logs prunemate |
| βοΈ Container not starting | β’ View startup errors: docker logs prunemateβ’ Verify Docker socket is accessible β’ Check if port 7676 is already in use |
| π Permission denied errors | β’ Ensure /var/run/docker.sock exists and is accessibleβ’ On Linux, Docker daemon must be running β’ User running Docker must have proper permissions |
| π Wrong timezone in logs/schedule | β’ Set PRUNEMATE_TZ environment variable correctlyβ’ Restart container after changing: docker-compose restartβ’ Verify timezone in logs matches expected |
| π§ Notifications not working | β’ Test notification settings in web interface β’ Verify notification server URL is accessible β’ Check token/topic is correct β’ Review logs for error messages |
| ποΈ Configuration not persisting | β’ Ensure ./config volume is mounted correctlyβ’ Check file permissions on host ./config directoryβ’ Verify container has write access |
| π§Ή Cleanup not running on schedule | β’ Check schedule configuration in web interface β’ Verify timezone is set correctly β’ Review logs: "Next scheduled run" messages β’ Ensure container is running continuously |
What the logs contain:
- β Scheduler heartbeats (every minute)
- π Configuration changes
- π§Ή Prune job executions with results
- π¨ Notification delivery status
- β Error messages and warnings
- β¨ Added 12/24-hour time format support via
PRUNEMATE_TIME_24Henvironment variable - π Improved timezone handling across all components (logs, scheduling, notifications)
- π¨ Enhanced UI with custom time picker for 12-hour mode (hour 1-12, minutes, AM/PM selector)
- π Fixed config synchronization issues in multi-worker setup
- β‘ Simplified architecture: reduced from 2 workers to 1 for better reliability
- π Implemented silent config loading to reduce log noise
- π§ Improved input validation with instant clamping and 2-digit limits
- π Added thread-safe configuration saving with file locking
- π Fixed scheduler not triggering at configured times
- π Config now reloads before each scheduled check to ensure synchronization
- π Added thread-safe config saving mechanism
- π Improved logging with timezone-aware timestamps
- π Added notification support (Gotify & ntfy.sh)
- π¨ Complete UI redesign with modern dark theme
- π Enhanced statistics and detailed cleanup reporting
- π― Added "only notify on changes" option
- π Improved button animations and hover effects
- π Initial release
- π Daily, Weekly, and Monthly scheduling
- π§Ή Selective cleanup options (containers, images, networks, volumes)
- π Web interface for configuration
- π Persistent configuration and logging
Have questions or need help?
- π Bug reports: Open an issue on GitHub
- π‘ Feature requests: Open an issue on GitHub
- π¬ Questions & Discussion: Start a discussion on GitHub
- β Like PruneMate? Give it a star!
Author: Anoniemerd
π GitHub: https://github.com/anoniemerd
π¦ Repository: https://github.com/anoniemerd/PruneMate
License: MIT License
Β© 2025 β PruneMate Project
Keep your Docker host clean with PruneMate! π³π§Ή







