Nextcloud Internal (local server ip) external domain access

I set up my Nextcloud instance in a docker container with MariaDB and NginxProxyManager. Everything works fine with my domain SSL and everything I was able to connect to my server from android and Desktop BUT only via the Domain Name somethingsomething.com. Due to ISP speed limitation my network is slow but internally everything is Gigabit. Is there a way to connect to my devices once within the local network with the local ip address and enjoy gigabit speeds and once I leave automaticly to switch to domain name url.
Home Assistant has such an option where you put PublicIP: cloud.com PrivateIP: 192.168.100.150:8080 and it automaticly switches.
Can I do the same with Nextcloud ?