Edgegap Plugin - Automated Game Server Hosting - Unity Tutorial

Hi,

We will cover how to easily set up any Unity project to deploy, and host, dedicated game server directly from Unity’s editor using the Edgegap plugin. As to get your game online and playable, worldwide, in minutes.

We recommend following our documentation.

Let’s get to it.

Part 1 - Setup

Part 1 - Setup

Part 1 - Setup

Before using the plugin, there are three requirements to ensure Unity works for dedicated servers.

First is to download and install Docker, to help containerizing the game server. Docker is used by millions of users and by the world’s largest companies.

The second is to use a long-term support version of Unity (nicknamed “LTS”) as to ensure compatibility of the plugin, but also your development projects in general. As of today (2025.12), the latest release is Unity 6.3 LTS.

Third is make sure Linux server build modules are installed. From Unity’s HUB, select “Manage” and then “Add Modules”. Then, select both “Linux Build Support” modules of “(Mono)” and “(IL2CPP)”, alongside “Linux Dedicated Server Build Support” modules and install them if you haven’t already.

Disclaimer

Make sure to add Edgegap's Unity plugin using the "Add project from Git" to ensure you use the latest version of the project.

  1. Select "Window" then "Package Manager"

  2. Click on the "+" icon, then select "Add Project from Git"

  3. Paste Edgegap's Unity plugin URL: "https://github.com/edgegap/edgegap-unity-plugin.git"

  4. Select "Install"

Part 2 - Edgegap: Game Server Hosting & Orchestration

Part 2 - Edgegap: Game Server Hosting & Orchestration

Part 2 - Edgegap: Game Server Hosting & Orchestration

Now in Unity. 

Load up your project. In our case, we are using the tank sample project from Mirror Networking that is already setup for dedicated game servers. Any project set up for dedicated server will work with Edgegap’s plugin.

The easiest way to add Edgegap’s plugin is through Unity’s Package Manager.

Select “Window”, then “Package Management” and finally select “Package Manager”.

Just in case your project already has a version of Edgegap’s plugin, we’ll first delete the current plugin to ensure we have the latest. Select “Manage” and then “Remove”.

Edgegap’s  plugin is hosted on GitHub. Select the “Code” button and copy the project’s URL to your clipboard.

In Unity, select the “plus” icon in the Package Manager tab, and then “Install package from Git URL”.

Then, paste the URL and select “Install”.

After a few seconds, the Edgegap plugin will automatically be installed. Simply open it under “Tools”.

Click on “Signin to Edgegap” to create a free Edgegap account. Select your sign-in method such as Google or GitHub and create your organization.

This is Edgegap’s dashboard, which we invite you to explore, but for now automatically the platforms provides you with your unique OneClick Token. Copy it by selecting clipboard icon.

Return to Unity. Select “Validate Token”.

The “Build your Game Server” tab opens automatically.

First, you can validate if the Linux server dependencies are functional by selecting “Install”. As we did this earlier, it displays “requirements installed”.

Then, we must ensure our game scene is selected. Under “Unity Build Settings”, select “Edit Settings” and under “Scene List” select the “Add Open Scenes” button. Here as you can see we add Mirror’s Tank scene. Delete any irrelevant scene, like Unity’s default sample here.

Close the tab.

Select “Build Server” which compiles the game server. After a few seconds, the build successfully compiles.

Under “Containerize your Server”, confirm that Docker Desktop is running by selecting “Validate”. If not, open Docker.

We’ll skip all optional parameters for this tutorial, but for power users, details for their use is in our documentation.

Let’s move ahead and select “Containerize with Docker”. After a short period, containerization is successful.

The next step is to test our game server locally. There are additional optional parameters, but for this video, we’ll simply select “Deploy Local Container”.

Once complete, we can confirm it is running locally within Docker Desktop. After you're done, terminate the local deployment.

To make it available online, the next step is to upload the game server to Edgegap’s platform.

Make sure the correct application is selected and click on “Upload Image and Create App Version” button.

After a few seconds, a web browser opens to the platform. This “Create version” page is prefilled, yet you can configure optional settings, including vCPU resource usage, memory and more, but we’ll create a new version with default settings.

Scroll down and select “Submit”.

The “Create Port” pop-up opens up. Here, make sure your netcode’s default port, and protocol type are correct. For Mirror's Tank sample, it is 7777 and UDP. This may be different with other netcodes. As such, make sure to review your netcode’s documentation for the accurate port to your use case.

Click “Submit”.

Back in Unity, we must deploy the actual game server containerized earlier. Select the correct application and its version from the list.

Finally, select “Deploy to Cloud” which automatically deploys the game server to Edgegap’s platform.

After a few seconds of loading, your game server is ready. Congrats, you game is now online for the world to play!

Part 3 - Testing

Part 3 - Testing

Part 3 - Testing

Evidently, test things first. Start by selecting the deployment.

This is your game server’s deployment detail page.

It includes loads of information, but for us to be able to connect to the game server, we’ll scroll down and copy the host URL first.

Launch your game scene and paste the “Host URL”. We’ll also add the unique “External Port” from the detail page.

Select “Client” and as you can see, we’ve successfully connected to the dedicated game server.

Now, not all projects have a UI to input the URL and port within the scene. If that’s the case, when the scene is stopped, select “Network Manager”.

Find the “Network Address” field, whose name can change depending on your netcode. Here, replace “localhost” with the game server’s URL.

Then, find the “Port” field and replace it as well.

Start your scene, and once again we’re able to get the client to join the dedicated game servers.

Once you’re done with testing, make sure to return the Network Editor’s default “localhost” URL and port. Otherwise, you’ll include that information in your future game server if you generate new builds.

Now, multiplayer usually has more than one player. Which we’ll need to simulate.

ParrelSync is an option here, but we’ll use Unity’s “Play Mode”. First, select “Window”, head to “Multiplayer” and open Unity’s “Multiplayer Center”.

New to version 6.3, Unity asks you the game genre and players. Fill out what information is accurate to you.

Here Unity tries to get you to download their multiplayer solutions. In our case, we’ll swap the Netcode to “third party” to avoid adding Unity’s Netcode for Game Objects accidentally. We’ll also exclude Unity’s voice chat.

What is important to install is “Multiplayer Services” and “Multiplayer Play Mode”. Install them.

Make sure any game scene is stopped, and once again select “Window”, then under “Multiplayer” both components are now available. Select “Multiplayer Play Mode”.

Simulate a second player by select “Player 2”. Unity opens up a new editor window for the second player. Arrange your windows so you can see both players.    

Now, the game scene starts in both windows. Once again, we’ll join the game server as clients.

Congratulations, you now have two players playing your game online!

Part 4 - Next Steps

Part 4 - Next Steps

Part 4 - Next Steps

That is all for the Edgegap’s plugin for Unity, which empowers game developers with automated game server and simple hosting.

The likely next step in your game development will be to automatically start and stop servers, and to connect players. For more information on Edgegap’s free, simple and fully automated matchmaker, check out our tutorial.