Adding multiple DNS names to client pointing to the same Nextcloud instance?

I consider setting up a nextcloud instance at a server running in my home network. The web server will be reachable via a home-local DNS name (i.e. a private IP address from my home network IP range) and via a DynDNS name (i.e. a public IP provided by my ISP).

When I am at home, I want to use the home-local DNS name (or IP). When I am on the go, I have to use the DynDNS name (public IP). Is there a way of telling the Nextcloud client two DNS names for the same Nextcloud instance? Or ist there an alternative besides fiddling with DNS names?


Hi @ho1ger ,

I’m not the total crack when it comes to routing and so on, but I think I read about the intelligence of routers when you try to access an “external” domain which would route back into the internal network.
So probably you can always use the DynDNS address no matter where you are. If the router is smart it should detect that the desired target is within your network at home and don’t route the traffic through the internet.

Maybe someone with more expertise can confirm.

You can do this two ways:

  1. Use an internal DNS server/forwarder (more setup, but better/easier in the long run). Your router might be capable of doing this, and if not, see if you can install DD-WRT which apparently includes this feature.
  2. Use something on the device which can sync to a different hostname depending on your connection, etc. If you’re using Android, you could do something with Tasker and FolderSync to accomplish this (maybe a little easier to configure than a DNS server, but only works for one device). I’m not sure if iOS has a way of doing this, and I imagine Windows could probably be coerced.
1 Like