How to connect to On-Premises server?

I am trying to connect a Discord bot to a Photon On-Premises server, however the documentation doesn't really explain how to do that. From the looks of it, I can only connect to a Photon Cloud application.


  • Call setNameServerAddress to set server address and port before connecting.
  • codeemadness
    edited August 2022

    Hi @vadim, I'm quite new for setting up servers. This is my situation:

    My Photon server is hosted on machine A.

    And My game is hosted on machine B.

    In file PhotonServer.config, which IP and port should be placed within WebSocket section? Server IP or Client IP?

    Btw, should we care IP difference between LAN and Wifi? My game usually runs online via wifi.

    It would be best if you can provide a sample with specific ip and some note on it.

    Many thanks

  • hi, @codeemadness

    you can leave there. What you really have to change is in LoadBalancing/GameServer/bin/GameServer.xml.config. Setting PublicIPAddress for game server should be set to one that is going to be used. Default is aka localhost.

    Also you have to set there MasterIPAddress to address where is your master



  • codeemadness
    edited September 2022

    Hi @chvetsov,

    Thanks for your reply.

    My problems above is ok now.

    But now I have to face another issue relates to connection via wss.

    I have followed the guide in following doc:

    However, when go to section 6 (step 5 - testing ERR_CERT) : it met issue cross-origin

    I apply self-signed certificate and; my client and server are different machines.

  • hi, @codeemadness

    look at this text:

    As far as I can see this is new default that is used by chrome and other browsers. So, Currently I do not see what is the issue