either way they have to be on the same network, cloud or no cloud, but anyways, most phones nowadays are connected to the Internet...
To use a local webserver, they would have to be on the same network (unlikely). To use the cloud based service, they would have to be on the internet (likely).
my local webserver is internet accessible (like many)