developer / Developer Overview
No results for ""
Developer Overview
Overview
Demyx provides two extension points for developers who want to customize its behavior without modifying core files:
- Custom Callbacks — hooks called by the healthcheck and monitor system to send alerts to external services (Matrix, Slack, Telegram, etc.)
- Custom Cron — scripts that run inside each cron interval (minute, five-minute, hourly, six-hour, daily, weekly)
Both extension points use shell scripts placed in the /demyx/custom/ directory inside the Demyx container.
File Structure
/demyx/custom/
├── callback.sh # Custom healthcheck/monitor callback
└── cron/
├── minute.sh
├── five-minute.sh
├── hourly.sh
├── six-hour.sh
├── daily.sh
└── weekly.shGetting Started
The demyx-repo includes example files in the custom/ directory:
custom/example-callback.sh— Matrix webhook examplecustom/example-cron/— example scripts for each cron interval
Copy and rename these to activate them:
# Enter the Demyx container
demyx exec code
# Or via docker exec
docker exec -it --user=root demyx bash
# Copy examples
cp /path/to/example-callback.sh /demyx/custom/callback.sh
cp /path/to/example-cron/* /demyx/custom/cron/Important Notes
- Custom files are not overwritten by Demyx updates
- Scripts must be executable:
chmod +x /demyx/custom/callback.sh - Errors in custom scripts will not crash Demyx but may appear in cron logs
- View cron output:
demyx log cron