Unity Netcode Integration

Gameye + Mirror

Run your Mirror Networking dedicated servers on Gameye's global infrastructure. Containerize your headless Unity server — no plugin, no SDK, no DevOps.

Unity Mirror Dedicated Server No SDK

Mirror is the most widely used open-source networking library for Unity — free, battle-tested in shipped titles, and the de-facto successor to UNET. You build with NetworkManager, [Command] and [ClientRpc], and SyncVars; Mirror handles the client-server transport.

Mirror ships no hosting platform of its own. A Mirror dedicated server is simply your Unity project built as a headless Linux server. Gameye runs that server as a container across its global network, so there is nothing Mirror-specific to integrate. If it exports to Linux and runs in Docker, it runs on Gameye.

How it works
  1. Build your Unity project as a Dedicated Server / headless Linux build with Mirror
  2. Start the server with NetworkManager.StartServer() on its fixed listen port
  3. Wrap the build in a Docker container and push it to a registry
  4. Call the Gameye Session API with your image name and target region
  5. Gameye returns an IP and port in ~0.5 seconds — players connect directly to your Mirror server

Start Mirror in server mode

On a Dedicated Server build, auto-start Mirror so the container begins listening as soon as it boots. The transport (KCP, Telepathy, etc.) owns the listen port — bind a fixed internal port and let Gameye map an external one to it.

C# — ServerBootstrap.cs
using Mirror;
using UnityEngine;

// Attach to a bootstrap object in your server scene.
public class ServerBootstrap : MonoBehaviour
{
    void Start()
    {
        // Only auto-start in Dedicated Server / headless builds.
#if UNITY_SERVER
        // The active transport (kcp2k / Telepathy) binds its own Port field.
        // Keep it fixed (e.g. 7777); Gameye maps an external port to it.
        NetworkManager.singleton.StartServer();
        Debug.Log("Mirror dedicated server listening");
#endif
    }
}

Containerize the server

A Mirror server has no special runtime needs beyond a Linux base. Copy the headless build in, expose the transport port, and set it as the entrypoint.

Dockerfile
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY Build/ /app/
RUN chmod +x /app/MyGameServer.x86_64

# Mirror's KCP/Telepathy default port (UDP for KCP, TCP for Telepathy)
EXPOSE 7777
ENTRYPOINT ["/app/MyGameServer.x86_64", "-batchmode", "-nographics"]

Start a session from your backend

When a match is ready, call the Gameye Session API with your image and a region. Gameye places the server near your players and returns the connection details.

cURL
curl -X POST https://api.gameye.io/session \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "location": "eu-west",
    "image": "your-mirror-server",
    "args": ["-batchmode", "-nographics"],
    "labels": { "matchId": "abc123" },
    "ttl": 3600
  }'

The response returns the host IP and the external port in ~0.5 seconds. Pass those to your players — they connect straight to your Mirror server with no relay hop in the path.


Setup steps

1
Build a Linux dedicated server

In Unity, build for the Dedicated Server platform (or a headless Linux build) with Mirror's NetworkManager in your server scene. Test it locally with -batchmode -nographics before containerizing.

2
Create a Docker image

Wrap the build in a container (see the Dockerfile above) and push it to Docker Hub, GitLab Registry, or any OCI-compatible registry.

3
Get your API token

Start a free Developer Trial — self-serve, no sales call. You'll get an API token, your application name, and available regions.

4
Start sessions

Call POST /session from your backend or matchmaker. Gameye returns an IP and ports; pass them to players, who connect directly to the Mirror server.


Why run Mirror servers on Gameye

No SDK or plugin

Gameye orchestrates at the container level. Nothing goes inside your Unity project — your existing Mirror server build runs unchanged.

No egress fees

$0.07/vCPU/hr is the full compute bill. Bandwidth is included — no per-GB charges as your player count grows.

Sub-second allocation

Sessions start in ~0.5 seconds on average. Players don't wait between "match found" and "server ready".

Provider-agnostic

Servers run across bare metal and multiple cloud providers, placed near your players, with automatic failover between regions.

No DevOps required

No Kubernetes, no Terraform, no fleet provisioning. Push a Docker image and call an API. Your team stays on the game.

Self-serve trial

Get a token, push your image, and run your first Mirror session on Gameye before your next sprint ends.


Frequently asked questions

Do I need a Mirror plugin or SDK to use Gameye?

No. Gameye runs your server as a plain Linux container and manages it externally through a REST API. A Mirror dedicated server is a standard Unity headless build, so there's nothing engine- or library-specific to add. You containerize the build you already produce and call the Session API.

Which Mirror transport should I use?

KCP (kcp2k) over UDP is the common pick for fast-paced games — reliable and unreliable channels with low overhead. Telepathy (TCP) is fully reliable; Simple Web Transport targets WebGL clients. Whichever you choose, your server binds the transport's listen port inside the container (KCP and Telepathy default to 7777) and Gameye maps an external port to it.

Do I need a separate matchmaker?

No. Gameye's Session API is plain HTTP, so any backend can trigger a session — Unity Matchmaker, Nakama, a custom service, or no matchmaker at all. Gameye allocates the server regardless of how you group players.

Can I run other Unity netcode on Gameye too?

Yes — Gameye is netcode-agnostic. Mirror, FishNet, PurrNet, Unity Netcode for GameObjects, and Photon Fusion all deploy the same way: build a Linux dedicated server, containerize it, and call the Session API. The orchestration layer doesn't care which library is inside.

Get started

Start your free trial today.

Sign up, push your Mirror server image, and run your first session before your next sprint ends.