Mobile apps and Win10 desktop client are using wrong url / 404 error

Hi :slight_smile:
I just installed Nextcloud 18.x for the first time ever (on my Synology NAS). I now want to access it via a mobile app or the win 10 desktop client. Problem is: they are always using the wrong url. Things go like this:

  • open app or client
  • insert dyndns server url
  • app/client tries to connect to myurl/nextcloud
  • fails, because I didn’t use the default install directory name “nextcloud” because of security reasons

So … how do I tell the windows client and both mobile apps (ios and android) where they can find my nextcloud installation?

Everything works fine if I use my freeDNS url in my mobile browser (mynextcloudurl.mooo.com/mycustominstalldirectory).

I’m kinda stuck now and I’d be very happy if someone could help. :slight_smile:

There is an option called overwritewebroot where you can tell it the correct root URL. Use OCC to set it.

1 Like

Thanks for your help!

This might have solved my problem - but I moved to another type of installation as I found out that my DS218 is just not powerful enough to reliably run Nextcloud. So I moved the whole thing to my raspberry pi using nextcloudpi.

Now there’s a kinda similar problem but not exactly the same:
I can connect to my cloud only if I use LTE. Once any device is located within my local network I get the 404 error again (can’t find status.php). What could cause these issues? Any idea?

Thanks again! :slight_smile:

What are you putting in the address bar when this happens?

My dyndns url. But I just found out what’s very likely the cause: I need to set up dns forwarding on my router. Now just have to find out how …

My guess would be your router doesn’t allow hairpin routing, which honestly is a silly thing to do anyway, being a terrible and inefficient waste of bandwidth. Try typing in the LAN IP and see if you can reach it. If that works, then there are a couple things you can do. The problem in that case is that the DNS name resolves to your public (WAN) IP, but you really need the private (LAN) IP.

The “correct” solution is to run split horizon DNS with a local DNS server, but this is also the more complicated solution. This allows DNS records for your zone to resolve differently while on-network, so your device would be given the private IP for that DNS name instead. You would have to run a DNS server, for example by installing BIND on your Nextcloud server.

A much simpler option is to add it to the hosts files of your devices to override the name resolution with the private IP, but understand this would have to be done per device and phones probably won’t allow it, and you’ll have to remove it again if you go off-network or it won’t work from outside. Not a great solution.