Deploy Your Unity Netcode Server

This guide assumes you already have a Unity Netcode for GameObjects project and are ready to deploy it on PlayFlow Cloud.
Unity Netcode for GameObjects is Unity’s official high-level networking library, providing a game-centric networking experience.

Video Tutorial

Watch the video above for a complete walkthrough of deploying Unity Netcode for GameObjects on PlayFlow Cloud, or follow the written guide below.

Before We Begin

1

Prerequisites

Ensure you have:
  • An existing Unity Netcode for GameObjects project
  • Unity Netcode for GameObjects package installed
  • NetworkManager configured in your scene
2

Install PlayFlow SDK

Install the PlayFlow SDK via Unity Package Manager:
https://github.com/PlayFlowCloud/PlayFlow-Multiplayer-Unity-SDK.git
For detailed instructions, see the Installation Guide.
3

Install Linux Modules

Install Linux Build Support modules in Unity Hub for server builds.
See Unity Modules Setup for your Unity version.

Configure Netcode for PlayFlow

1

Configure NetworkManager

Ensure your NetworkManager has:
  • Unity Transport component attached
  • Default port set (usually 7777)
  • Network Prefabs configured
2

Add Server Auto-Start

Create a script to auto-start the server in headless builds:
using Unity.Netcode;
using UnityEngine;

public class PlayFlowNetcodeStarter : MonoBehaviour
{
    void Start()
    {
        #if UNITY_SERVER || UNITY_HEADLESS
        NetworkManager.Singleton.StartServer();
        Debug.Log("Unity Netcode server started on PlayFlow");
        #endif
    }
}
Attach this script to a GameObject in your scene.
3

Configure Transport

For the Unity Transport component on NetworkManager:
  • Keep the default port (7777)
  • Server will automatically bind to 0.0.0.0 in headless builds
Unity Transport handles most server configuration automatically when running in headless mode.

Deploy to PlayFlow

1

Create PlayFlow Account

Go to PlayFlow Cloud and sign up or log in.
2

Create Game Studio & Project

  1. Create a Game Studio (Hobby or Pro plan)
  2. Create a new project
  3. Select Unity as the game engine
3

Link PlayFlow SDK

  1. In PlayFlow dashboard, go to API Keys
  2. Copy your PlayFlow API Key
  3. In Unity, open PlayFlow → PlayFlow Cloud
  4. Paste the API key
4

Upload Your Server

In the PlayFlow window:
  1. Select your game scene
  2. Click Upload Server
PlayFlow automatically builds and uploads a headless Linux server.
The build process takes a few minutes. You’ll see a success message when complete.

Configure PlayFlow

1

Configure Network Port

In PlayFlow dashboard:
  1. Go to ConfigurationNetwork Ports
  2. Click Add Port
  3. Enter:
    • Port Name: netcode_game
    • Port Number: 7777
    • Protocol: UDP
  4. Save configuration
2

Create Server

  1. Go to Servers tab
  2. Click Create Server
  3. Select your uploaded build
  4. Choose region and instance type
  5. Click Create Server
Wait for status to change to Running.
3

Connect Your Client

  1. Click Details on your running server
  2. Copy the Host and External Port
  3. In your Unity client:
using Unity.Netcode;
using Unity.Netcode.Transports.UTP;

void ConnectToPlayFlowServer()
{
    var transport = NetworkManager.Singleton.GetComponent<UnityTransport>();
    transport.SetConnectionData("YOUR_SERVER_IP", 7777);
    NetworkManager.Singleton.StartClient();
}
Replace YOUR_SERVER_IP with the Host from PlayFlow.

Next Steps

Success!

Your Unity Netcode server is now running on PlayFlow Cloud! Clients can connect using the server’s public IP and port.

Common Issues