Starting Photon in 5 Minutes

Photon is extremely easy to install and start. The SDK includes ready-to-use binaries which can be up and running within 5 minutes.

In the following video you can see how to get and start Photon.

Unlike shown in the video, most clients (PUN, LoadBalancing) require you to start the LoadBalancing (MyCloud) setup and you should setup a Game Server IP Address to use it. See below!

Download And Extract

The Photon Server SDKs are available on the download page of our website.

IMPORTANT: you should unblock the downloaded zip files before you extract them. For more information on how to do this please visit this link.

The Server SDK comes as self-extracting executable. This keeps included .dll files from being flagged as "untrustworthy" by some unzip tools (download from the internet => bad).

You can extract the server package to any place - preferably an empty folder which you prepared beforehand. The extraction creates several folders.

The "deploy" folder contains the binaries. This is what you need at least to run Photon. The folders doc, lib and src-server (applications) are for development.

Starting Photon

In the "deploy" folder you will find a folder per application (see: Basic Concepts) and some folders starting with "bin". Open one of these two:

  • bin_Win32: Windows Vista and up
  • bin_Win64: 64 bit Windows Vista and up

In either folder, you will find the actual Photon executable. You can start this with command-line arguments or you can use PhotonControl.

Start PhotonControl.exe and confirm the admin rights for this application. They are needed for the option to setup Photon as a Service.

Look out for the tray-bar icon (bottom right by default). Click the white/grey icon to open a menu which controls Photon. Pick LoadBalancing (MyCloud) from the Photon Instances (explained below) and "Start as Application". Now you have started Photon!

Photon Server Screenshot: Photon Control
Photon Control: Start "LoadBalancing (MyCloud)" as application

It might take several seconds until Photon is ready to use, depending on the applications it is running. Exiting Photon Control won't shutdown the server.

Until you apply a license file, Photon will be limited to 20 concurrent connections. See Licenses page.

Photon Instances

Photon is designed to run "Applications" as game logic. They define what a client can do or can't (e.g. for matchmaking). Applications run cooperatively for different tasks.

Out of the box, Photon comes with two distinct application configurations:

  • LoadBalancing (MyCloud) is the preferred setup and compatible with the Photon Cloud and PUN.
  • MMO Demo is an application that exposes a simple MMO solution based on Photon.
"LoadBalancing (MyCloud)" requires a bit of setup. By default, it only works for clients on the same machine. See below how to setup LoadBalancing.

LoadBalancing (MyCloud) and Game Server IP Config

Starting LoadBalancing (MyCloud) is the way to go for clients done with PUN or the "LoadBalancing Api".

Actually, this setup will start two separate Photon Applications: Master Server and Game Server. When a new room gets created, the Master Server will select a Game Server and forward the client there.

By default, only clients on the same machine can reach a Game Server. Even a simulated mobile devices won't be able to create a room and will fail without prior Game Server IP Config.

In the PhotonControl menu select "Game Server IP Config". The IP addresses of the host machine will be listed, marked as "public" or "local". Select one.

The entry "Autodetect public" makes the server detect a public internet IP when Photon starts.

Using a local IP means that only clients in the same local network can connect. You need to use a public IP, if players from the internet should be able to connect and join games.

If your server is in a LAN but your clients use WiFi, they might be in distinct networks. If your client can't reach the server, check if your router allows connections between WiFi and LAN. Check if all devices are in the same IP range.

Keep in mind, public IPs are subject to change unless you have a static one.

No matter if you choose a local network IP or a public one, you also have to setup your firewalls, routers and switches. Sadly, we can't help here, due to the amount of different hardware and software. In the easiest setup, multiple test machines are connected by the same switch/router.

The Game Server IP Address is saved in a file called "Photon.LoadBalancing.dll.config". It can be edited manually, too.

Starting the Test Client

The server SDK includes a test client to simulate multiple clients and to generate some load. You can start it from the PhotonControl menu. It's the last menu item for the application setup you started: "Run test client".

The test client is a simple console application which will simulate client sessions and games with a few players each.

Photon Server Screenshot: Test Client
Photon Server Screenshot: Test Client

License Info

PhotonControl will read some values from your .license file on start. Select the "License Info" item in the menu to check the CCU, expiry date and more from the menu. If you replace the .license file, you should restart PhotonControl to get the new values.

The server log will also contain essential values of your license.

See Licenses page for more information and follow this guide for adding a new one.

 To Document Top