The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Easy way to use PUN over LAN?

2018-05-22 01:09:01

Hi all,
While PUN's cloud-hosted servers and lobbies are a great convenience, it would also be great if I could connect only over my LAN. I'm working on an internal prototype/demo, so I don't need to connect players across the internet, and so it would be nice to ignore latency for now and just do it all over LAN. Is this possible?


[Deleted User]
2018-05-22 09:41:16

Hi @steverock,

you can host the Photon Server yourself on your or another computer on your local network and let the clients connect to this server. This way all game relevant traffic should 'stay' inside your local network. The server itself however requires an internet connection if I'm not mistaken. You can find the Server SDK here.

When running the server it already has a working Loadbalancing Application which you can use. This is basically the same which as in the Cloud. Inside your Unity project, you have to change the settings in the PhotonServerSettings file: set hosting to 'self hosted' and enter the server's IP address.

2018-05-22 16:12:57

Great, thanks. I'll give that a spin today. I guess the simplest thing we can do is have the master client also run the server, and everyone connects to his/her IP. Just for a prototype.

2018-05-22 17:51:53

Got it working, but I'm seeing a lot of latency even all on the same computer. Posted follow up question here:

Back to top