No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iventor1 f17177364a Add logging to LOG_FILE for executed actions
- run_action and sync-port.sh now log with timestamp to LOG_FILE
- Silence echo when config file is missing
2026-05-18 13:18:55 +08:00
gluetun-watchdog.conf.example Externalize config, add logrotate and dry-run 2026-05-18 13:14:46 +08:00
gluetun-watchdog.logrotate Externalize config, add logrotate and dry-run 2026-05-18 13:14:46 +08:00
gluetun-watchdog.service Add Gluetun Watchdog service for VPN connectivity monitoring 2026-05-18 13:08:53 +08:00
gluetun-watchdog.sh Add logging to LOG_FILE for executed actions 2026-05-18 13:18:55 +08:00
gluetun-watchdog.timer Add Gluetun Watchdog service for VPN connectivity monitoring 2026-05-18 13:08:53 +08:00
install.sh Externalize config, add logrotate and dry-run 2026-05-18 13:14:46 +08:00
README.md Externalize config, add logrotate and dry-run 2026-05-18 13:14:46 +08:00

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:

  1. The VXLAN interface fails to initialize correctly on boot.
  2. Gluetun connectivity is lost intermittently.
  3. 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.conf are not overwritten by updates.
  • Log Rotation: Automatically manages /var/log/gluetun-watchdog.log to 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