Remote Access using a FritzBox & the AVM myFritz DDNS Service

No I have not. Would like to move to VPN, but then too have to solve the Let’s Encrypt issue.

I was using duckdns to access my HA instance remotly, but im experiencing a lot of unavailablity there. So i want to move away from duckdns.

So im trying to use to fritz options for this now.

I have all the settings working, but somehow im getting ssl errors.

In Let’s Encrypt the certificate seems to be created ok:
Requesting a certificate for .myfritz.net
Successfully received certificate.
Certificate is saved at: /data/letsencrypt/live/.myfritz.net/fullchain.pem
Key is saved at: /data/letsencrypt/live/.myfritz.net/privkey.pem
This certificate expires on 2026-04-17.
These files will be updated when the certificate renews.

in HA i also see myfritzprivkey.pem and myfritzfullchain.pem in the ssl folder.
Strange the naming is different?

When I browse to .myfritz.net on my internal network it gives me an DNS_PROBE_FINISHED_NXDOMAIN error.

When I browse to https://.myfritz.net from an external device i get an ERR_SSL_PROTOCOL_ERROR.

What can be the reson for that?

ps I see in the frtizbox i also activated a letsencrypt certificate via the internet>myfritz settings, and enabled acces via https.
Can this be a rootcause (disabling the certificate doenst seem to resolve the issue)

I stopped ducksdns from running on HA

Something seems to be wrong here. HA uses the certs stored in the ssl folder but your Let’s Encrypt stores them somewhere else. Are you using this add-on?

Sorry @starob for the late reply … better late than never :raised_hands:

alias: Renew SSL Certificate
description: >-
  Open FRITZ!Box port forward during Let's Encrypt renewal, then close it and
  restart services as configured.
triggers:
  - at: "04:00:00"
    trigger: time
conditions:
  - condition: template
    value_template: |
      {% set s = states(cert_sensor).state %} {% if s != None and s != '' %}
        {{ ((as_timestamp(s) - as_timestamp(now())) / 86400) | int < renew_days_threshold }}
      {% else %}
        false
      {% endif %}
actions:
  - target:
      entity_id: "{{ fritz_switch }}"
    action: homeassistant.turn_on
  - delay: "00:00:05"
  - data:
      addon: core_letsencrypt
    action: hassio.addon_start
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ lets_running_sensor != '' }}"
        sequence:
          - wait_for_trigger:
              - entity_id: binary_sensor.let_s_encrypt_running
                to: "on"
                trigger: state
            timeout: "00:02:00"
          - wait_for_trigger:
              - entity_id: binary_sensor.let_s_encrypt_running
                to: "off"
                trigger: state
            timeout: "{{ fritz_open_timeout }}"
    default:
      - delay: >-
          00:{{ (fritz_open_timeout | int) // 60 }}:{{ (fritz_open_timeout |
          int) % 60 }}
  - target:
      entity_id: "{{ fritz_switch }}"
    action: homeassistant.turn_off
  - delay: "00:00:05"
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ true }}"
        sequence:
          - delay: "00:01:00"
          - data:
              addon: core_nginx_proxy
            action: hassio.addon_restart
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ false }}"
        sequence:
          - delay: "00:01:00"
          - data:
              addon: core_mosquitto
            action: hassio.addon_restart
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ false }}"
        sequence:
          - delay: "00:05:00"
          - action: hassio.host_reboot
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ false }}"
        sequence:
          - delay: "00:05:00"
          - action: homeassistant.restart
variables:
  cert_sensor: sensor.myfritz_net_cert_expiry
  fritz_switch: switch.fritz_box_5530_fiber_port_forward_http_server
  fritz_open_timeout: 600
  renew_days_threshold: 5
mode: single