mastercontainer updates deSEC IP directly; ddclient auto-configures from env vars

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/fc6803fd-5743-438d-86b8-068ce48b1411

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-24 19:24:14 +00:00
committed by GitHub
parent f23d8276ff
commit 7c5abc978d
10 changed files with 110 additions and 36 deletions

View File

@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:latest
FROM ghcr.io/linuxserver/ddclient:latest
# Auto-configure ddclient for deSEC when NC_DOMAIN and DESEC_TOKEN are provided.
# The linuxserver base image executes all scripts in /custom-cont-init.d/ before
# the main service starts, which lets us generate ddclient.conf without any manual step.
COPY --chmod=755 ddclient-config-gen.sh /custom-cont-init.d/ddclient-config-gen.sh
LABEL com.centurylinklabs.watchtower.enable="false" \
wud.watch="false" \
org.opencontainers.image.title="DDclient for Nextcloud AIO" \
org.opencontainers.image.description="DDclient with automatic deSEC configuration for Nextcloud All-in-One" \
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
org.opencontainers.image.source="https://github.com/nextcloud/all-in-one" \
org.opencontainers.image.vendor="Nextcloud" \
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/community-containers/ddclient/readme.md"

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Automatically generate /config/ddclient.conf for deSEC dynamic DNS when
# NC_DOMAIN and DESEC_TOKEN are provided and no config file exists yet.
#
# This script is executed by the linuxserver base image from /custom-cont-init.d/
# before ddclient starts, so no manual configuration step is required.
if [[ -n "${NC_DOMAIN}" && -n "${DESEC_TOKEN}" && ! -f /config/ddclient.conf ]]; then
{
printf 'daemon=300\nsyslog=yes\nssl=yes\n\n'
printf 'use=web, web=https://checkipv4.dedyn.io/\n\n'
printf 'protocol=dyndns2\nserver=update.dedyn.io\n'
printf 'login=%s\npassword=%s\n%s\n' \
"${NC_DOMAIN}" "${DESEC_TOKEN}" "${NC_DOMAIN}"
} > /config/ddclient.conf
echo "deSEC ddclient config auto-generated for domain ${NC_DOMAIN}"
fi

View File

@@ -51,6 +51,9 @@ while true; do
# Check if AIO is outdated
sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/OutdatedNotification.php
# Update deSEC DNS IP record (no-op when IP is unchanged or deSEC is not configured)
sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/UpdateDesecIp.php
# Remove sessions older than 24h
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete