Skip to main content

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:
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:
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 Organization & Project

  1. Create an Organization (new orgs start on the Free plan; upgrade to Pro anytime)
  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 a region (required) and a compute size
  5. Click Create Server
Wait for status to change to Running.
On the Free plan, servers run on the small compute size with a 1-hour maximum lifetime, and you can have 1 active server at a time. Choosing a different compute size and longer TTLs (up to 24 hours) requires the Pro plan.
3

Connect Your Client

  1. Click Details on your running server
  2. Copy the Host and External Port for your UDP port (these come from the network_ports[] array in the server API response — read them at runtime, never hardcode)
  3. In your Unity client:
Pass the Host and External Port from PlayFlow into this method.
Do not connect to port 7777. 7777 is the internal port your server binds to inside the container. PlayFlow maps UDP through a proxy and allocates a different external port for clients. Always read the host and external port from the server’s network_ports[] response (or the dashboard Details panel) at runtime — they change per server.

Next Steps

Lobby System

Integrate Unity Lobby Service with PlayFlow

Matchmaking

Add matchmaking to your Netcode game

Server Management

Advanced server management techniques

Success!

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

Common Issues

Ensure NetworkManager exists in your scene and that you’re not trying to access it too early in the Start() method.
  • Verify UDP port 7777 is configured in PlayFlow
  • Check that server is binding to 0.0.0.0 not localhost
  • Ensure firewall rules allow UDP traffic
  • Adjust NetworkTickRate based on your needs
  • Configure Unity Transport reliability settings
  • Use PlayFlow’s server monitoring to identify issues