Discover how Edgegap works

Discover how Edgegap works

/

Unreal Matchmaking

Unreal Matchmaking

Deploy to Edgegap

Published

Published

Published

Last reviewed for accuracy

Last reviewed for accuracy

Last reviewed for accuracy

Unreal Matchmaking: How to add Matchmaking to your Unreal Engine multiplayer game with Edgegap

Unreal Matchmaking: How to add Matchmaking to your Unreal Engine multiplayer game with Edgegap

This guide shows you how to add matchmaking to an Unreal Engine multiplayer game that already runs on Edgegap's dedicated game servers: players select Find Match, get grouped with players close to them, and connect to a server Edgegap starts near them. When everyone leaves, the server stops itself.

Once your game server is containerized, Edgegap deploys it worldwide to 615+ Edge Cloud locations (on-demand) from a simple API call and billed exclusively on usage: no entire server to rent, provision or keep running between matches. For persistent servers of reserved capacity, Edgegap offers Private Fleets. Edgegap's Matchmaking builds on top of that and is optional.

You configure the matchmaker with a JSON file in the Edgegap dashboard, with no backend code. In your game, two ready-made C++ files measure ping, create the ticket, wait for a server and connect, and Blueprints can call them directly. They connect with Unreal's own ClientTravel, so they work with any game that uses Unreal's standard replication and dedicated servers, with no changes to your game mode or player controller.

This guide covers:

  1. Preparing a working Edgegap app version for your game

  2. Connecting your coding agent to Edgegap (optional)

  3. Adding the matchmaking files to your project

  4. Configuring the client

  5. Creating your matchmaker

  6. Choosing your matchmaking rules

  7. Testing with two players

You can do it two ways, and mix them:

  • With a coding agent. Connect Claude Code, Cursor or another agent to the Edgegap MCP server and its agent skills. The agent adds the files, edits your config, runs the builds and checks the matchmaker. You handle the dashboard clicks and playtest.

  • By hand. Every step below also works without an agent.

No credit card required. Free tier includes the resources to deploy a real game server.

No credit card required. Free tier includes the resources to deploy a real game server.

Step-by-Step Guide

Detailed Integration Steps

1. Before you start

  • A free Edgegap account. Verify your email. No credit card is needed to test.

  • An Unreal Engine 5 project with a C++ module (verified on UE 5.5; 5.3 or newer works the same). Blueprint-only project? Add one with Tools → New C++ Class → None first.

  • A working Edgegap app version of your game server: a Linux dedicated server, containerized, with port 7777, UDP, named gameport. Matchmaking deploys the requested version for every match, so it needs a functional, containerized game server to work end to end. If you don't have one yet, use our guide: Unreal Engine.

  • A tested connection: you deployed that version once from the dashboard and joined it from a client with open <IP>:<port> in the console. Don't add matchmaking on top of a server you haven't joined yet: if something breaks later, you'll know it's the matchmaking layer.

  • For the agent path: an Edgegap API token, from Dashboard → User Settings → Tokens. It is organization-wide, so treat it like a password: never put it in your project, your game client or a chat.

2. Connect your coding agent to Edgegap

Skip this step if you're doing everything by hand.

The Edgegap MCP server lets your agent create apps and versions, deploy servers, read logs and generate matchmaker configurations on your account. The edgegap-unreal agent skill gives it the matchmaking and server shutdown files, the config and the known pitfalls.

Claude Code (run in your own terminal, so the token never passes through the chat):

claude mcp add --transport http edgegap https://mcp.edgegap.dev/mcp -H "Authorization: token YOUR_EDGEGAP_API_TOKEN" --scope user

Then install the skills: /plugin marketplace add edgegap/edgegap-agent-skills, then /plugin install edgegap@edgegap. Restart the session.

Cursor, VS Code and other clients that send headers: add https://mcp.edgegap.dev/mcp with the header Authorization: token YOUR_EDGEGAP_API_TOKEN, and install the skills with npx skills add edgegap/edgegap-agent-skills --skill "*".

Claude Desktop: custom connectors can't send the header, so use the local server instead (Node 18+): { "mcpServers": { "edgegap": { "command": "npx", "args": ["-y", "@edgegap/mcp"] } } }. It asks for the token on first use.

Check it works:

"List my Edgegap apps."

Your app and its version should be in the list.

3. Add the matchmaking files to your project

Edgegap publishes two drop-in files in its open-source agent skills repository:

  • EdgegapMatchmakerSubsystem (game clients): measures ping to Edgegap's beacons, creates the matchmaking ticket, waits for a server, then connects. It includes a basic Find Match / Cancel overlay.

  • EdgegapServerSubsystem (dedicated server): when the matchmaker started the server, it stops the deployment once the match is empty.

With your agent, audit first (read-only):

"Look at my Unreal project and tell me how players connect today: the C++ module name, whether there's a Server target, the server default map, and whether anything uses open, ClientTravel, sessions or an OnlineSubsystem. Don't change any files."

Then:

"Add Edgegap matchmaking to this project with the edgegap-unreal skill. Drop in the matchmaker and server subsystems, add the config section to DefaultGame.ini with matchmaking disabled, and confirm the editor target still compiles. I'll give you the matchmaker URL and token once it's created."

By hand:

  1. Copy the four files (.h and .cpp for each) from assets/unreal/Source/ into Source/<YourModule>/.

  2. In Source/<YourModule>/<YourModule>.Build.cs, add "HTTP", "Json", "Sockets", "Slate", "SlateCore" to PublicDependencyModuleNames.

  3. Regenerate the project files and build the editor target.

Both subsystems are off by default: adding the files changes nothing until you turn matchmaking on in step 5. They handle the beacon pings, the ticket, retries, cancelling the ticket if the player quits mid-search, picking the right port, the ClientTravel call and the server shutdown. You write nothing for a first test.

Prefer Blueprints? The Edgegap Integration Kit by Betide Studios, on Fab, supports Edgegap matchmaking with a ready-made Blueprint example.

4. Configure the client

All settings live in Config/DefaultGame.ini, in a section named after your module: [/Script/<YourModule>.EdgegapMatchmakerSubsystem]. Add these lines:

  • bEnabled=False: keep it off until step 5.

  • MatchmakerUrl="YOUR_MATCHMAKER_URL" and AuthToken="YOUR_MATCHMAKER_AUTH_TOKEN": from your matchmaker page in step 5. Keep the URL in quotes, or Unreal cuts it at // and requests fail with "Couldn't resolve host name".

  • Profile=simple-example: the profile name in your matchmaker configuration.

  • PortName=gameport: the port name on your app version.

  • bSendBeaconLatencies=True: only if the profile has a latency rule (the Simple Example does). The matchmaker refuses tickets with values it doesn't expect, so keep this in sync with your configuration.

  • bShowDefaultUI=True: shows the basic Find Match overlay on menu maps. Set it to False once your own menu calls Find Match.

Also add an empty [/Script/<YourModule>.EdgegapServerSubsystem] section. The server stops itself if nobody joins within 5 minutes, or 15 seconds after the last player leaves (NoPlayerTimeoutSeconds, EmptyServerGraceSeconds). This only applies to servers the matchmaker started, so your manual test deployments aren't affected.

The Auth Token is safe to ship in game clients: it can only create and read tickets, not access your Edgegap account. In a public repository, keep placeholders in DefaultGame.ini and put the real values in Config/UserGame.ini, which overrides it, is ignored by Git, and is still packaged into builds.

5. Create your matchmaker

  1. In the dashboard, open Matchmaker, select Create Matchmaker, name it, and select the Simple Example template (what it contains).

  2. Set application.name and application.version to your app and version exactly as they appear in the dashboard. The configuration is refused if the version doesn't exist.

  3. Select Create and Start, then wait until it's ready. A new matchmaker's address can take up to 5 minutes to answer.

  4. Copy the API URL and Auth Token into DefaultGame.ini, and set bEnabled=True.

Check the URL and token before launching the game: curl -H "Authorization: <auth token>" <api url>/locations/beacons. A JSON list of beacons means they work.

With your agent: "Here's my matchmaker API URL and Auth Token. Check they answer, put them in the Edgegap matchmaker settings and turn matchmaking on."

6. Choose your matchmaking rules

Run the step 7 test with the Simple Example first, then tailor the rules to your game. The Simple Example has two:

  • Match size: one team of exactly 2 players, so the matchmaker waits for 2 tickets before starting a server.

  • Latency: players are grouped only if their pings to the same Edgegap location are within 100 ms of each other, and locations above 200 ms are ignored.

Testing alone? Add an expansion so a single player gets a server after 10 seconds: "expansions": { "10": { "match_size": { "min_team_size": 1 } } }. Stop the matchmaker, edit the configuration, and start it again. Remove it before release.

Then add team sizes, skill or rank, game modes, maps, and expansions that relax rules the longer players wait. Genre examples (competitive, cooperative, social, backfill) are in the matchmaking documentation. Every rule except match size needs a matching value in each player's ticket: tell your agent when you add a rule, and it updates the client too.

Matchmaker deployments receive MM_MATCH_ID, MM_MATCH_PROFILE, MM_TICKET_IDS, MM_TEAMS, MM_GROUPS and one MM_TICKET_<id> per player, as JSON strings. Read them with FPlatformMisc::GetEnvironmentVariable to assign teams or check who's joining.

When you ship a new server build, update application.version (Stop, Edit, Start), or matches keep deploying the old build.

7. Test with two players

  1. Make sure no test deployment is still running: the free tier runs one deployment at a time, and a leftover one blocks matchmaking.

  2. Launch two clients side by side: UnrealEditor.exe "<path>\<Project>.uproject" -game -windowed -ResX=960 -ResY=540 -WinX=0 -log, and a second one with -WinX=970.

  3. Select Find Match in both. The status goes from measuring latency to searching, match found, then connecting. Within seconds both clients load into the same server, and the dashboard shows the deployment tagged with both ticket IDs.

  4. Close both clients. About a minute later, the deployment stops on its own.

You can also queue from the console with Edgegap.FindMatch and Edgegap.CancelMatch, or add -FindMatch to the command line. If a ticket gets a server but the client can't connect, the issue is the server, not the matchmaker: deploy the version by hand and test open <IP>:<port> again. On the free tier, the matchmaker stops 3 hours after each start: restart it from the dashboard.

Next Steps

Next Steps

Build your own menu. FindMatch, CancelMatch, GetState and GetStatusText are Blueprint-callable on the Edgegap Matchmaker Subsystem (Get Game Instance Subsystem), and OnStatusChanged fires on every update for your UMG widget. Then set bShowDefaultUI=False.

How the files work. The client fetches Edgegap's beacons and times a TCP handshake to each (best of three, in parallel, 1-second timeout), sends the pings in a ticket keyed by city, polls it every 2 seconds until it's assigned, then travels to the server's IP and the port named in PortName, the same as open <IP>:<port>. Cancel or quit deletes the ticket. On the server, the subsystem sees the matchmaker's MM_MATCH_ID, watches logins, and calls the ARBITRIUM_DELETE_URL Edgegap injects once the match is empty. The Auth Token goes as-is in the Authorization header, with no "Bearer" prefix.

Going live? Ask your agent to run the edgegap-launch skill's checklist, and pick a production matchmaker before launch. Using Epic Online Services? See Epic Online Services.

Stuck? Ask your agent to load edgegap-troubleshoot, or ask our team and other studios on the Edgegap Discord.

Frequently Asked Questions

Common questions about adding Edgegap matchmaking to an Unreal Engine multiplayer game.

Is there an Edgegap matchmaking SDK for Unreal Engine?

Edgegap provides two open-source C++ files you drop into your project instead of a plugin: one for game clients, one for the dedicated server. For Blueprint-first teams, Betide Studios' Edgegap Integration Kit on Fab supports Edgegap matchmaking too.

Can I add Edgegap matchmaking to a Blueprint-only Unreal project?

Yes. Add an empty C++ class to create a C++ module, drop in the files, and call Find Match from Blueprints. Or use Betide Studios' Edgegap Integration Kit, which ships a Blueprint example.

Do I need to change my game mode to use Edgegap matchmaking?

No. Clients connect with Unreal's built-in ClientTravel, the same as typing open with the server's address, so any game that uses standard replication and dedicated servers works as is.

Is the matchmaker Auth Token safe in an Unreal game client?

Yes. It can only create and read matchmaking tickets, not access your Edgegap account. In a public repository, keep the real value in Config/UserGame.ini, which Git ignores and Unreal still packages.

How much does Edgegap matchmaking cost?

Testing is free, on a shared matchmaker that stops 3 hours after each start. For a live game, you choose a production matchmaker, and game servers bill per vCPU per minute only while they run.

Clients

Learn more from clients who integrated Edgegap

31 case studies are available from studios that moved to Edgegap from another platform.

Key reasons why they chose Edgegap

Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.

Cost

Pricing

Optimize costs and performance with hybrid orchestration

Optimize costs and performance with hybrid orchestration

Optimize costs and performance with hybrid orchestration

Edge Cloud

On-Demand

$0.00115

/ vCPU

/ MINUTE

Billed by the Minute, Only on Usage

Pay only when players play. 0 active servers = $0

Deploy game servers worldwide, per instance, to all 615+ edge cloud locations. Zero commitment.

Simply add a credit card.

Edge Cloud

On-Demand

$0.00115

/ vCPU

/ MINUTE

Billed by the Minute, Only on Usage

Pay only when players play. 0 active servers = $0

Deploy game servers worldwide, per instance, to all 615+ edge cloud locations. Zero commitment.

Simply add a credit card.

Private Fleet (Bare Metal)

Reserved Capacity

$0.0282

/ vCPU

/ HOUR

Billed Monthly, Always On

$280 per host/month (12 mo rate), or $350 monthly

Optimize the cost effectiveness of your game server with egress-free hosting of Private Fleets.

Persistent, available 24/7, exclusive to your studio.

Private Fleet (Bare Metal)

Reserved Capacity

$0.0282

/ vCPU

/ HOUR

Billed Monthly, Always On

$280 per host/month (12 mo rate), or $350 monthly

Optimize the cost effectiveness of your game server with egress-free hosting of Private Fleets.

Persistent, available 24/7, exclusive to your studio.

Your bill varies per rate and usage; which can vary per game type, player count, & more.

Your bill varies per rate and usage; which can vary per game type, player count, & more.

Model your usage with our estimate calculator ->

Model your usage with our estimate calculator ->

Edgegap's features & price: detailed comparison between Edge Cloud & Private Fleets

Edgegap's features & price: detailed comparison between Edge Cloud & Private Fleets

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.