Spark automatically detect server

Hello guys would like to know how to detect the Spark network gateway automatically and arrow it as a server? Does anyone know?

No such things exists. You have to explicity tell it the server address/hostname to connect to. It’s possible to run multiple Openfire servers on the same network, for a number of reasons, so auto-detect would not work very well universally.