This is PlayFab's own Unity sample for PlayFab Multiplayer Servers, from Microsoft's MpsSamples, running on Edgegap instead. Edgegap's fork keeps the same Unity server and client, removes the PlayFab Game Server SDK (GSDK), and builds and uploads the server with the Edgegap Unity plugin.
Nothing is pre-provisioned. There is no build region, standby pool or virtual machine to size: each dedicated server starts on request, near its players, and stops itself when they leave.
Edgegap's network spans 615+ Edge Cloud locations (learn more). Each server is deployed to the best available location for its players and billed only while the match runs.
Clone the sample: PlayFab Multiplayer Servers sample on GitHub
Moving off PlayFab Multiplayer Servers? Read the PlayFab migration guide
Keeping PlayFab Matchmaking? Follow the PlayFab integration guide
Platforms: Windows desktop client (tested), Linux dedicated server. Original sample by Microsoft PlayFab, under the Apache 2.0 license.
How it works
You build the Unity server and upload it as an Edgegap app version, with the Edgegap Unity plugin.
A small console app,
EdgegapAllocatorSample, asks Edgegap for a server near the players' IPs. It plays the part of PlayFab'sRequestMultiplayerServercall and prints the server's address once it's ready.The server listens on TCP port 7777 as soon as it starts. Clients connect to the address with
-server host:port.When the players leave, the server stops its own deployment, so billing stops.
On PlayFab Multiplayer Servers vs on Edgegap:
| On PlayFab Multiplayer Servers (GSDK) | On Edgegap |
|---|---|
AgentListener.cs: GSDK Start, port from GetGameServerConnectionInfo, ReadyForPlayers, listen on OnServerActive | EdgegapServer.cs: listen on the fixed port 7777 at startup |
UpdateConnectedPlayers | Not needed. The server logs its player count |
OnShutDownCallback | Edgegap sends SIGTERM; players get the same ShutdownMessage when Unity quits |
| Build, VM size, servers per VM, standby servers | An app version: image, 0.5 vCPU / 1 GB per server, port gameport TCP 7777 |
RequestMultiplayerServer | POST /v2/deployments (EdgegapAllocatorSample) |
| Server runs until PlayFab shuts it down | The server stops its own deployment 120 s after start if nobody joins, or 30 s after the last player leaves |
1. Before you start
A free Edgegap account and an API token from Dashboard → User Settings → Tokens. It's organization-wide: keep it on your machine or your backend, never in a game client.
Unity 2021.3.45f2, with Linux Build Support and Linux Dedicated Server Build Support. Both projects use this version.
Docker Desktop, for the plugin's container build.
The .NET SDK 8 or newer, for
EdgegapAllocatorSample.Clone the fork. The sample lives in
UnityMirror/(UnityServerandUnityClient) andEdgegapAllocatorSample/.
Git: Unity needs a Git client (2.14.0 or newer) on your PATH to install packages from a Git URL, such as the Edgegap plugin. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
2. Build and upload the server
Open UnityMirror/UnityServer in Unity. The Edgegap Unity plugin is already in its packages, pinned to 3.2.1. Open Tools → Edgegap Server Hosting:
Sign in with Edgegap, then Build server.
Containerize with Docker: image name
mps-unity-mirror, image tag empty (the plugin uses the current UTC time).Optional local check: run parameters
-p 7777:7777/tcp, then Deploy local container.Upload to Edgegap: application
mps-unity-mirror, then Upload image and Create app version.
In the version form:
One port: name
gameport, 7777, TCP (the sample uses Mirror's Telepathy transport).0.5 vCPU and 1 GB.
A max duration of 60 minutes. The server also stops itself.
If asked, the registry username and token from the dashboard's Container Registry page.
To build from the command line instead (CI, scripted tests), with the project closed in the Editor:
"<Unity>" -batchmode -projectPath UnityMirror/UnityServer -executeMethod EdgegapPluginBuild.BuildServer -logFile build-server.log
3. Start a server
EdgegapAllocatorSample is the Edgegap counterpart of PlayFab's MpsAllocatorSample: a .NET console app that calls the Edgegap API with HttpClient, no SDK. Give it your token, the application and the version name from step 2:
cd EdgegapAllocatorSample
export EDGEGAP_API_TOKEN="token xxxxxxxx" EDGEGAP_APP=mps-unity-mirror EDGEGAP_VERSION=<version name>
dotnet run -- deploy <your public IP>
It prints -server <host>:<port> once the server is ready. You can also pass players as latitude,longitude, several at once: Edgegap picks the best available location for the whole group.
Run dotnet run without arguments for the menu: list versions, list deployments, get one deployment, or stop one.
| PlayFab's MpsAllocatorSample | EdgegapAllocatorSample | Edgegap API |
|---|---|---|
RequestMultiplayerServer | 1: deploy a server, wait until it's ready, print host:port | POST /v2/deployments, then GET /v1/status/{request_id} |
ListBuildSummaries | 2: list the application's versions | GET /v1/app/{app}/versions |
ListMultiplayerServers | 3: list deployments | GET /v1/deployments |
GetMultiplayerServerDetails | 4: get one deployment | GET /v1/status/{request_id} |
ShutdownMultiplayerServer | 5: stop a deployment | DELETE /v1/stop/{request_id} |
Every deployment it starts is tagged edgegap-allocator-sample.
4. Connect two clients
Build UnityClient for Windows. It has no server build, so Unity's command line works as is:
"<Unity>" -batchmode -quit -projectPath UnityMirror/UnityClient -buildTarget Win64 -buildWindows64Player Builds/Client/win64/Client.exe
Then start two clients with the address from step 3:
UnityMirror/UnityClient/Builds/Client/win64/Client.exe -server <host>:<port>
Both join the same server. Without -server, the client uses the address and port set on its NetworkManager in the Inspector. Quit the clients: the server stops its deployment 30 seconds later and disappears from the Edgegap dashboard.
5. Move your own game off PlayFab Multiplayer Servers
The fork is a working reference for leaving PlayFab Multiplayer Servers: your coding agent can copy its tested files instead of writing them from scratch. Four changes move a Unity server off the GSDK:
Remove the GSDK. Delete
Assets/PlayFabSdkand replaceAgentListener.cswith a small server script that listens on a fixed port at startup (the fork'sEdgegapServer.cskeeps the same.meta, so the scene needs no edit).Stop the server yourself. Call the
ARBITRIUM_DELETE_URLEdgegap gives every deployment, withARBITRIUM_DELETE_TOKEN, when nobody joins or everyone has left. CallSelfStop()when a match ends.Start servers through the Edgegap API. Replace
RequestMultiplayerServerwithPOST /v2/deployments, sent from your backend, with the players' IPs or coordinates.Containerize with the plugin. Build, containerize and upload with the Edgegap Unity plugin, then create an app version with your game port.
With Mirror, start the server through NetworkManager.StartServer() rather than NetworkServer.Listen, or clients get dropped as unauthenticated.
With your agent:
"Load the edgegap skill, then edgegap-unity and the skill for my netcode. Using github.com/edgegap/backend-game-sample-unity-mirror-playfab-mps (UnityMirror) as the reference, remove the PlayFab GSDK from my Unity server, make it listen on a fixed port at startup and stop its own Edgegap deployment when empty, and containerize it with the Edgegap Unity plugin."
For the whole move, by hand, see the PlayFab migration guide.
6. Add matchmaking
The sample has no matchmaker yet: you start each server with EdgegapAllocatorSample or the dashboard. To group players into these servers, pick one:
Keep PlayFab Matchmaking. Turn server allocation off on your queue, and let an Azure Function start an Edgegap server for each match. The PlayFab integration guide walks through it, and the SpaceEdge sample runs it end to end.
Use Edgegap's matchmaker. A hosted matchmaker that starts the server for each match, with no backend code. See the matchmaker documentation.
Known limits
No matchmaker in the sample. Servers start from
EdgegapAllocatorSampleon your machine, with your API token. In production, start them from your backend or a matchmaker, never from a game client.Plugin 3.2.1 logs the self-stop token. Its Dockerfile runs
envfirst, so the deployment logs show the injected variables, includingARBITRIUM_DELETE_TOKEN. Fixed in the plugin's next release (edgegap/buildtool-unity-plugin#62): update the pinned version once it ships.The server doesn't check who connects. For production, pass the expected players to the server and reject the others.
Only the Windows client was tested. The other PlayFab samples in the fork (Unreal, telemetry, wrapping the GSDK) are unchanged from Microsoft's repository.
What was tested
Tested end to end on Edgegap on 29 October 2026, with Unity 2021.3.45f2 and the Edgegap Unity plugin 3.2.1:
EdgegapAllocatorSample deploystarted the server in Toronto within seconds.Two Windows clients connected over TCP (
2 player(s) connected).After they quit, the server stopped its own deployment.
Also run in Docker locally: same result, and
docker stopsent the connected client a shutdown message before the server exited.
Frequently Asked Questions
Questions about running PlayFab's Multiplayer Servers sample on Edgegap.
Can I run PlayFab's Multiplayer Servers samples on Edgegap?
Yes. Edgegap's fork of Microsoft's MpsSamples runs the Unity Mirror sample on Edgegap dedicated servers without the GSDK. It was tested end to end in October 2026, with two clients on one server.
Do I need the PlayFab GSDK on Edgegap?
No. The server listens on a fixed port when it starts and stops its own deployment when the players leave. There is no agent to report to, no heartbeat and no ready state to set.
What replaces RequestMultiplayerServer on Edgegap?
A POST /v2/deployments call to the Edgegap API, with the players' IPs or coordinates. Edgegap starts the server at the best available location for them and returns its address. The sample's EdgegapAllocatorSample shows the call next to each MpsAllocatorSample command.
Do I need standby servers on Edgegap?
No. Each server starts on request, near its players, so there is no standby pool to size. If your game needs pre-warmed servers, Private Fleets can keep capacity running.

Clients
Learn more from clients who integrated Edgegap
31 case studies are available from studios that moved to Edgegap from another platform.

A Flawless Global Launch for Rivals of Aether 2
Aether Studios
Learn how Aether Studios quickly added Edgegap and delivered flawless launch & post-launch to their community.
Case Study

Overcome Latency Introduced by VR’s use of WiFi in Competitive Multiplayer
Halfbrick Studios
Discover how Halfbrick successfully launched & maintains a multiplayer-focused Early Access on META Quest's VR platform.
Case Study

MENA’s Social App Adds Online Games
WOLF
Learn how the highly popular MENA-region social app added matchmaking & multiplayer games orchestration easily to WOLF Qanawat.
Case Study

Hybrid Orchestration Keeps Kickoff Tactics Ready for Any Traffic
Birch Games
How hybrid orchestration helped Birch Games handle traffic, pairing egress-free Fleets with the regionless cloud.
Case Study

7 Days Blood Moons
The Fun Pimps & iLLOGIKA
Learn how Illogika dramatically reduced server costs & ensured the online experience the 7 Days to Die franchise expects.
Case Study

Authentic Online Warfare Requires the Ultimate Orchestration
Highwire Games
Learn how Highwire's need for performance required orchestration only Edgegap can deliver.
Case Study

22,000 Reviews, 4.8 Stars, and Infrastructure That Scaled Automatically
Sinn Studios
How a simple, Slack-supported integration got Sinn Studio's hit VR title online fast and keeps it there.
Case Study

Dynamic Server Orchestration
Under NDA - AAA Studio
Discover how one the world's biggest AAA studio improved its peer-to-peer multiplayer experience through edge computing.
Case Study

Near Zero Latency for AAA Fighting Game
AAA Studio - Under NDA
How an unannounced project delivered the lowest lag possible and improved fairness in its 1v1 game.
Case Study

Play Gods with Multiplayer Physics
Squido Studio
Learn how Squido uses Edgegap's highligh optimized game servers to deliver mind-bending & chaotic VR gameplay.
Case Study

A Fully Managed Solutions that Saves Time for Indies Multiplayer VR Horror
Dirty Pearl Studios
Discover how Dirty Pearl Studios saved development time thanks to Edgegap’s easy integration and automated orchestration alongside its Nakama integration.
Case Study

Instant Global Server Deployment for Collaborative XR Medical Education
AlensiaXR
How AlensiaXR uses Edgegap to deliver low-latency, always-available shared anatomy sessions to medical students worldwide.
Case Study

The Lightkeepers: A VR Social Co-op Game with Dedicated Servers
Spectral Games
How Spectral Games used Edgegap Matchmaking and Server Browser to launch dedicated servers for its VR social lobby, with no prior server experience.
Case Study

Fast & reliable deployments worldwide for PvPvE challenger Gravebound
Crater Studios
How Edgegap’s orchestration and matchmaking helped Crater Studios dramatically helped a small them focus on gameplay instead of infrastructure.
Case Study

Rapid Scaling of Web Metaverse
Hiber
Learn how Hiber eliminated the guesswork out of its server capacity planning with Edgegap.
Case Study

High Hardware Requirements & Custom Game Server Pools
Alderon Games
Learn how Alderon Games instantly leverages a custom pool of game servers across multiple providers worldwide for its popular MMO.
Case Study

Easy Integration for Indie Devs
WhaleFood Games
Read how WhaleFood Games "kicked out" its netcode issues with Edgegap.
Case Study

Cutting-edge tech that powers South-East Asia’s first-ever eSports title.
Anantarupa Studios
Learn how Edgegap transformed South-East Asia’s gaming landscape streamlining complex infrastructure and cutting-edge tech with one seamless solution.
Case Study

One Strike. Global Reach.
Triple Hill Interactive
How Triple Hill Interactive leverages Edgegap's orchestration to deliver low latency and improve fairness in a genre where every millisecond counts.
Case Study

Fast-paced Team Battle Royale... with Gun-totting Animal Plushes!
SANDYFLOOR
Discover how a Korea-based Indie Studio launched it multiplayer worldwide.
Case Study

Mobile Horse Racing Goes Global with Instant, Cost-Efficient Servers
Mirai Labs
How Mirai Labs powers Pegaxy Blaze's worldwide multiplayer races with just-in-time server deployment and fractional vCPU to keep cost per player low.
Case Study

Server Management & Distribution
Matrioshka Games
Read how Matrioshka Games were able to ship a Battle Royale in early access with limited ressources.
Case Study

At my Signal, Unleash Hell!
TyGames
Discover how Indie studio TyGames immerses players in third-person gladiatorial combat multiplayer.
Case Study

Instant Worldwide Orchestration
Soliton Interactive
Discover how Soliton Interactive did the impossible… Ship it's first playable as multiplayer!
Case Study

Competitive play with server-side physics ensures ideal sub-50 ms latency
NS7
Discover why solely Edgegap could enable an indie studio to deliver on its vision for a AAA-quality F2P sports gameplay through server-side physics and authority.
Case Study

Regional Deployments for iGaming
X1 Contra 1
X1 Contra 1 delivers real-time PvP casual games to its Brazilian player base through cost-effective hosting & regional deployments, ensuring data and legal compliance.
Case Study

Pay Only When Players Play: Affordable Multiplayer Infrastructure
Meltdown Interactive
How Edgegap helped indie developer Meltdown Interactive Media solve cost-effective scaling and matchmaking without the complexity, so they could focus on building the game.
Case Study

One Edgegap platform, three very different networking profiles
Warped Games
How Warped Games runs a social hub, real-time co-op, and turn-based co-op, all on the same Edgegap deployment API and the same container pipeline.
Case Study

Pool Live Tour Max
RETA Games
Case Study

Korea’s Web3 POP Extraction Shooter Goes Global, Instantly
NDUS Entertainment
How XOCIETY easily added Edgegap orchestration & integrated custom matchmaking working alongside Edgegap Ping Beacons to optimize latency.
Case Study

Multiplayer in Every Dimension
Arcadia.tv
Discover how Arcadia.tv uses Edgegap's edge network to deliver an innovative, team and location-based athletic VR sport.
Case Study

F2P Mobile Fighter Cuts Infrastructure Costs With Just-in-Time Servers
Game Changers Worldwide
How Game Changer Worldwide hosted Rumble Rush's real-time 3v3 PvP globally on mobile.
Case Study
Key reasons why they chose Edgegap
Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.









