How to be connected from local ip and internet?( SOLVED )

When I am at home I use my local network IP and goes very well.
But when I am at work i must chnage to my DynDns profile to be conect.
How can I setup so my nextcloud will conect automatecly when I am in one place or the other?
Thank you.

Can you not use your DynDNS hostname from your LAN?
I use the DNS on my router to override the external domain to redirect to the internal IP, so all of my systems point to one domain - if inside the LAN it resolves to my internal IP, if outside the LAN the internet DNS resolves it to the public IP of the server.

The easiest way is to always use your DynDns address. There should be no drawback as your router will keep the data transfers locally if you are connected to your local network.

When I am at home and use i can Not connect to nextcloud.

That could mean that your internal name server does not know anything about

1 Like

My home router utilizes DNSmasq - I have to set it to reflect the internal IP of my Nextcloud instance in order to access it by name. Devices that go in and out of the home work locally and remotely that way.

Thanks for the replay.
When i am at work or with phone and try to connect at the w w w .homecloud. dyndns/nextcloud it works very well.I want to use only one profile and connecting to my server.I have paid to the dyndns for this purpose.

I made it.
Thank you all for your time and answers.They helped me to resolve the problem.
I thought the problem was from the nextcloud config settings but after your answers guys i went back to my router and change some settings there at SOHO place and …vouala it is working.
Thanks thanks again.It was my only unsolved problem to my nextcloud home server.:slight_smile::slight_smile:

And for the history my setup is Ondroid xu4 and is super fast.

I have the exact same problem. Can connect all day long outside of the local network to (DuckDNS points to a registered domain), and can connect within inside local network when VPN is used.

I can’t seem to find how to get local machines to route correctly to the nextcloud local server.

Any advise appreciated.