A lightweight Bash client for updating deSEC dynamic DNS records. Supports multiple zones with independent configuration and automatic IPv6 address change detection.
Note: This client is IPv6-only. It monitors dynamic IPv6 addresses on specified network interfaces and updates records via
update6.dedyn.io. IPv4 is not supported.
- Multi-zone support — manage multiple domains, each with its own configuration file.
- IP change detection — tracks addresses per zone to avoid unnecessary API calls.
- Safe configuration — config files are parsed without shell evaluation; only expected keys are accepted.
- Systemd integration — includes a service unit for background operation.
- Bash 4.0+
curl
git clone https://github.com/Docmine17/desec.git
cd desec
chmod +x desec.shZone configuration files are stored in the zones/ directory. Each file defines a single zone and must use your subdomain + dedyn.io.conf extension.
Copy the provided sample and edit it:
cp zones/domain.dedyn.io.sample zones/yourdomain.dedyn.io.confEach .conf file specifies the network interface, API token, and an optional IP selection mode on a single line separated by spaces:
INTERFACE TOKEN [IP_TYPE]
Supported IP_TYPE values:
any(default): Uses any valid global IPv6 address available on the interface.stable: Uses only stable SLAAC (00) or static (80) addresses.temporary: Uses only dynamic privacy extension addresses (01).
Example (zones/yourdomain.dedyn.io.conf):
eth0 your_desec_token_here stable
Use ip -6 addr to identify the correct interface.
./desec.sh| Option | Description | Default |
|---|---|---|
--zone |
Path to the directory containing .conf files. |
<script_dir>/zones |
--interval |
Check interval in seconds. | 20 |
-h, --help |
Show usage information. | — |
Examples:
# Custom config directory
./desec.sh --zone /etc/desec/zones/
# Check every 60 seconds
./desec.sh --interval 60
# Both options combined
./desec.sh --zone /etc/desec/zones/ --interval 60-
Edit
desec-dns.serviceand set the correct path inExecStart:ExecStart=/bin/bash /path/to/desec.sh -
Install and enable the service:
sudo cp desec-dns.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now desec-dns.service -
Check status:
systemctl status desec-dns.service
- The script loads all
.conffiles from the configured zones directory. - For each zone, it reads the current dynamic IPv6 address from the specified interface.
- If the address differs from the previously recorded one, it sends an update to the deSEC API.
- The process repeats at the configured interval.
On receiving SIGTERM or SIGINT, the script logs the event and exits cleanly.