Duckdns container fails to connect to duckdns

I’m using Docker/Portainer on Debian 12 and attempting to use a subdomain on duckdns to point back to the server.

The container log indicates that something is not working correctly:

Detecting IPv4 via DuckDNS
curl: (7) Failed to connect to www.duckdns.org port 443 after 9280 ms: Couldn’t connect to server
Something went wrong, please check your settings Fri Jan 19 09:56:24 EST 2024
The response returned was:
Detecting IPv4 via DuckDNS
curl: (7) Failed to connect to www.duckdns.org port 443 after 9259 ms: Couldn’t connect to server
Something went wrong, please check your settings Fri Jan 19 10:01:50 EST 2024
The response returned was:

the .yaml is below:


version: “2.1”
services:
duckdns:
image: linuxserver/duckdns
container_name: duckdns
environment:
- PUID=1001 #optional
- PGID=100 #optional
- TZ=US/Eastern
- SUBDOMAINS=<my subdomain (not including .duckdns.org)>
- TOKEN=
- LOG_FILE=false #optional
restart: unless-stopped
volumes:
- /duckdns/config:/config #optional

What am I missing here?

One of three possibilties:

  1. duckdns had an outage and was not accessible at the time
  2. container has no internet connection
  3. something on your network is blocking access to it (pihole, adguard, etc.)

Thank you for your help!

I have an older duckdns container running on a RasPi on the same network that is working correctly, so I think that rules out 1.

I added “network-host”, and can ping google.com from container’s console, so I think that takes care of 2 and 3. Correct? I’m not running Adguard or pihole, etc…

new stack from Portainer:

version: “2.1”
services:
duckdns:
image: linuxserver/duckdns
network_mode: “host”
container_name: duckdns

environment:
  - PUID=1000 #optional
  - PGID=1000 #optional
  - TZ=US/Eastern
  - SUBDOMAINS=<redacted>
  - TOKEN=<redacted>
  - LOG_FILE=false #optional
restart: unless-stopped
volumes:
  - /duckdns/config:/config #optional

Log from the container remained as above…

why not ping that duckdns address?
you should not need host networking

I could ping google, but for some reason duckdns remains unreachable from within the container and on the host.
Since I can ping duckdns from other machines on my network, I suspect the problem is NOT related to the duckdns or the container.

Thank you for your help!

The default gateway on my server was incorrect.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.