# Matchmaker hosting providers

> Integrate your preferred game server hosting provider using Cloud Code modules.

Matchmaker uses [queues and pools](/matchmaker/advanced-topics-queues-pools.md) to customize matchmaking in your game. When [creating or editing pools](/matchmaker/get-started.md#create-a-queue-and-a-pool), you can specify the following **Match Hosting** types:

* Client: Select this option for peer-to-peer, client-hosting matches.
* [Cloud Code](#hosting-with-cloud-code-modules): Matchmaker uses [Cloud Code modules](/cloud-code/modules/overview.md) to allocate game servers and coordinate matchmaking results.

## Hosting with Cloud Code modules

You can integrate Matchmaker with most game server hosting providers using [Cloud Code modules](/cloud-code/modules/overview.md) to allocate game servers and coordinate matchmaking results.

Configure game hosting in Matchmaker with Cloud Code modules in the .mmq [Matchmaker queue file](/mps-sdk/deployment/deploy-matchmaker-queue.md).

In the [Unity Dashboard](https://cloud.unity.com), or the .mmq file's [**Inspector** window](https://docs.unity3d.com/Manual/UsingTheInspector.html), set the following mandatory fields:

* Module Name
* Allocate Function Name
* Poll Function Name

If editing the .mmq Matchmaker queue file directly, these fields are `moduleName`, `allocateFunctionName`, `pollFunctionName`, respectively.

While most third-party hosting providers are compatible, Unity provides example Cloud Code modules to integrate the following alternative hosting providers:

* [PlayFab](https://github.com/Unity-Technologies/matchmaker-hosting-providers/tree/main/modules/PlayFabAllocator)
* [Gamelift](https://github.com/Unity-Technologies/matchmaker-hosting-providers/tree/main/modules/GameLiftAllocator)
* [Agones](https://github.com/Unity-Technologies/matchmaker-hosting-providers/tree/main/modules/AgonesAllocator)
* [Multiplay](https://github.com/Unity-Technologies/matchmaker-hosting-providers/tree/main/modules/MultiplayAllocator)

> **Note:**
>
> The previous list isn't exhaustive. The approach mentioned here supports most hosting providers. If your provider isn't on this list, use the previous examples as a starting point to get started with your preferred hosting provider.

These modules demonstrate how to allocate game servers using the respective hosting provider's API, and how to integrate with Unity Matchmaker to pass the necessary matchmaking results to the allocated server. For more detailed instructions about how to deploy and use these modules in your project, refer to the [README.md](https://github.com/Unity-Technologies/matchmaker-hosting-providers/blob/main/README.md) file of the example repository.

To set up one of the previous modules:

1. Read the [README.md](https://github.com/Unity-Technologies/matchmaker-hosting-providers/blob/main/README.md) file of the example repository.
2. Clone the GitHub repository.
3. [Install and set up the UGS CLI](https://services.docs.unity.com/guides/ugs-cli/latest/general/get-started/install-the-cli/) for your project.
4. Follow the instructions of the relevant `CONFIGURATION.md` file.
5. Run `ugs deploy modules/<provider_name>`.
