Cant connect to self hosted photon server

edited March 2023 in Photon Server


I installed photon server on custom windows server, and I have client Pun client SDK in unity game,

Server version: SDK

Pun client version: 2.40 Photon lib

But I can't connect to server and get this error:

Failed to connect to server after testing each known IP.

Steps I done:

Starting Photon in 5 Minutes | Photon Engine

The game connects successfully to photon servers but when I set the IP address of my server in server settings in Unity, game can't connect.

is there any version compatibility problem or any missing step that I need to do to connect?


  • hi, @Keyvan

    did you update GameServer.dll.config and PublicIpAddress for game server to your IP?



  • hi @chvetsov , Thank you for your respond.

    where is the GameServer.dll.config file? (I searched in unity project and server sdk and did not find file with this name)

    I wrote the server IP in server field in PhotonServerSettings.asset file in unity package.

    and in server I run the load balancing and activate the set public ip address to .....

  • hi, @Keyvan

    ah, I'm sorry. wrong file name. It is called Photon.LoadBalancing.dll.config

    it is in deploy/LoadBalancing/GameServer/bin/Photon.LoadBalancing.dll.config



  • hi @chvetsov

    Yes, I changed public IP parameter in Photon.LoadBalancing.dll.config, is there any other change need to do except the public IP?

  • hi, @Keyvan if you master is hosted on another machine than also you have to fix master server address.

    in order to help more I need to know more -

    on what stage client fails to connect?

    logs from client, logs from server