Hello.
I can’t figure out what’s wrong with my setup of DuckDNS. Everything works correctly, I can log in to HA by https://mydomain.duckdns.org from outside, but from time to time I see following warning in logs:
Updating DuckDNS domain failed: mydomain.duckdns.org
1:15 AM components/duckdns/__init__.py (WARNING) - message first occured at 12:40 AM and shows up 7 times
My configuration.yaml:
duckdns:
domain: !secret duckdns_domain
access_token: !secret duckdns_token
http:
server_host: !secret server_host
base_url: !secret url_http
use_x_forwarded_for: true
trusted_proxies: !secret trusted_proxies
secrets.yaml
server_host: 127.0.0.1
url_http: mydomain
trusted_proxies: 127.0.0.1
duckdns_domain: mydomain.duckdns.org
duckdns_token: 3e[censored]6-03g8-4e9a-b6da-7[censored]e9x
I have forwarded ports 80 and 443 on my router to RPI with HA (port 80 to port 80, port 443 to port 443).
I’m using HAProxy and below is my config:
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
# An alternative list with additional directives can be obtained from
# https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
maxconn 2048
tune.ssl.default-dh-param 2048
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend www-http
bind *:80
acl acme-challenge path_beg /.well-known/acme-challenge/
redirect scheme https unless acme-challenge
use_backend certbot if acme-challenge
frontend www-https
log /dev/log local0 debug
bind *:443 ssl crt /etc/letsencrypt/live/mydomain.duckdns.org/haproxy_use.pem
acl hass-acl hdr(host) -i mydomain.duckdns.org #useless from old setup
use_backend hass_backend if { hdr(Host) -i mydomain.duckdns.org mydomain2.duckdns.org https://mydomain.duckdns.org }
default_backend reject
backend hass_backend
server hass 127.0.0.1:8123
mode http
option forwardfor
http-request add-header X-Forwarded-Proto https
http-request add-header X-Forwarded-Port 443
backend reject
tcp-request content reject
backend certbot
server certbot 127.0.0.1:54321
No idea why warning that DuckDNS domain updating failed appear.