Tanks is one of Mirror's example games: players drive tanks around an arena and shoot each other. Edgegap's sample builds it for the browser (WebGL) and runs every match on its own dedicated game server.
Mirror and the Tanks game don't change: the sample keeps Mirror's SimpleWebTransport and the original scene, and adds a few optional scripts. Turn them on and players click Find Match instead of typing a server address.
Edgegap's matchmaker groups the players, then starts a server for them. Edgegap's network spans 615+ Edge Cloud locations (learn more), and each server is deployed to the best available location for its players. The browser connects over secure WebSockets, and the server stops itself when the match is empty.
Clone the sample: Mirror Tanks (WebGL) sample on GitHub
Full guide: add Edgegap to your own Mirror game with the Mirror Networking integration guide. For every browser-specific step, see the Unity WebGL guide.
Platforms: WebGL client in the browser; Linux dedicated server. Unity 6.3 LTS (6000.3.11f1), Mirror 86.13.4. Tanks is part of Mirror, under the MIT licence.
How it works
A player opens the game in the browser and clicks Find Match. The client sends a ticket to Edgegap's matchmaker.
The matchmaker groups 2 to 4 players. Browsers can't ping, so it places the server from the players' public IPs.
Edgegap starts the Tanks server near them. The server listens for WebSockets on port 7778, and Edgegap's TLS Upgrade puts a certificate in front of it.
Each client gets the server's host name and external port, and connects to
wss://{host name}:{port}, retrying while the server boots.When everyone has left for 30 seconds, or nobody joins within 2 minutes, the server stops its own deployment.
What the sample adds:
Path | What it does |
|---|---|
| Find Match / Cancel panel. Creates the ticket, waits for a server, connects Mirror over |
| Dedicated server only. Reads the variables Edgegap injects and stops the deployment when the match is empty. |
| Ticket attributes. Add fields here for custom matchmaker rules. |
| Turns the scripts on only when Edgegap Unity SDK 3.5.5 or newer is installed. Without it they compile to empty stubs. |
| Keeps the SDK's data classes in IL2CPP builds (WebGL and Linux server). |
| Example matchmaker configuration, profile |

Mirror's Tanks sample in the browser, with its dedicated server on Edgegap.
1. Before you start
A free Edgegap account. No credit card is needed to test.
Unity 6.3 LTS (the sample uses 6000.3.11f1), with Linux Build Support (Mono), Linux Build Support (IL2CPP), Linux Dedicated Server Build Support and Web Build Support added in Unity Hub.
Docker Desktop, running while you build the server.
Clone the sample and open it in Unity. The Edgegap plugin installs with the project.
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 plugin. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
2. Turn on matchmaking
Matchmaking is off by default, so the sample opens and builds without the Edgegap SDK. To turn it on:
First, in Window → Package Manager, select +, then Add package from git URL, and paste:
https://github.com/edgegap/edgegap-unity-sdk.git#3.5.5
Then open the MirrorTanks scene, select the EdgegapMatchmaking object and tick the checkbox next to its name.
Do this before you build the server, so the server includes TanksMatchmakingServer and stops itself when the match is over.
3. Put the game server on Edgegap
Open Tools → Edgegap Server Hosting, connect your Edgegap account, then select Build Server, Containerize with Docker and Upload Image and Create App Version.
In the browser, set the app version's port:
Port 7778, protocol WS, name
gameport.Verifications on and TLS Upgrade on. TLS Upgrade gives the server a secure WebSocket address, so browsers on https:// pages can reach it. You don't need a certificate of your own.
Step 4 of the Unity WebGL guide covers the plugin screens, and the agent option, in detail.
4. Create the matchmaker and play
Edit matchmaker-config.json at the root of the repository:
application.nameandapplication.version: your app and version from step 3.allowed_cors_origins: every address that serves your WebGL build. The example already listshttp://localhost:8080. The browser calls the matchmaker directly, so other origins are blocked.
In the dashboard, open Matchmaker, select Create Matchmaker, upload the file and select Create and Start. When it's ONLINE, copy the API URL and Auth Token into Base URL and Auth Token on TanksMatchmakingClient (on the EdgegapMatchmaking object).
Build for Web in File → Build Profiles, then serve the build folder from an allowed origin:
python -m http.server 8080 --bind 127.0.0.1
Open http://localhost:8080 in two browser windows and click Find Match in each. Bring each window to the front before clicking: background tabs slow Unity WebGL down. Both windows land on the same Edgegap server. A single player gets a server alone after 30 seconds, which helps for testing.
5. Add it to your own Mirror WebGL game
The sample is a working reference: your coding agent can copy its tested files instead of writing them from scratch. These changes make a Mirror WebGL game run with Edgegap's matchmaker:
WebSockets on a fixed port. SimpleWebTransport on port 7778, SSL off on the server,
wsson the client. Headless Start Mode set to Auto Start Server, and the game scene enabled in Build Settings (the sample'sMirrorTanksscene).A matchmaking client. Creates a ticket, waits for its server, then connects to
wss://{host name}:{external port}with retries (Assets/EdgegapMatchmaking/TanksMatchmakingClient.cs). Latency beacons stay off in the browser.A server that stops itself. Stops the deployment when nobody joins or everyone has left, so billing stops (
Assets/EdgegapMatchmaking/TanksMatchmakingServer.cs).SDK and stripping. Edgegap Unity SDK 3.5.5 or newer (older versions fail the WebGL build), and
link.xmlfor IL2CPP.A matchmaker configuration with no latency rule and your origins in
allowed_cors_origins(matchmaker-config.json).
Then upload the server with a WS port and TLS Upgrade, as in step 3.
With your agent:
"Load the edgegap skill, then edgegap-unity. Using github.com/edgegap/netcode-game-sample-webgl-mirror-tanks as the reference, make my Mirror game a WebGL dedicated-server game on SimpleWebTransport port 7778, add the matchmaking client and the server self-stop from its Assets/EdgegapMatchmaking folder, and generate a matchmaker configuration with no latency rule and my web origins in allowed_cors_origins."
For each step in detail, by hand, see the Mirror Networking integration guide, and the Unity WebGL guide for the browser-specific parts.
6. How the matchmaker places players and stops servers
The sample's tanks-webgl profile is built for the browser:
Match size: one team of 2 to 4 players. After 30 seconds in the queue, the minimum drops to 1, so you can test alone. Remove that expansion for a real game.
No latency rule. Browsers can't send the pings that desktop games use to measure latency. The matchmaker places the server from the players' public IPs instead.
Allowed origins.
allowed_cors_originslists the pages allowed to call the matchmaker. Add your real host, for example your itch.io page, before you publish.Abandoned tickets. Browsers can close a tab without telling the game, so an unmatched ticket expires on its own after 5 minutes.
The Auth Token ships in the client build, as with any game using the matchmaker. It gives no access to your Edgegap account.
The server stops its own deployment, which ends billing:
30 seconds after the last player leaves;
when nobody joins within 2 minutes.
When you upload a new server build, update application.version in the matchmaker (Stop, Edit, Start), or matches keep deploying the old build. Step 6 of the Unity WebGL guide covers the matchmaker in detail.
Known limits
Matchmaking is off by default. Out of the box, the sample has no SDK and the EdgegapMatchmaking object is inactive. Follow step 2 to turn it on.
The match never ends on its own. Tanks has no rounds or winner, so the server only stops when it's empty. For your own game, stop the deployment when the match is over.
No latency-based placement in the browser. Servers are placed from player IPs. The client script can measure latency in desktop builds with a
latenciesrule in a separate profile: written but not tested.The solo expansion is for testing. With the example profile, a player who waits 30 seconds plays alone.
What was tested
Tested end to end on Edgegap, twice, before 15 October 2026 (the sample's pull request #1, merged that day), on Unity 6000.3.11f1:
Full loop: two WebGL clients served from
http://localhost:8080, a live matchmaker, and an app version with WS and TLS Upgrade on port 7778. Both clients were matched, connected overwss://to the deployment's external port on the first attempt, and the server stopped itself after both left.Matchmaking off (default): the scene loads with no missing scripts, and the WebGL and Linux server builds succeed.
Matchmaking on (SDK 3.5.5): the WebGL and Linux server builds succeed. Run outside Edgegap, the server logs "Not running on Edgegap, self-stop disabled" and keeps serving.
Not tested: desktop clients with latency beacons, and hosting the WebGL build on itch.io with this sample.
Frequently Asked Questions
Questions about running Mirror's Tanks sample in the browser with Edgegap.
Can a Mirror WebGL game use matchmaking?
Yes. Edgegap's matchmaker works from the browser: the client sends a ticket, the matchmaker starts a dedicated server near the players, and each client connects over wss://. List the pages that serve your game in allowed_cors_origins, and leave out the latency rule.
Which Mirror transport works in the browser?
SimpleWebTransport. The Tanks sample runs it on port 7778, with SSL off on the server and wss on the client. On Edgegap, set that port to WS with TLS Upgrade on, and Edgegap handles the certificate.
Why is matchmaking off in the Tanks sample?
So the sample opens and builds without extra packages. Install the Edgegap Unity SDK (3.5.5 or newer), then activate the EdgegapMatchmaking object in the MirrorTanks scene. Deactivate it to turn matchmaking off again.
Do Tanks servers keep running after a match?
No. The sample's server stops its own deployment 30 seconds after the last player leaves, or after 2 minutes if nobody joins, so you're not billed for empty servers.

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.









