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 Photon Server.

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.

Server Side Code?

2016-06-10 13:14:27

I'm having a little trouble understanding where I put the server-side code for Photon. All of the tutorials seem to be based around the premise that the clients do all the work and data is sent to the server and is then 'echoed' to all the other clients.

Is this correct? Is there no server-side validation of the data at all?

I'm also using PlayFab, which has server-side code, but the code isn't 'tied' to any particular game. My understanding of combining these two products is that Photon handles the local game information (IE - the actual location of the pieces and how many hit points units have etc) and passes requests to Playfab when it needs to check specific TitleData queries or broad code access.

However, it feels like Photon is literally just an echo chamber - I can't actually code on it. Which means I'm relying on my clients to handle the majority of my game logic, which does not seem like good practice. Also it makes me wonder why use Photon at all at that point, since everything is basically handled by Unity and PlayFab.

Can someone point me in the right direction? Surely there's some Photon Server Side documentation somewhere that I'm missing.


2016-06-10 13:21:27

I should point out that I did search extensively on this topic. The top link on Google is this one;

And the reply to the question "Where do I put the code" was "Wherever you want". @%!$@!@$??? Where do I physically upload the code? What language does Photon Server speak? Etc.

If Photon has server-side code capabilities, they are completely obscured to users. I can't find any information on them. This is a huge problem.

2016-06-10 14:35:11


before clarifying, where to put the code, some pointers to understand the different Photon products a bit better.

to start I would suggest reading:


Photon Server:

  • you host the server and can adjust its logic as you need it (c# code)
  • on premise

Photon Cloud (Realtime, Chat, Voice):

  • usually, we do the hosting here and you cannot add server-side code/logic
  • SaaS

2016-06-10 14:37:17

Okay, so with Photon Cloud I cannot add server-side code. This is good to know, and should probably be clarified in the documentation (as I see this question a lot)

2016-06-10 14:53:18

Fair enough.

Let me add a note (no rule without exception):
in Photon Enterprise Cloud (dedicated servers, SLA, ...) you can add server side logic running in rooms/games via plugins (

In the end, it strongly depends on the kind and scale of your game, if you need server-side logic or can cope without.

2016-06-10 15:15:09

I strongly need server side code. Enough that after your first answer I was considering going back to (which is what I originally started development with but it's gone seriously downhill since Yahoo! bought it out)

My game has elements of collectible card games and strategy, and a large portion of it is matches vs AI opponents and I can't trust the clients at all.

Photon Enterprise Cloud's plugins feels (at a glance) very much like how works. I can't find much information on the pricing though - I'm a small indie developer and anything with 'enterprise' in the name is usually way outside of my budget, so I'm a little worried.

Back to top