This guide shows you how to host a multiplayer game built with Unity for the browser (WebGL) on Edgegap's dedicated game servers, then add matchmaking so players are grouped and connected to a server near them automatically, and publish it on itch.io.
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.
Browser games have one big difference from desktop games: browsers can't open UDP connections. Your game talks to its server over WebSockets, and a page served over https:// may only use secure WebSockets (wss://). Edgegap's TLS Upgrade gives every server a secure WebSocket endpoint, so you never buy or renew a certificate.
This guide covers:
Preparing Unity, your netcode, your Edgegap account and a containerization tool
Connecting your coding agent to Edgegap (optional)
Getting your game ready for the browser and dedicated servers
Building and containerizing your game server
Deploying a test server and connecting to it
Adding matchmaking (optional)
Building the WebGL client and publishing it to itch.io
Testing the full loop in two browser tabs
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, builds and containerizes the server, deploys it and writes the matchmaking code. You handle the clicks in Unity, the Edgegap dashboard and itch.io, and playtest.
By hand. Every step below also works without an agent.
We use Edgegap's Mirror WebGL sample, built on Mirror's Tanks example and Unity 6.3 LTS. Any Unity game with a WebSocket transport works the same way.
1. Before you start
A free Edgegap account. Verify your email. No credit card is needed to test.
Unity Engine with the Linux and Web build modules installed. Edgegap recommends an LTS version.
Add these modules from Unity Hub: Linux Build Support (Mono), Linux Build Support (IL2CPP), Linux Dedicated Server Build Support and Web Build Support. Restart Unity after adding them.
The sample uses Unity 6.3 LTS. On Windows, Unity 6 may also ask for the Linux toolchain package (
com.unity.toolchain.win-x86_64-linux) the first time you build for Linux.
A netcode with a WebSocket transport, working on localhost. We recommend Mirror and its SimpleWebTransport: its WebGL path is verified end to end with Edgegap's matchmaker. To start from our sample, download or clone the Mirror WebGL sample.
A containerization tool, running. We recommend Docker Desktop, installed and running while you build.
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, read logs and generate matchmaker configurations on your account. The agent skills give it the tested Unity workflow, including WebGL, C# templates, the Dockerfile 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 game ready for the browser and dedicated servers
On Edgegap, no player hosts the match. A headless dedicated server owns the game, starts on its own, listens on a fixed port and stops when the match is over. For a browser game, that port speaks WebSockets.
How the connection works:
The server runs plain WebSockets (
ws) on a fixed port, 7778 for Mirror's SimpleWebTransport. It needs no certificate: leave SSL off on the server.Edgegap's TLS Upgrade adds the secure layer in front of it, with a certificate for the server's host name.
The client connects with
wss://to the deployment's host name (not its IP, or the certificate check fails) and its external port.
With your agent:
"Load the edgegap-unity skill and make this project a dedicated-server WebGL game: SimpleWebTransport on 7778 with SSL off on the server and wss on the client, server builds start headless on 0.0.0.0, players spawn when clients connect, and the server stops itself when the match ends. Install Edgegap SDK 3.5.5, add the server lifecycle and matchmaking client scripts with the Mirror adapter and link.xml. Then check it still works locally with one server and one client."
By hand, on Mirror:
On your NetworkManager, replace KCP Transport with Simple Web Transport, port 7778. Set Headless Start Mode to Auto Start Server.
Install the Edgegap SDK: in Window → Package Manager, select +, then Add package from git URL, and paste
https://github.com/edgegap/edgegap-unity-sdk.git#3.5.5. Version 3.5.5 or newer is required: older versions fail the WebGL build.Keep the SDK's data classes in IL2CPP builds with a
link.xmlfile (the sample includes one inAssets/EdgegapMatchmaking).In server builds, start the server, never a host, and spawn players when clients connect. Set
Application.targetFrameRate(30 to 60) on the server, or the headless build spins a CPU core at 100%.
Other netcodes: Fish-Networking's Bayou transport works the same way (see Fish-Networking). Netcode for GameObjects can use Unity Transport with WebSockets, but that path isn't verified on Edgegap yet: test it early.
Test locally first: one Editor as the server, one as a client. Don't containerize a game that doesn't work on localhost.
4. Build and containerize your server
Edgegap runs your Linux server build inside a container. Use either option, or both.
Option A: Edgegap's automated game server build tool plugin for Unity.
In Window → Package Manager, select +, then Add package from git URL, and paste
https://github.com/edgegap/edgegap-unity-plugin.git. If your Mirror version already includes the plugin (Assets/Mirror/Hosting/Edgegap), skip this: installing it twice duplicates its scripts.Open Tools → Edgegap Server Hosting, sign in, and paste the token it gives you under Connect your Edgegap Account. Select Validate Token.
Select Build Server, then, with Docker running, Validate and Containerize with Docker.
Select Upload Image and Create App Version. In the browser, set the port: 7778, protocol WS, name
gameport, and turn on TLS Upgrade. The plugin pre-fills 7770/UDP named "Game Port": change all three. Submit.
Option B: ask your agent.
"Build the Linux dedicated server, containerize it with the edgegap-unity Dockerfile for linux/amd64, push it to my Edgegap Container Registry with a new tag, then create the app and app version with port 7778, protocol WS, named gameport, with TLS Upgrade on."
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.
5. Deploy a test server and connect
Start one server by hand to prove the image, the port and TLS Upgrade work before adding matchmaking. Any of these works:
From the plugin: choose your app and version, 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, check the WebSocket port answers with HTTP 101, show me the logs, and give me the host name and external port."
When the deployment is Ready, copy its Host URL and External Port. In your client's NetworkManager, set Network Address to the Host URL, set Simple Web Transport's client to use wss on that External Port, then press Play and select Client. The external port changes on every deployment, so read it each time.
If the server logs First bytes from client was not 'GET' for handshake, instead was 16-03-01, TLS Upgrade is off on the port: turn it on in a new app version.
Stop the deployment when you're done (Stop Last Deployment in the plugin, or ask your agent). The free tier runs one deployment at a time, and a forgotten test server blocks matchmaking.
6. Add matchmaking
Edgegap's matchmaker is a hosted service: players send a ticket, it groups them by your rules (match size, teams, skill, mode), deploys your server near them and returns the address to every client.
Two rules for browser games:
No latency rule. Browsers can't send the latency pings desktop games use. The matchmaker places the server from the players' locations instead.
List your origins. Put every web address that serves your game in
allowed_cors_origins, or the browser blocks the matchmaker's replies. For local tests and itch.io:http://localhost:8080,https://YOUR-NAME.itch.ioandhttps://html-classic.itch.zone.
With your agent:
"Generate an Edgegap matchmaker configuration for my WebGL app version: one team of 2 to 4 players, no latency rule, a lone player gets a server after 30 seconds, and these allowed origins: http://localhost:8080, https://YOUR-NAME.itch.io, https://html-classic.itch.zone. Save it as matchmaker-config.json."
The sample also includes a matchmaker-config.json ready to edit: set application.name and application.version to your app version.
Then, in the dashboard (this step has no API):
Open Matchmaker and select Create Matchmaker.
Name it, upload
matchmaker-config.json, and select Create and Start.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 in Unity: in the sample, activate the EdgegapMatchmaking object in the MirrorTanks scene, and set Base URL and Auth Token on TanksMatchmakingClient. Or ask your agent: "Put the matchmaker API URL and Auth Token on the matchmaking client with latency beacons off, wire my Play button to FindMatch, then rebuild and push the server and create a new app version."
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. Build the WebGL client and publish it to itch.io
In Player Settings → Publishing Settings, set Compression Format to Gzip and turn on Decompression Fallback, so the build loads on hosts like itch.io.
In File → Build Profiles, select Web, then Build. Or ask your agent to run the skill's WebGL client build.
To test locally, serve the build folder from an allowed origin, for example
python -m http.server 8080 --bind 127.0.0.1, and openhttp://localhost:8080.To publish, zip the build folder. On itch.io, select Upload new project, set Kind of project to HTML, upload the zip and tick This file will be played in the browser. Save, then open the page.
Your itch.io page origins must be in the matchmaker's allowed_cors_origins (step 6).
8. Test the full loop in two browser tabs
Make sure no test deployment is still running.
Open your game in two browser tabs or windows, locally or on itch.io. Bring each to the front before clicking: background tabs slow Unity WebGL down.
Select Find Match in both. The status goes from searching to match found to host assigned, then both tabs connect to the same server.
Leave the match. The sample's server stops its deployment 30 seconds after the last player leaves, or after 2 minutes if nobody joins. 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.
Building for desktop or mobile too? See Unity Engine and Mirror. Another browser game? See Godot Engine for Godot's web export, or Manus AI for games built with Manus.
Going live? Ask your agent to run the edgegap-launch skill's checklist: version rollouts, restart policy, maximum duration, cost control.
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 a Unity WebGL multiplayer game on Edgegap's dedicated servers.
Can a Unity WebGL game connect to a dedicated server?
Yes, over WebSockets. Browsers can't open UDP connections, so use a WebSocket transport such as Mirror's SimpleWebTransport. The server runs as a Linux dedicated server build, and the browser connects to it with wss://.
Do I need an SSL certificate for my game server?
No. Turn on TLS Upgrade on the server's WebSocket port: Edgegap handles the certificate for the server's host name. Your server runs plain WebSockets, and clients connect with wss:// to the host name.
Why does my WebGL game fail to reach the matchmaker?
The browser blocks requests from origins the matchmaker doesn't allow. Add every address that serves your game, such as http://localhost:8080 and your itch.io page, to allowed_cors_origins in the matchmaker configuration.
Which netcode works best for Unity WebGL multiplayer?
Mirror with SimpleWebTransport is the path verified end to end with Edgegap's matchmaker, and Edgegap's sample uses it. Fish-Networking's Bayou transport also works. Netcode for GameObjects can use WebSockets, but test it early.
Can I host a multiplayer game on itch.io?
itch.io hosts your game's web page, not its server. Publish the WebGL build on itch.io and run the dedicated server on Edgegap; players connect from the page with wss://. Testing on Edgegap is free, with no credit card.

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.









