> For the complete documentation index, see [llms.txt](https://docs.edgegap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgegap.com/docs/hosting-migration/switch-from-playfab.md).

# Switch from PlayFab

Move your game servers off PlayFab Multiplayer Servers to Edgegap, and keep PlayFab for player accounts and matchmaking.

Keep **PlayFab** for player accounts, data and matchmaking queues, and move only your game servers from **PlayFab Multiplayer Servers** to Edgegap. Matches still form in your PlayFab queues; for each one, Edgegap starts a server near the matched players, and the server stops when the match ends.

{% hint style="success" %}
[Deploy from PlayFab](https://docs.edgegap.com/docs/tools-and-integrations/playfab-bridge.md) is the full setup, and the [SpaceEdge sample](https://github.com/edgegap/backend-game-sample-unity-playfab-matchmaker-fishnet-spaceedge) runs it end to end in Unity.
{% endhint %}

## 🗺️ Replace Features

| PlayFab Multiplayer Servers                                                                | Edgegap                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Build**: VM size, servers per VM, ports, container or assets.                            | **App version**: your container image, vCPU and memory per server, and ports. Each match gets its own deployment, so there are no VMs to pack.                                                                                                                                   |
| **Build regions**, standby servers, dynamic standby.                                       | Nothing to plan per region: each deployment starts in the best of 615+ locations for its players. [Active caching](https://docs.edgegap.com/learn/orchestration/application-and-versions.md#active-caching) makes starts faster.                                                 |
| **RequestMultiplayerServer** (SessionId, PreferredRegions, InitialPlayers, SessionCookie). | [`POST /v2/deployments`](https://docs.edgegap.com/docs/api/dedicated-servers.md) with the players' locations, tags, environment variables and webhooks.                                                                                                                          |
| **Queue with server allocation**: the queue requests a server on each match.               | Turn server allocation **off**, and start the server from an Azure Function on `match_found`. See [Deploy from PlayFab](https://docs.edgegap.com/docs/tools-and-integrations/playfab-bridge.md). Or use the [Edgegap Matchmaker](https://docs.edgegap.com/learn/matchmaking.md). |
| **GSDK** `Start` and `ReadyForPlayers`.                                                    | Not needed: the server starts listening on its port. Edgegap calls your ready webhook once the deployment runs.                                                                                                                                                                  |
| **GSDK config**, the port number by name.                                                  | A fixed internal port, declared on the app version. Edgegap maps it to a public port and [injects variables](https://docs.edgegap.com/learn/orchestration/deployments.md#injected-environment-variables) such as the public IP and the external port.                            |
| **InitialPlayers**, **SessionCookie**.                                                     | Environment variables on the deployment. The guide passes one join token per matched player, so the server admits only them.                                                                                                                                                     |
| **Shutdown and maintenance callbacks.**                                                    | The server stops its own deployment with `ARBITRIUM_DELETE_URL` when the match ends. A max duration on the app version is the safety net.                                                                                                                                        |
| **Windows containers** or Linux.                                                           | Linux containers. Build your server for Linux, such as a Unity Linux Dedicated Server or an Unreal Linux server.                                                                                                                                                                 |
| **Custom Linux container** in PlayFab's registry.                                          | The same image: push it to the Edgegap registry, or connect an [external registry](https://docs.edgegap.com/docs/tools-and-integrations/docker/external-registries.md).                                                                                                          |
| **QoS beacons** and the queue's `Latencies` attribute.                                     | Edgegap places the server from the players' locations. [Ping beacons](https://docs.edgegap.com/learn/orchestration/ping-beacons.md) are available if you measure latency yourself.                                                                                               |
| **Billing** per VM core-hour, from VM start to shutdown, standby included.                 | Billed while each deployment runs. Empty servers stop themselves.                                                                                                                                                                                                                |

## 🚀 Migration Steps

1. **Make the server Linux and remove the GSDK.** Listen on a fixed port, stop the deployment when the match is over, and read match data from environment variables instead of GSDK config.
2. **Create an app version** on Edgegap with that port, deploy it by hand, and join it with a client.
3. **Deploy the two Azure Functions** from [Deploy from PlayFab](https://docs.edgegap.com/docs/tools-and-integrations/playfab-bridge.md), and test them by hand on a match before you add the rule.
4. **Copy your queue** with server allocation off, and ship a client that reads its server from read-only player data instead of `GetMatch`.
5. **Add the rule** on `match_found`. Set `EDGEGAP_QUEUES` to the new queue, so queues still on Multiplayer Servers don't get a second server.
6. **Move players over**, then delete the Multiplayer Servers builds: their standby servers keep their VMs running.

{% hint style="warning" %}
Clients you already shipped read their server from `GetMatch`, which returns no server once allocation is off. Switch queues only after the new client is out.
{% endhint %}

{% hint style="info" %}
If you need help, [reach out to us over Discord](https://discord.gg/MmJf8fWjnt). For live games, use our [ticketing system](https://edgegap.atlassian.net/servicedesk/customer/portal/3).
{% endhint %}
