App behavior when server unreachable

Hello, I am new to self-hosting, just finished setting up my nextcloud server and am now trying to harden it up and tackle any potential security issues. Quick question regarding how the mobile app works/reaches out to my local server.

I am self-hosting nextcloud 20.0.4 on a DietPi. I only want devices to upload/sync when they are on my local home wifi network (ie, I do not plan to expose my nextcloud server to the public internet for remote access). I have the iOS app on my phone. When my phone is not connected to my local network, how often will the app attempt to reach out and connect to the server before it realizes it’s unavailable?

In other words, will the nextcloud app on my phone constantly be sending out connection requests, searching in vain for my local server while I’m out and about town? Let’s say my nextcloud server’s local IP is 192.168.1.2/nextcloud. If I connect to the wifi at my local coffeeshop, will the app be sending out connection requests to the coffeeshop’s WLAN for that IP, trying to connect to whatever random device happens to be using that local IP on that WLAN and not understanding that my nextcloud server isn’t on that network? Is there a way to control when/where my mobile app attempts to connect?

If it is not connected to network fitting the the netmask of your local ip it will not send any requests at all.

If the network at your coffee shop is using the same ip range as you do at home it will try to find the nextcloud server using it’s ip address.

AFAIU the app will only try to connect when you are using the app.

Thanks. That pretty much answers my questions!