Connecting laptop and iPhone from outside and inside local network

Maybe a silly question, but i don"'t see how can i solve the problem:
I have a MacBook Pro, a Windows laptop and an iPhone i want to sync with my private NextCloud server at home in my home-network behind a Huawei 4G Router. I can reach my NextCloud server from outside by a No-Ip domainname and portforwarding in the Huawei. When i am outside my home, i connect via 4G internet or via the internet at the place i am working.

When i am at home, i want to connect to my NextCloud server on my private home-network because the use of my Huawei 4G router costs money: “Unlimited Internet” in terms of T-Mobile is in practice “100GB /month, 5GB/day”.

How can i connect transparently to my NextCloud server when i am at home and when i am outside? I am not an expert.


You should install a DNS server in your LAN which resolves the external FQDN of your server to a local IP address. Most likely your Huawei 4G router is currently working as a DNS resolver and forwards DNS requests from your LAN to the internet. Very often these devices are not so flexible that they can be used for such purpose. If you own e.g. a NAS or as Raspberry Pi it should usually be possible to install an DNS server on it and use it for the mentioned purpose.