
This guide shows you how to add on-demand online lobbies to a Unity multiplayer game that already runs on Edgegap's dedicated game servers, with Edgegap's Server Browser: each player reserves a seat and connects to a ready server automatically, with nobody typing an address.
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.
The Server Browser is a hosted service between your players and your servers. Game clients reserve seats through it (1). Each server registers itself, reports its free seats and stays visible with a heartbeat (2). Players then connect straight to the server with your netcode (3). A scaling policy starts servers so there's always capacity (4).

This guide covers:
Preparing a working Edgegap app version for your game
Connecting your coding agent to Edgegap (optional)
Installing Edgegap's Unity SDK
Adding the integration code
Adding the scripts to your scene
Creating your Server Browser
Deploying your server with a scaling policy
Testing with two players
You can do it two ways, and mix them:
With a coding agent. Any AI coding assistant can write the integration code from the two prompts in step 4. Connected to the Edgegap MCP server, it can also build, push and deploy your server. You handle the clicks in Unity and the Edgegap dashboard, and playtest.
By hand. Every step below also works without an agent.
Here, we use Mirror's Billiards example. Any Unity netcode works the same way.
1. Before you start
A free Edgegap account. Verify your email. No credit card is needed to test.
A working Edgegap app version of your game server: a server you deployed and joined at least once. The Server Browser deploys and fills that server, so it needs a functional, containerized game server to work end to end. If you don't have one yet, use our guides:
Edgegap's game server build tool plugin for Unity, from those guides, to rebuild your server in step 7.
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.
Git: Unity needs a Git client (2.14.0 or newer) on your PATH to install packages from a Git URL, such as the Edgegap SDK. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
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 and read logs on your account. Edgegap's agent skills don't cover the Server Browser yet, so the integration code comes from the two prompts in step 4; the skills still help with building and deploying.
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. Install Edgegap's Unity SDK
The Server Browser is part of Edgegap's Unity SDK, a separate package from the plugin that builds and deploys your server.
In Unity, select Window → Package Management → Package Manager, select +, then Add package from git URL, paste
https://github.com/edgegap/edgegap-unity-sdk.gitand select Add.In the SDK's Samples tab, import Server Browser - Auto-Assign. It adds two scripts: a client handler that reserves a seat and hands your game the server's address, and a server handler that registers your server with the Server Browser and reports its free seats.
The SDK does almost everything. Three netcode-specific parts are left to you: the lines that connect the player to the assigned server, a small handshake that tells the server which player joined, and releasing the player's seat when they leave. Step 4 adds them.
4. Add the integration code
Two prompts for any AI coding assistant write that code for your netcode. The video below shows them on Mirror's Billiards example.
Prompt 1, audit your project (read-only):
"Read-only, no code changes. I'm integrating the Edgegap Server Browser (Auto-Assign) in my Unity project: at runtime it gives my client a reserved server's address (an FQDN) and an external port, and my server must confirm each player by a player ID. Find and tell me, with file paths and line numbers: 1) the method that starts a client connection, and the exact fields where the server address and the port are set, plus the transport in use; 2) how my netcode sends a small custom message from client to server and registers a handler for it on the server; 3) the event that fires on the client when it finishes connecting, and whether it's reset when the client starts (so I know whether to subscribe after starting the client); 4) the event that fires on the server when a player disconnects, and how it identifies the connection. Look at the NetworkManager-style class and its transport first. Confirm each against the project."
Prompt 2, write the integration:
"Using the audit, make three changes for the Edgegap Server Browser Auto-Assign integration, without subclassing or replacing my netcode's manager. 1) Create a standalone MonoBehaviour EdgegapPlayerConnector in Assets/Scripts/ (static Instance, DontDestroyOnLoad) with a small network message carrying a string playerId. On the server, register its handler in Start(): store the connection-to-playerId mapping and call ServerBrowserServerHandler.Instance.OnPlayerJoined(playerId). Expose SubscribeClientConnected(), which sends ServerBrowserClientHandler.Instance.LocalPlayerId once the client is connected, safe to call after the client starts. 2) In the sample's ServerBrowserClientHandler.cs, generate LocalPlayerId at runtime (a new GUID) and use it in the seat reservation; when seats are reserved, set the assigned FQDN as the network address, convert the external port to the type my transport expects and set it, start the client, then call SubscribeClientConnected(). 3) On the server, subscribe to the disconnect event from the audit; look up the disconnecting connection's playerId, call ServerBrowserServerHandler.Instance.OnPlayerAbandoned with the signature you read in the SDK source, and remove the entry. Guard against missing entries and a missing handler. Return the complete files."


The audit catches netcode quirks for you. With Mirror, for example, the client-connected event is reset when the client starts, so the connector subscribes after starting the client. Without the seat release, seats leak and the server eventually reports no free seats.
Here's our video tutorial of Edgegap's Server Browser for Unity, using Mirror's Billiards example:
5. Add the scripts to your scene
In Unity, a script does nothing until it's on a game object. In your game scene, select GameObject → Create Empty three times:
Edgegap Player Connector: add the connector script your assistant created.
Server Browser Server Handler: add the Server Browser Server Handler component.
Server Browser Client Handler: add the Server Browser Client Handler component.
Leave the handlers' fields empty for now: they come from step 6.
6. Create your Server Browser
In the Edgegap dashboard, open Server Browser and create one, named for example
quickstart, with the Simple Example configuration.Start it and wait until it's online. On the free tier it runs 3 hours on a shared test cluster after each start, which is fine for testing.
Open its details and copy the API URL, the server token and the client token.
In Unity, paste the API URL and the server token into the server handler, and the same API URL and the client token into the client handler. Swapping the tokens causes connection errors. Save the scene.
The server token can do everything on your Server Browser, so it only belongs in the server running on Edgegap, never on a player's machine. Pasting it into the component keeps this test simple; in production, set it as a variable on your app version instead, which overrides the inspector value and keeps it out of your project. The client token only reserves seats and reads status.

In production, many studios have players sign in to their own player services first, which reserve the seat for them.
7. Deploy your server with a scaling policy
Your server now reads the Server Browser's URL and token, so it needs a new app version: earlier builds don't have them.
Build, containerize and upload your server with Edgegap's plugin, exactly as in your server guide (or Build from source to run all three at once). With your agent: "Build the Linux server, push it with a new tag and create a new app version with the same port."
On your Server Browser, create a scaling policy named
on-demand: Minimum Active Instances set to1, your application and the new version, and Private Hosts empty so it deploys to Edgegap's cloud. Save it as active.Within a minute, the policy deploys your server. Its logs show it registering with the Server Browser, reporting healthy, and discoverable with free seats. Your on-demand lobby is live.
A minimum of one active instance keeps one server running at all times, ready for players. Remember it's running when you're done testing: deactivate the policy to stop it.
8. Test with two players
Run two players with Unity's Multiplayer Play Mode, or the Editor plus a build.
Press Play. Each player reserves a seat, gets the server's address and connects, and the server confirms each player and takes a seat.
Both players land on the same cloud server, each one's actions replicated in the other's window.

A freshly assigned server may still be starting for a moment, so for production add a connection retry: a couple of attempts, a few seconds apart.
Let players choose. Beyond auto-assignment, players can search and browse servers by region, free seats, game mode or any metadata your server reports, and pick one. Scaling policies can also keep spare servers warm for launches, or pin servers to a Private Fleet by adding its host IDs.
Prefer strict rules over player choice? See Unity Matchmaking SDK. On Unreal Engine, the Server Browser works through Betide Studios' Edgegap Integration Kit.
Stuck? Ask our team and other studios on the Edgegap Discord.
Frequently Asked Questions
Common questions about adding Edgegap's Server Browser to a Unity multiplayer game.
What is a server browser in a multiplayer game?
A list of live game servers players can join, with their free seats and settings such as region or game mode. Edgegap's Server Browser is a hosted service: servers register and report their seats, players reserve a seat and connect, and scaling policies start servers as needed.
Should I use a server browser or matchmaking?
Use a server browser when players should pick a server or drop into a running lobby, and matchmaking when your rules should decide who plays together, such as skill or team balance. Edgegap offers both, and they can work together: matchmaking starts servers and the server browser fills them.
Does Edgegap's Server Browser work with Mirror, Netcode for GameObjects and Fish-Networking?
Yes. The Server Browser doesn't depend on your netcode. Only three parts change: connecting to the assigned address and port, sending the player ID to the server, and releasing the seat when the player leaves.
What's the difference between the server token and the client token?
The server token can use every Server Browser method and belongs only in your game server, ideally as an app version variable. The client token only reserves seats and reads status, for game clients or your player services. Neither is your Edgegap API token.
How much does Edgegap's Server Browser cost?
Testing is free, on a shared cluster that runs 3 hours after each start. Servers your scaling policy deploys bill per vCPU per minute while they run, so a minimum of one active instance means one server running at all times.

Clients
Learn more from clients who integrated Edgegap
31 case studies are available from studios that moved to Edgegap from another platform.

A Flawless Global Launch for Rivals of Aether 2
Aether Studios
Learn how Aether Studios quickly added Edgegap and delivered flawless launch & post-launch to their community.
Case Study

Overcome Latency Introduced by VR’s use of WiFi in Competitive Multiplayer
Halfbrick Studios
Discover how Halfbrick successfully launched & maintains a multiplayer-focused Early Access on META Quest's VR platform.
Case Study

MENA’s Social App Adds Online Games
WOLF
Learn how the highly popular MENA-region social app added matchmaking & multiplayer games orchestration easily to WOLF Qanawat.
Case Study

Hybrid Orchestration Keeps Kickoff Tactics Ready for Any Traffic
Birch Games
How hybrid orchestration helped Birch Games handle traffic, pairing egress-free Fleets with the regionless cloud.
Case Study

7 Days Blood Moons
The Fun Pimps & iLLOGIKA
Learn how Illogika dramatically reduced server costs & ensured the online experience the 7 Days to Die franchise expects.
Case Study

Authentic Online Warfare Requires the Ultimate Orchestration
Highwire Games
Learn how Highwire's need for performance required orchestration only Edgegap can deliver.
Case Study

22,000 Reviews, 4.8 Stars, and Infrastructure That Scaled Automatically
Sinn Studios
How a simple, Slack-supported integration got Sinn Studio's hit VR title online fast and keeps it there.
Case Study

Dynamic Server Orchestration
Under NDA - AAA Studio
Discover how one the world's biggest AAA studio improved its peer-to-peer multiplayer experience through edge computing.
Case Study

Near Zero Latency for AAA Fighting Game
AAA Studio - Under NDA
How an unannounced project delivered the lowest lag possible and improved fairness in its 1v1 game.
Case Study

Play Gods with Multiplayer Physics
Squido Studio
Learn how Squido uses Edgegap's highligh optimized game servers to deliver mind-bending & chaotic VR gameplay.
Case Study

A Fully Managed Solutions that Saves Time for Indies Multiplayer VR Horror
Dirty Pearl Studios
Discover how Dirty Pearl Studios saved development time thanks to Edgegap’s easy integration and automated orchestration alongside its Nakama integration.
Case Study

Instant Global Server Deployment for Collaborative XR Medical Education
AlensiaXR
How AlensiaXR uses Edgegap to deliver low-latency, always-available shared anatomy sessions to medical students worldwide.
Case Study

The Lightkeepers: A VR Social Co-op Game with Dedicated Servers
Spectral Games
How Spectral Games used Edgegap Matchmaking and Server Browser to launch dedicated servers for its VR social lobby, with no prior server experience.
Case Study

Fast & reliable deployments worldwide for PvPvE challenger Gravebound
Crater Studios
How Edgegap’s orchestration and matchmaking helped Crater Studios dramatically helped a small them focus on gameplay instead of infrastructure.
Case Study

Rapid Scaling of Web Metaverse
Hiber
Learn how Hiber eliminated the guesswork out of its server capacity planning with Edgegap.
Case Study

High Hardware Requirements & Custom Game Server Pools
Alderon Games
Learn how Alderon Games instantly leverages a custom pool of game servers across multiple providers worldwide for its popular MMO.
Case Study

Easy Integration for Indie Devs
WhaleFood Games
Read how WhaleFood Games "kicked out" its netcode issues with Edgegap.
Case Study

Cutting-edge tech that powers South-East Asia’s first-ever eSports title.
Anantarupa Studios
Learn how Edgegap transformed South-East Asia’s gaming landscape streamlining complex infrastructure and cutting-edge tech with one seamless solution.
Case Study

One Strike. Global Reach.
Triple Hill Interactive
How Triple Hill Interactive leverages Edgegap's orchestration to deliver low latency and improve fairness in a genre where every millisecond counts.
Case Study

Fast-paced Team Battle Royale... with Gun-totting Animal Plushes!
SANDYFLOOR
Discover how a Korea-based Indie Studio launched it multiplayer worldwide.
Case Study

Mobile Horse Racing Goes Global with Instant, Cost-Efficient Servers
Mirai Labs
How Mirai Labs powers Pegaxy Blaze's worldwide multiplayer races with just-in-time server deployment and fractional vCPU to keep cost per player low.
Case Study

Server Management & Distribution
Matrioshka Games
Read how Matrioshka Games were able to ship a Battle Royale in early access with limited ressources.
Case Study

At my Signal, Unleash Hell!
TyGames
Discover how Indie studio TyGames immerses players in third-person gladiatorial combat multiplayer.
Case Study

Instant Worldwide Orchestration
Soliton Interactive
Discover how Soliton Interactive did the impossible… Ship it's first playable as multiplayer!
Case Study

Competitive play with server-side physics ensures ideal sub-50 ms latency
NS7
Discover why solely Edgegap could enable an indie studio to deliver on its vision for a AAA-quality F2P sports gameplay through server-side physics and authority.
Case Study

Regional Deployments for iGaming
X1 Contra 1
X1 Contra 1 delivers real-time PvP casual games to its Brazilian player base through cost-effective hosting & regional deployments, ensuring data and legal compliance.
Case Study

Pay Only When Players Play: Affordable Multiplayer Infrastructure
Meltdown Interactive
How Edgegap helped indie developer Meltdown Interactive Media solve cost-effective scaling and matchmaking without the complexity, so they could focus on building the game.
Case Study

One Edgegap platform, three very different networking profiles
Warped Games
How Warped Games runs a social hub, real-time co-op, and turn-based co-op, all on the same Edgegap deployment API and the same container pipeline.
Case Study

Pool Live Tour Max
RETA Games
Case Study

Korea’s Web3 POP Extraction Shooter Goes Global, Instantly
NDUS Entertainment
How XOCIETY easily added Edgegap orchestration & integrated custom matchmaking working alongside Edgegap Ping Beacons to optimize latency.
Case Study

Multiplayer in Every Dimension
Arcadia.tv
Discover how Arcadia.tv uses Edgegap's edge network to deliver an innovative, team and location-based athletic VR sport.
Case Study

F2P Mobile Fighter Cuts Infrastructure Costs With Just-in-Time Servers
Game Changers Worldwide
How Game Changer Worldwide hosted Rumble Rush's real-time 3v3 PvP globally on mobile.
Case Study
Key reasons why they chose Edgegap
Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.









