Well that’s the way you’ve set it up.
The certificate is set for the duckdns address, which is set up to resolve on the duckdns server, which will then point back at your external ip address of your modem.
Because your Internet was down this couldn’t be resolved.
Change the set up so it can deal with both internal and external requests.