Node Red connected to internal HA address

Hi,
This is my first setup of Node red (via Docker) , i tried to add HA with internal address ( https://192.168.31.100:8123 or https://localhost:8123 ) but it didn’t connect to HA , only with my duckdns domain the connection was o.k.
It can be very poor connection via the internet (with the domain address)
What can i do?