
How to Add Dedicated Servers to PurrNet Netcode with Edgegap's Plugin
This tutorial covers how to deploy and host a dedicated game server for your PurrNet project, directly from Unity's editor, using PurrNet's built-in Edgegap Game Server integration — so you can get your game online and playable, worldwide, in minutes.
We use PurrNet's Incremental Sample, a small resource-collecting game that already ships set up to run as a dedicated server. Any PurrNet project set up for dedicated servers works the same way.
We also recommend following our documentation.
Let's get to it.
Part 1 - Setup
Before integrating Edgegap, a few requirements make sure Unity can build and containerize a dedicated server.
First, install Docker Desktop, which we use to containerize the game server. Docker is used by millions of developers and by the world's largest companies. Keep Docker running whenever you upload a new server build.
Second, make sure Git is available. On older versions of Unity you need Git installed on your system, since PurrNet fetches the Edgegap addon through a Git URL; Unity 6.3 onwards includes it.
We use Unity 6.3 LTS with the Linux Dedicated Server Build Support modules installed through Unity Hub in this tutorial.
Part 2 - Edgegap: Game Server Hosting & Orchestration
Load up your project. PurrNet manages its Edgegap integration through its own package window, so there's nothing to download from a browser. Head to the top toolbar, select "Tools", then "PurrNet", and open the "PurrNet Packages" window.
Before adding Edgegap, make sure PurrNet itself is up to date. If the window shows an available update at the top, next to "Core", select "Update All" and let it finish.
Then, under the "Integrations" section, select "Edgegap", and select "Install Release". PurrNet installs Edgegap's Unity plugin into your project automatically.
Tip: If the installation completes but the progress window doesn't close on its own, trigger a PurrNet package refresh, for example, switching a package version, which clears it.
PurrNet also adds an auto-configuration setting to your transport. Select your "Network Manager": note the "Start Server Flags", which we return to before testing. On the "UDP Transport" component you'll find a setting labelled "Auto Setup Edgegap Server Port". Leave it enabled. It detects when your build is running inside an Edgegap environment and automatically sets the correct server port on your behalf. The client still configures its own connection, but the server side is handled for you.
Now, build the game server. Select "Tools" and open "Edgegap Server Hosting".
The first step is to retrieve an Edgegap token. Select "Get a Token"; a browser window opens. Sign in or create an account using your preferred SSO provider, then, if prompted, enter an organization name. Once you're in the dashboard — which we invite you to explore — copy the token from the pop-up window. Back in Unity, paste it into the token field and select "Validate Token". Once validated, the "Build your Game Server" tabs open.
Confirm your Linux dependencies are installed. If they aren't, return to Unity Hub, and under "Installs" select "Manage" for your Unity version and install all three modules: the "Linux Build Support" modules for both IL2CPP and Mono, and the "Linux Dedicated Server Build Support" module.
Select "Build Server" to compile your Linux dedicated server. After a short wait, the build completes.
Next, containerize the build using Docker. While you can run the container locally to test the server on your own machine, we go straight to testing online and skip that step.
The second-to-last step is to upload your app version to Edgegap's platform. You can change your app's name, server name, and tags; we keep the defaults here. Select "Upload image and Create app version". Once the upload finishes, the platform opens in your browser to your new version. You can edit your resource allocation, but we leave the defaults for now. Scroll down and select "Submit".
The "Create a Port" window opens. You can set a custom port — 5000 is PurrNet's default — but we keep the default of 7777 to exercise the "Auto Setup Edgegap Server Port" setting mentioned earlier. Set the protocol your game uses, here UDP, give it a name like "gameport", and select "Submit". Port numbers and protocols may differ with other netcodes, so review your netcode's documentation for the values that apply to your project.
Finally, back in Unity, deploy the game server directly to Edgegap's hosting from the plugin. Select the correct app and version, then select "Deploy to Cloud". After a few seconds of loading, your game server is ready — you've deployed your first game server.
Part 3 - Testing
From the game server's detail page, scroll down and copy the "Host", which is your connection address.
Back in Unity, select the Network Manager. The sample has no in-scene menu to host or join; it decides automatically based on the Network Manager's start flags, and in the editor it would normally start as a host. To join the cloud server as a client instead, under "Start Server Flags", uncheck "Editor" so the editor no longer starts its own server.
Then, on the transport, find the "Address" field and paste your game server's address. For the port, return to the deployment detail page, copy the "External" port, and enter it in PurrNet's "Server Port" field.
Start your scene. The editor connects to the dedicated game server running on Edgegap.
Multiplayer usually has more than one player, which we simulate next. ParrelSync is one option, but we use Unity's Play Mode. Select "Window", then "Multiplayer", and open Unity's "Multiplayer Center". New to version 6.3, Unity asks for your game genre and player count — fill in whatever is accurate for your project. Unity will offer its own multiplayer solutions here; since we use PurrNet, remove all options except "Multiplayer Play Mode", which simulates players locally.
Once installed, select "Window", then "Multiplayer", and open "Multiplayer Play Mode". Enable a second player, and Unity opens a new editor window. Arrange the windows and start the game scene. Both players join your Edgegap game server as clients, and each player's movements are replicated in the other's world.
You now have two players playing your game online.
Part 4 - Next Steps
That is all for PurrNet's Edgegap integration, which gives game developers the ability to build dedicated servers and host them automatically, worldwide.
The likely next step in your game's development is to automatically start and stop servers and connect players into matches. For more on Edgegap's free, simple, and fully automated matchmaker, see our matchmaker tutorial.
You can also join our community Discord to ask our dev team and other studios for help with your integration.







