Unity Netcode Integration

Gameye + PurrNet

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

Unity PurrNet Dedicated Server No SDK

PurrNet is a free, open-source (MIT) Unity networking solution built around simplicity — you call Instantiate() and Destroy() the way you already do, and PurrNet handles the networking, with no special spawn calls. Everything is configured through a single NetworkManager component.

PurrNet ships no hosting platform of its own. A PurrNet dedicated server is simply your Unity project built as a headless Linux server — PurrNet even has a Build Server button for it. Gameye runs that server as a container across its global network, so there is nothing PurrNet-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 (Linux) build with PurrNet
  2. Have the NetworkManager start as a server on its fixed transport 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 PurrNet server

Start PurrNet in server mode

The simplest path needs no code: on the PurrNet NetworkManager, set the Start Server Flags to start in server builds, so the container begins listening the moment it boots. Prefer to control it yourself? Call StartServer() on a Dedicated Server build instead. Either way, bind a fixed internal port on your transport — Gameye maps an external one to it.

C# — ServerBootstrap.cs (optional, if you start it in code)
using PurrNet;
using UnityEngine;

// Optional: only needed if you'd rather start the server from code than via
// the NetworkManager's "Start Server Flags". Attach to a bootstrap object.
public class ServerBootstrap : MonoBehaviour
{
    [SerializeField] private NetworkManager _networkManager;

    void Start()
    {
        // Only auto-start in Dedicated Server / headless builds.
#if UNITY_SERVER
        // Your transport binds its own listen port — keep it FIXED inside the
        // container; Gameye maps an external port to it.
        _networkManager.StartServer();
        Debug.Log("PurrNet dedicated server started");
#endif
    }
}

Containerize the server

A PurrNet server needs nothing beyond a Linux base. Copy the headless build in, expose your transport's 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

# Expose whatever port your PurrNet UDP transport is configured to listen on.
# Match this to the transport's Port field; Gameye maps an external port to it.
EXPOSE 5000/udp
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-purrnet-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 PurrNet server with no relay hop in the path.


Setup steps

1
Build a Linux dedicated server

In Unity, use PurrNet's Build Server button (a Dedicated Server / headless Linux build) with your NetworkManager configured. 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 PurrNet server.


Why run PurrNet servers on Gameye

No SDK or plugin

Gameye orchestrates at the container level. Nothing goes inside your Unity project — your existing PurrNet 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 PurrNet session on Gameye before your next sprint ends.


Frequently asked questions

Do I need a PurrNet 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 PurrNet 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 PurrNet transport should I use?

UDP (reliable and unreliable) is the usual pick for fast-paced games; WebSockets for browser clients; Steam for Steam-distributed titles; Composite to accept several at once. Whichever you choose, your server binds the transport's listen port inside the container, and Gameye maps an external port to it — so set a fixed internal port and let Gameye handle the external mapping.

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. PurrNet, FishNet, Mirror, 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 PurrNet server image, and run your first session before your next sprint ends.