The doc page for DuckDNS configuration shows how to configure the service:
but this is a json syntax, not YAML. So, where I need to put this code?
It goes in the add-on config.
It doesn’t go in your Home Assistant configuration.
Are you using hassio or home assistant installed another way? If you are running hassio did you install the duckdns add-on?
Ah ok, it wasn’t very clear to me.
I installed HA using Python in VirtualEnv on a Debian - no hass.io.
This is the official documentation for your install method,
This one is easier to implement IMO
If you are looking at something for Home Assistant and the page is under /addons/ it is referring to hassio addons which are not available on any other platform at this time, other than hassio.