Let's Encrypt auto-renewal skipped: AAAA record set by FRITZ!Box DynDNS update URL, server has no IPv6

I have searched the forum for similar issues

on

This category is for general issues(=something is broken) regarding YunoHost, NOT apps.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What type of hardware are you using

Raspberry Pi 3, 4+

What YunoHost version are you running

12.1.41.2

How are you able to access your server

SSH

Are you in a special context or did you perform specific tweaking on your YunoHost instance ?

Dynamic IP, DynDNS configured in a FRITZ!Box (DNS provider: Strato), domain behind the router

Describe your issue

I’m posting this as a write-up of a solved problem in case it helps someone with the same setup. It has been an issue for me since I have been self hosting (more than 3 years already :)) and couldnt finde time to solve it. Thanks to AI this didnt take long to figure out. Feel free to comment on this.

The Let’s Encrypt certificate of my domains expired and the webadmin showed “valid for -21 days” with the banner “This domain doesn’t seem ready for a Let’s Encrypt certificate”. Certificates could only be renewed manually (with “Ignore diagnosis checks”), the daily cron job never renewed them.

My server has no working IPv6 (curl -6 https://ip6.yunohost.org fails, ip -6 addr show scope global is empty), but the DNS had AAAA records. They came from the FRITZ!Box: the DynDNS update URL ended in myip=<ipaddr>,<ip6addr>, so the router’s own IPv6 was sent to the DNS provider. The AAAA therefore pointed to the router, not to the server.

Fix:

  1. Check what the provider really serves (not your local resolver, which may answer ::1 for your own domains): dig +short AAAA yourdomain.tld @<authoritative nameserver> (nameservers from dig +short NS yourdomain.tld).
  2. In the FRITZ!Box DynDNS settings, remove ,<ip6addr> from the update URL so it ends with myip=<ipaddr>.
  3. Remove the old AAAA record at the DNS provider. In my case the old value stayed in place after changing the URL. What worked for me at Strato was disabling and re-enabling DynDNS for the domain, setting a new DynDNS password and entering it in the router. This is just what worked for me, not an official Strato procedure. The records are briefly reset to provider defaults (I got HTTP 404 until the router had sent its IPv4 again; I triggered the update manually with curl -u domain:password "https://dyndns.strato.com/nic/update?hostname=yourdomain.tld&myip=<IPv4>", answer nochg <IPv4>).
  4. yunohost diagnosis run dnsrecords web --force, then yunohost domain cert renew --force.

After that renewal worked without ignoring the diagnosis. I would not use the “Ignore diagnosis checks” switch as a permanent workaround, it only hides the cause.

Share relevant logs or error messages

The renewal skips a domain if the “DNS records” and “Web” diagnosis checks fail. yunohost diagnosis show dnsrecords --issues --human-readable showed, for every subdomain:

Type: AAAA
Name: @
Current value: <an IPv6 address>
Expected value: None

Nice write-up, this one bites a lot of people with dual-stack routers.

Two small additions that may help others with the same setup:

  • If you later want working IPv6 instead of dropping the AAAA record, newer FRITZ!OS versions let you publish the server’s address rather than the router’s: give the server a fixed interface ID and use the <ip6lanprefix> placeholder in the update URL (provider-dependent), plus an IPv6 port opening for 80/443 to that host in the FRITZ!Box. Otherwise the AAAA will always point at the router.
  • Worth knowing why it breaks only renewal: when an AAAA record exists, Let’s Encrypt validation prefers IPv6, and the YunoHost diagnosis also checks it, so a stale or wrong AAAA fails the checks even though everything works fine over IPv4 in a browser. A quick external test is curl -6 -I http://yourdomain.tld/.well-known/acme-challenge/test from a host with IPv6. If it doesn’t reach your server’s nginx, the cert job will keep skipping the domain.