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.

Comments

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

    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 0.0.0.0 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 127.0.0.1 aka localhost.

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


    best,

    ilya

  • codeemadness
    edited September 4

    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: https://doc.photonengine.com/en-us/server/v5/operations/certificate-setup

    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: https://feedthecuriosity.com/web-development/what-is-the-strict-origin-when-cross-origin-referrer-policy/.

    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


    best,

    ilya