About switching to self-hosting
The whole answer can be found below.
Try Our
Documentation
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.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
About switching to self-hosting
SW95
2022-02-24 02:02:27
Hello,
We currently have a project that is using PUN 2 and Photon Clould. We are thinking about switching to self hosting but I have few questions about it ;
Do I still need to subscribe to PUN even though I don't use any of the cloud features and just want to use client side apk in my self-hosting?
Can I easily switch to self-hosting with my current fetaures (rooms etc.) without need of modifying my code base?
Can I still use Photon Voice over self hosting?
As I know there is have 500KB message sending limit on the cloud for sending files. How about If we use self-hosting? Is there any limit? Can I somehow transfer huge files over my self server?
Thank you.
Comments
Hi @SW95,
No need to purchase a PUN plan. You only need a Photon Server license.
Yes. The only main change is how to connect but in PUN you can achieve this via PhotonServerSettings w/o code change. There may be slight tiny differences but that's not generally the case (e.g. Photon Server does not have AppVersion but you can add it, etc.)
Yes of course. You may need to tweak some server configuration to allow some higher limits (e.g. OpChangeGroups per second on GameServer) as the Photon Server SDK is stricter than cloud.
Yes you are free to do so but we still don't recommend it. There are some settings to change.
JohnTube 2022-02-24T04:59:06+00:00
Hi @SW95,
- No need to purchase a PUN plan. You only need a Photon Server license.
- Yes. The only main change is how to connect but in PUN you can achieve this via PhotonServerSettings w/o code change. There may be slight tiny differences but that's not generally the case (e.g. Photon Server does not have AppVersion but you can add it, etc.)
- Yes of course. You may need to tweak some server configuration to allow some higher limits (e.g. OpChangeGroups per second on GameServer) as the Photon Server SDK is stricter than cloud.
- Yes you are free to do so but we still don't recommend it. There are some settings to change.
Thank you for your reply. Just to be clear about first question, so you are saying If I have Photon Server licence I can still use PUN features things such like character sync,RPCs,Rooms etc. but I don't need to purchase it because I have Photon Server license, did I understood you correctly?
Yes.
Just to avoid any confusion and as we regularly see this question relating to reduce cost
the 100 ccu Server license is free for development
when going live/using Photon Server commercially you need a paid server license
From a cost perspective it will most likely be hard to beat our cloud pricing. You should only use self-host server if you need features not provided in the cloud.
Since the AppVersion
feature is quite important, I will share my 'fix' for it below in the event any other developers run into the issue and find this thread. There are many ways of doing this but I thought this was best.
MasterClientPeer.HandleCreateGame must be modified, add the code below into the function:
createGameRequest.LobbyName += unencryptedAuthToken.ApplicationVersion;
MasterClientPeer.HandleJoinGame must be modified, add the code below into the function:
joinGameRequest.LobbyName += unencryptedAuthToken.ApplicationVersion;
MasterClientPeer.HandleJoinLobby must be modified, add the code below into the function:
joinLobbyRequest.LobbyName += unencryptedAuthToken.ApplicationVersion;
If any of the engineers know a better way or want to share the deep dark secrets of how they do it on the Cloud, would be interested in it 😉
Also yes, keep below 500KB like John said, in fact you should try to get this as low as possible for your game and not try to increase it.
hey @chvetsov check this out!
@Meep this is clever solution.
In cloud we do not do much. SDK already has GameApplication class we just have list of those objects and select corresponding basing on authentication information. that is it
best,
ilya
You must be careful when using FindFriends, as this version handling does not apply for it. Maybe you could extend it to also check the lobby / version.
Back to top