Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Darshan-upadhyay1110 opened this issue Jan 17, 2024 · 4 comments

Comments

@Darshan-upadhyay1110
Copy link

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

@juliusknorr
Copy link
Owner

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

@Darshan-upadhyay1110
Copy link
Author

@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 ?

@juliusknorr
Copy link
Owner

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.

@brccabral
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants