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 Game Studio & Project
- Create a Game Studio (Hobby or Pro plan)
- Create a new project
- Select Unity as the game engine
3
Link PlayFlow SDK
- In PlayFlow dashboard, go to API Keys
- Copy your PlayFlow API Key
- In Unity, open PlayFlow → PlayFlow Cloud
- Paste the API key
4
Upload Your Server
In the PlayFlow window:
- Select your game scene
- Click Upload 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:
- Go to Configuration → Network Ports
- Click Add Port
- Enter:
- Port Name:
netcode_game
- Port Number:
7777
- Protocol: UDP
- Port Name:
- Save configuration
2
Create Server
- Go to Servers tab
- Click Create Server
- Select your uploaded build
- Choose region and instance type
- Click Create Server
3
Connect Your Client
- Click Details on your running server
- Copy the Host and External Port
- In your Unity client:
YOUR_SERVER_IP
with the Host from PlayFlow.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
NetworkManager is null
NetworkManager is null
Ensure NetworkManager exists in your scene and that you’re not trying to access it too early in the Start() method.
Clients stuck on connecting
Clients stuck on connecting
- 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
High latency or packet loss
High latency or packet loss
- Adjust NetworkTickRate based on your needs
- Configure Unity Transport reliability settings
- Use PlayFlow’s server monitoring to identify issues