Starting Photon in 5 Minutes
Photon is extremely easy to install and start. The SDK includes ready-to-use binaries that can be up and running within 5 minutes.
- SDK Overview
- LoadBalancing Instance
- IP Address Config
- Download: The Photon Server SDKs are available on the download page of our website.
- Extract: The Server SDK comes as a self-extracting executable. This keeps included ".dll" files from being flagged as "untrustworthy" by some unzip tools. You can extract the server package to any place - preferably an empty folder which you prepared beforehand.
- Get a license: Photon Server requires a license to work. But don't worry you can get a 100 CCU license for free here. Claim it and download it to "deploy\bin_Win64". See Licenses page for more information.
- Start PhotonControl: Start "PhotonControl.exe" and confirm the admin rights for this application. They are needed for the option to set up Photon as a Service. Look out for the tray-bar icon (bottom right by default). Click the white/grey icon to open a menu that controls Photon. Read more about PhotonControl.
- Start LoadBalancing instance.
LoadBalancing (MyCloud)from the Photon Instances and "Start as Application". Now you have started Photon. The server should be ready when PhotonControl tray icon becomes blue like Photon's logo.
- Connect your clients: Now you can connect any client you want to the server locally on the same machine. If you want to connect clients from the same network or from a different network, an extra step is needed, see IP Address Config.
The SDK contains 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.
Everything needed to run Photon Server is in the "deploy" folder.
We refer to "deploy\bin_Win64" as the binaries folder. This folder contains:
- PhotonSocketServer.exe: the actual Photon server executable.
- Photon Server license file. Read more about licenses.
You can start the server with command-line arguments or you can use PhotonControl.
The "deploy\bin_tools" folder currently contains useful tools:
- 7zip: Archive creation and extraction tool used to compress debug info files.
- baretail: Our favorite log viewer in the free edition. It is used by PhotonControl to view the latest logs.
- firewalltool: Tool to automatically set rules for Photon in Windows Firewall.
- perfmon: Contains a list of PerfMon counters used when you set up counter logging to a file. This is explained here.
Photon requires a separate folder next to the binaries folder per application (e.g. "deploy\NameServer"). The assemblies must be in a "bin" sub-folder (e.g. "deploy\NameServer\bin").
Applications are set up in PhotonServer.config.
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 LoadBalancing (MyCloud) application which is the preferred setup and compatible with the Photon Cloud and PUN.
LoadBalancing (MyCloud) is the way to go for clients done with PUN, Photon Voice or Photon Realtime (also known as the "LoadBalancing Client API").
Actually this setup will start three separate Photon Applications:
Master Server and
The NameServer redirects you to a Master Server.
When a new room gets created or when a room exists and can be joined, the Master Server will forward the client to the Game Server.
IP Address Config
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.
No matter if you choose a local network IP or a public one, you also have to set up 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.
Master Server IP Config
In the PhotonControl menu select "Edit Nameserver.json". This will open "deploy\Nameserver.json" in a text editor. Set the IP address or hostanme in one of the fields of the available node. Optionally change the region token.
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.
The Game Server IP Address is saved in "deploy\LoadBalancing\bin\GameServer.xml.config".
It can be edited manually, too.