Skip to main content

Configure P2P

Last updated on November 10, 2025

Introduction

AccelByte Gaming Services (AGS) supports Peer-to-peer (P2P) networks for your game. P2P gaming leverages decentralized networking architecture, enabling players to directly connect with each other without relying on centralized servers. This approach offers numerous benefits, including reduced latency, improved scalability, and enhanced player autonomy.

By distributing the game's workload across participating peers, P2P gaming can alleviate strain on server infrastructure, resulting in smoother gameplay experiences and decreased likelihood of server downtime. Additionally, P2P networks facilitate player-to-player interactions, fostering a sense of community and enabling seamless multiplayer experiences across various platforms.

This article walks you through how to configure P2P for your game using AGS online subsystem (OSS) or Unity SDK.

How it works

This section contains diagrams showing how P2P will work in AGS using AGS OSS or Unity SDK.

Host a game

Client join a game

Set up Matchmaking configuration in the Admin Portal

  1. Create session template. Follow the steps in the Configure session templates article to configure session templates. Then, make sure to choose P2P for the session type as shown below.

    Setting the session type to P2P

  2. Create match ruleset and match pool. Follow the steps in the Configure match ruleset article and in the Configure match pool article. Then, make sure to choose the correct session template with the P2P session type that you created in step 1.

  3. Integrate Matchmaking in game client. To learn more about the matchmaking flow, refer to the Integrate Matchmaking into your game client. The flow is similar to matchmaking with dedicated servers. The difference with P2P is that after the match is found and the game session is created, the invitation is sent to all game session members and the member that accepts first will be the host and the others will be clients.