nextcloud-docker-dev icon indicating copy to clipboard operation
nextcloud-docker-dev copied to clipboard

How to open URL in mobile browser or to connect server with android app

Open Darshan-upadhyay1110 opened this issue 1 year ago • 4 comments

I have this URL working on my local system which "http://nextcloud.local/index.php/apps/dashboard/"

Questions:

  • How can I open this same URL in other device within same network. (Like in my phone or in tablet ) ?

image

  • Also can i use this same url to connect NC server running in system with NC android app ?

image

  • where i can add my trusted ip address ? ( which file). Note: here i can not find config.php as we can see in prod NC setup

Assume that my wifi nextwork has this ip address : 192.168.X.X

CC: @juliushaertl

Darshan-upadhyay1110 avatar Jan 17 '24 05:01 Darshan-upadhyay1110

The reverse proxy that is used for distributing requests between different containers requires to use a hostname. On other devices you can achieve this either by adding nextcloud.local pointing to your local wifi ip in /etc/hosts or you need to use a custom dns server for that https://juliushaertl.github.io/nextcloud-docker-dev/basics/hostnames/#use-dns-service-discovery-on-macos

juliusknorr avatar Jan 17 '24 07:01 juliusknorr

@juliushaertl i have added my ip in etc/hosts image

But in my phone i can not open nextcloud.local. (i have restarted docker after edit etc/hosts)

Am i doing wrong here ?

Darshan-upadhyay1110 avatar Jan 17 '24 13:01 Darshan-upadhyay1110

You will need to change the hosts file on the mobile device for this so that it can resolve the hostname. This only works on rooted android devices as far as I'm aware. Otherwise you could use an app like https://www.zenz-solutions.de/personaldnsfilter-wp/ to add custom dns resolution or you need a local dns server as described in the linked documentation above.

juliusknorr avatar Jan 17 '24 13:01 juliusknorr

I have PiHole setup as my DNS server on my WiFi LAN network. On the phone, I change the WiFi settings to point DNS to my PiHole IP. In PiHole, I configured nextcloud.local to the IP where Nextcloud is (198.168.x.y). No root required. Another option is to use dnsmasq, but I think this is more complicated, and PiHole has other benefits. And open firewall with ufw. I have compiled some instructions here https://gist.github.com/brccabral/a632c5dc826d0fe55db60722adbbd2dd#local-dns but this is not a fully tested tutorial.

brccabral avatar Feb 22 '24 17:02 brccabral