Problem accessing HA-core on docker with duckdns locally

I use a Pi4 with an SSD (previously installed in uSD). On it I installed on docker: ha-core, (independent) duckdns and swag (former letsencrypt) for certs and nginx reverse proxy; and several other docks.

My problem is that I can access from outside the local lan with my xxx.duckdns.org address to HA, but not locally (I have to access by the local IP address which is a bit annoying). However, I can access from outside and inside of my local lan to my other docker installations without any problem using another_yyy.duckdns.org addresses.

I’ve looked everywhere and the only clue I’ve got is a failure in login (see picture).

The IP address shown in the picture is the docker IP address of my nginx proxy.

And from Firefox inspector I can see that there is a problem getting a token.

So I think that I have any wrong configuration in HA that blocks the use of the readable address.

I tried to us http setups and trusted proxies and nothing worked for me.

Anyone has an idea of how to solve it?

Sorry for my english and thank you in advance for your help.