Discover how Edgegap works

Discover how Edgegap works

/

Unreal Engine

Unreal Engine

Deploy to Edgegap

Published

Published

Published

Last reviewed for accuracy

Last reviewed for accuracy

Last reviewed for accuracy

Unreal Engine: How to add dedicated game servers in minutes, and Matchmaking to your multiplayer game

Unreal Engine: How to add dedicated game servers in minutes, and Matchmaking to your multiplayer game

This guide shows you how to add dedicated game servers to an Unreal Engine multiplayer game and host them on Edgegap, then add matchmaking so players are grouped and connected to a server near them automatically.

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.

Unreal's replication is already server-authoritative, so a dedicated server is a natural fit: no player hosts, has a latency advantage, or ends the match by quitting.

This guide covers:

  1. Preparing Unreal, your Edgegap account and Docker

  2. Connecting your coding agent to Edgegap (optional)

  3. Getting your Unreal project ready for dedicated servers

  4. Building and containerizing your game server

  5. Deploying a test server and connecting to it

  6. Adding matchmaking (optional)

  7. Testing the full loop with two players

We suggest building with Edgegap's Docker Extension to save time and resources. Unreal can only build dedicated servers from an engine built from source. The traditional way means downloading and compiling the engine (1 to 3 hours the first time), installing a Linux cross-compile toolchain and packaging the server (about an hour the first time). The Docker Extension builds your Linux server inside Docker instead, from a Launcher install of Unreal, on Windows, macOS or Linux. Both methods are in step 4.

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 edits your project and config, adds the matchmaking and server shutdown code, deploys your server and sets up matchmaking. You click Build in the Docker Extension, handle the Edgegap dashboard, and playtest. Skipping the engine source build also saves your agent hours of build monitoring, and the tokens that go with it.

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

Here, we use Lyra, Epic's multiplayer sample game. Any Unreal multiplayer project works the same way.

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.

  • Unreal Engine 5, installed from the Epic Games Launcher. You only need an engine built from source for the traditional method (step 4, Option B).

  • A C++ project. Blueprint-only projects need a C++ module first: in the editor, select Tools → New C++ Class → None (empty class). Your Blueprints keep working unchanged.

  • Docker Desktop and Edgegap's Docker Extension. Install and start Docker Desktop, then install the Edgegap Docker Extension from Docker's Extensions marketplace.

  • Access to Unreal Engine on GitHub. The extension downloads what it needs from Epic's GitHub organization:

  • 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 tested Unreal workflow, C++ drop-in files for matchmaking and server shutdown, 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."

An empty list is fine. An error about the token usually means the header reads token token ....

3. Get your Unreal project ready for dedicated servers

On Edgegap, no player hosts the match. A headless dedicated server owns the game, so it must start on its own, open your game map, listen on a fixed port and stop when the match is over.

With your agent:

"Load the edgegap-unreal skill and make this project dedicated-server ready. I'll build the Linux server with Edgegap's Docker Extension, so skip the engine source build, the Linux toolchain and RunUAT packaging. Add the Server target, set ServerDefaultMap and the maps to cook, add the DefaultEngine.ini settings from docs.edgegap.com/unreal-engine, and copy the EdgegapMatchmakerSubsystem and EdgegapServerSubsystem files with matchmaking disabled for now. Check that the editor target still compiles."

The skill's default is the traditional source build. Telling your agent you build with the Docker Extension keeps it from starting one.

By hand:

  • Server map. In Project Settings → Maps & Modes, set Server Default Map to the map the server opens, and make sure it's in the list of maps to cook.

  • Engine settings. Copy the DefaultEngine.ini snippet from the Edgegap Unreal docs to the end of Config/DefaultEngine.ini, and put your server target's name in its last line (DefaultServerTarget). It disables Unreal's version check between client and server builds and sets IpNetDriver for replication. Restart the editor.

  • Server target. If Source/<PROJECT>Server.Target.cs doesn't exist, copy <PROJECT>Editor.Target.cs, rename the copy to <PROJECT>Server.Target.cs, and replace every "Editor" with "Server". Then add the server build defaults from the docs, which keep logs in shipping builds.

  • Listen-server habits. The dedicated server replaces the hosting player. Guard code that assumes a local player on the server (HUD, audio, GetFirstPlayerController()) with IsRunningDedicatedServer(), and drop "Host game" from your menu.

  • Stop when the match ends. With Docker Extension builds, call FGenericPlatformMisc::RequestExit on the server when the match is over, and the deployment stops.

Lyra

Lyra already ships LyraServer.Target.cs: add the build defaults to it. In Maps & Modes, set Server Default Map to ShooterGym, and set DefaultServerTarget=LyraServer in the snippet.

4. Build and containerize your server

Edgegap runs your Linux server build inside a container. We suggest Option A: it saves hours on your first build, and your agent's tokens with them.

Option A (recommended): Edgegap's Docker Extension. No engine source build, no Linux toolchain, from any operating system. The video below shows this path with Lyra.

  1. In Docker Desktop, open the Edgegap extension. Enter your project's name and your Edgegap token (select Get Quick Start Token if you don't have one), then select Validate Token.

  2. Select Unreal Engine, then Browse to your project folder and select Create Project. The extension fills in your engine version.

  3. Enter your GitHub username and Personal Access Token from step 1.

  4. Select Validate Configuration. All three checks must turn green.

  5. Keep the default Dockerfile, image name and tag, and select Build Project.

  6. Test locally: pick the new tag, select Start Local Server, then in Unreal run a client (New Editor Window (PIE)) and type open 127.0.0.1:7777 in its console. Stop the local server when it works.

  7. Select Upload Image. In the browser, create the application, keep the default resources, and set the port to 7777, UDP, named gameport. Submit.

Rebuilding later? Select Build Project again with a new tag, then Upload Image.

Option B: the traditional method, from engine source. Use it if your studio already maintains a source build.

  • You need: the engine source from Epic's GitHub (linked as in step 1), Visual Studio 2022 with the C++ game workloads, the Linux cross-compile toolchain matching your engine version, and Docker Desktop.

  • Plan for it: 20 to 60 minutes to download the engine, 1 to 3 hours to build it, and about an hour to package the first Linux server. Later builds take minutes.

With your agent:

"Load the edgegap-unreal skill and follow it from the engine source build: build the engine, package the Linux server, containerize it with the skill's Dockerfile for linux/amd64, push it to my Edgegap Container Registry with a new tag, then create the app and app version with port 7777 UDP named gameport."

The agent asks you to run docker login registry.edgegap.com yourself, with the username and token from the Container Registry page, so those credentials stay out of the chat. Make sure the app version has the registry credentials set: without them, deployments fail with "Unable to pull image from registry".

Use a new image tag for every build, never latest.

Here's our video tutorial of Edgegap's Docker Extension for Unreal Engine, using Lyra:

5. Deploy a test server and connect

Start one server by hand to prove the image, the port and your netcode work before adding matchmaking. Any of these works:

  • From the Docker Extension: under Edgegap Application Version, pick the version you just created, then select Deploy to Cloud.

  • From the dashboard: open your app version in the Edgegap dashboard, select Deploy, pick a location close to you, and deploy.

  • From your agent: "Deploy my latest Edgegap version near me, wait until it's ready, show me the logs, and give me the address and external port."

When the deployment is Ready, copy its Host and External Port. In Unreal, run a client and type open <host>:<external port> in its console. The external port changes on every deployment, so read it each time. The server can take up to a minute after Ready to accept players.

Stop the deployment when you're done (from the extension, the dashboard, or your agent). The free tier runs one deployment at a time, and a forgotten test server blocks matchmaking.

Here, you picked the location and handed out the address. To group players and start a server near them automatically, add a matchmaker.

6. Add matchmaking

Edgegap's matchmaker is a hosted service: players send a ticket, it groups them by your rules (match size, teams, latency, skill, mode), deploys your server near them and returns the address to every client.

With your agent:

"Generate an Edgegap matchmaker configuration from the edgegap-unreal latency template for my app version: one team of 2 to 4 players, a latency rule, and let a lone player get a server after 10 seconds so I can test alone. Save it as matchmaker-config.json."

Then, in the dashboard (this step has no API):

  1. Open Matchmaker and select Create Matchmaker.

  2. Name it, upload matchmaker-config.json, and select Create and Start.

  3. When it's ONLINE, copy the API URL and the Auth Token. The Auth Token is safe to ship in your game client: it gives no access to your Edgegap account.

Back with your agent:

"Turn on the EdgegapMatchmakerSubsystem with my matchmaker API URL and Auth Token, profile casual, beacon latencies on. Check the URL and token answer first."

The matchmaking code runs on clients only, so the server image from step 4 doesn't change. Players get a Find Match overlay, and Blueprints can call Find Match, Cancel Match and On Status Changed from the subsystem for your own menu. In a public repository, keep the real URL and token in Config/UserGame.ini, which Git ignores and Unreal still packages.

By hand: follow the matchmaking documentation, or see Matchmaking for Unreal Engine.

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

7. Test the full loop with two players

  1. Make sure no test deployment is still running.

  2. Run two clients side by side, for example UnrealEditor.exe <your .uproject> -game -windowed -ResX=960 -ResY=540 -WinX=0 -log and a second one with -WinX=970. Launch one alone first: the first launch compiles shaders for several minutes.

  3. Select Find Match in both within 10 seconds. The status goes from searching to match found, then both clients join the same server.

  4. Close both clients. About a minute later, the server stops its own deployment, and it disappears from the dashboard. That self-stop is what keeps your bill at zero when nobody plays.

On the free tier, the matchmaker stops 3 hours after each start (restart it from the dashboard), deployments stop after 60 minutes, and one deployment runs at a time.

Next Steps

Next Steps

Going live? Ask your agent to run the edgegap-launch skill's checklist: version rollouts, restart policy, maximum duration, cost control. Using Epic Online Services for lobbies? 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 hosting an Unreal Engine game on Edgegap's dedicated servers, with or without matchmaking.

Do I need to build Unreal Engine from source for dedicated servers?

Not with Edgegap's Docker Extension. It builds your Linux server inside Docker from a Launcher install of Unreal, which saves hours of engine compiling. Without it, Unreal needs an engine built from source to build Server targets.

Can I build a Linux dedicated server on Windows or macOS?

Yes. Edgegap's Docker Extension builds the Linux server inside Docker on Windows, macOS or Linux, with no Linux cross-compile toolchain to install.

Which port does an Unreal dedicated server use on Edgegap?

Unreal's IpNetDriver listens on 7777 over UDP by default. Set the same port and protocol on your Edgegap app version, named gameport. Players connect to the external port Edgegap assigns to each deployment.

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

Yes. Add an empty C++ class to create a C++ module, then add Edgegap's matchmaking subsystem. Your Blueprints call Find Match and listen to its status from the subsystem.

How much does it cost to host an Unreal Engine game server?

Testing is free, with no credit card. After that, Edge Cloud bills per vCPU per minute only while servers run, so a server that stops at the end of each match costs nothing between matches.

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.