Running Code on Photon Cloud

Is there a way I can write code to run on my game’s servers? I don’t need to do anything too intense like simulating physics or unit stats. I need to use the server as a middle man to process commands for my lockstep RTS game.

What I wish to do:
Every time a client tells a unit to move, the move command will be sent to all players. Every player, upon receiving the command, will send a confirmation message to the server. Once the server has received confirmation from all clients, it will send an RPC to all clients to let them know that the command is ready to be executed. If not, it will send the ID of the player who is not confirmed and a voting screen will pop up to vote that unconfirmed player out of the game.

To accomplish this, I think I will need to be able to 1. Have an RPC on the server to be called for confirmations and 2. Send an RPC from the server if all clients are confirmed. Is this possible with Photon Unity Networking?

Photon Cloud (Photon servers managed by Exit Games) does not run custom game code on the server. Sorry.

You could modify the server by using the Photon Server SDK. The LoadBalancing Application is a ready to use “replica” of the Photon Cloud and can be modified. You only need to run it somewhere on a Windows machine.