- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- run_action and sync-port.sh now log with timestamp to LOG_FILE - Silence echo when config file is missing |
||
| gluetun-watchdog.conf.example | ||
| gluetun-watchdog.logrotate | ||
| gluetun-watchdog.service | ||
| gluetun-watchdog.sh | ||
| gluetun-watchdog.timer | ||
| install.sh | ||
| README.md | ||
Gluetun Watchdog
A sidecar watchdog service for Gluetun LXC containers to ensure network connectivity, interface stability, and correct port forwarding propagation to qBittorrent.
Overview
This solution addresses common issues in Proxmox LXC environments where:
- The VXLAN interface fails to initialize correctly on boot.
- Gluetun connectivity is lost intermittently.
- qBittorrent loses its port-forwarded port configuration on reboot.
It uses a systemd timer-based approach to independently monitor health and trigger remediation without modifying the core Gluetun service.
Installation
You can install or update the watchdog by running the provided install script from the repository:
sudo ./install.sh
This will automatically copy the files to the correct system directories and enable the timer. It also protects your configuration file at /etc/gluetun-watchdog.conf from being overwritten.
Configuration
The configuration is separated from the script to ensure your settings persist across updates.
On first installation, an example configuration is copied to /etc/gluetun-watchdog.conf. You should edit this file to match your environment:
sudo nano /etc/gluetun-watchdog.conf
Testing (Dry Run)
You can test the watchdog logic without actually taking any destructive actions (like rebooting or restarting services) by running:
sudo /usr/local/bin/gluetun-watchdog.sh --dry-run
Features
- Persistent Configuration: Settings in
/etc/gluetun-watchdog.confare not overwritten by updates. - Log Rotation: Automatically manages
/var/log/gluetun-watchdog.logto prevent disk space issues. - Dry Run Mode: Safe testing of the watchdog logic.
- Boot Loop Protection: Prevents actions during the first 2 minutes of boot.
Monitoring
You can check the status of the timer:
systemctl status gluetun-watchdog.timer
View the logs for remediation actions:
tail -f /var/log/gluetun-watchdog.log