Global discovery means, that your client will send it info (device id + ip) to the discovery servers listed in the input field below the checkboxes and has nothing to do with UPnP directly.
Even if you disable global discovery, you can still be available from outside, when you use e.g. dyndns and enter the connection details on the other client manually.
thank you for answer. How to connect my home pc and my office pc? why use the own discovery server. in local network, all my device connected. but outside devices are not connected
If the devices say OK in the global discovery server Then its finding it fine. Check the firewall and port forwarding section in the docs, as that’s most likely the reason.
AFAIK: If your discovery server is running inside your network, all local syncthing nodes have the local ip and port in the discovery database. The discovery server uses the ip from which the clients are connecting.
So all external nodes will be able to find each other and all local nodes will find the local and the external nodes. As the external nodes probably won’t have port forwardning / UPnP, the local nodes won’t be able to connect to the external nodes.
In short: The discovery server needs to run outside your home / local network (e.g. VPS) to be used by internal and external nodes.
When I set the global discovery server to my DynDNS name, my router connects as if it comes from the external IP but routes it internally (better speed, irrelevant for discovery).
I started the discovery server in debug, to get the info: