Getting Started with Mirror on PlayFlow
This guide assumes you have some or all of your game already written using Mirror and are now ready to use PlayFlow to implement a dedicated server. You can also use PlayFlow throughout the development process as its one-click deployment makes it easy to setup a temporary server for testing.Mirror is a high-level networking library for Unity that makes multiplayer game development easy with its clean API and battle-tested architecture.
Before We Begin
1
Starting Project
If you don’t have a project already setup but want to follow this tutorial, you can use one of Mirror’s included examples like Tanks or Pong.
Mirror comes with several ready-to-use examples. The Tanks and Pong examples are great starting points for testing multiplayer functionality.
2
Install the PlayFlow SDK
Now that we’re ready to start, let’s install PlayFlow Cloud. You can directly import it with the following git URL:Simply add this through the Unity Package Manager and you’ll be ready to continue!
If you need more detailed instructions for this step, check out the Installation Guide.
3
Add the Necessary Unity Modules
Ensure your Unity installation has the correct modules for building a server. Install the Linux Build Support modules for your Unity version in the Unity Hub.
Exact details on the required modules depending on your Unity version can be found in the Unity Modules Setup guide.
4
Configure Network Manager
Select the NetworkManager in your project. Make sure Auto Start Server Build is checked - this will automatically start the server in headless builds.

5
Configure Transport
Mirror typically comes with KCP Transport by default, which is a UDP-based transport.

Note the port number (default is 7777) - you’ll need this for PlayFlow configuration.
Deploying Your Game with PlayFlow
1
Create Your PlayFlow Account
Go to the PlayFlow Cloud website and sign-up using your email, or log in with your GitHub or Google account. If asked, confirm your email address to complete the setup.
2
Create a Game Studio
Create a Game Studio to organize your game projects.
- Enter a studio name
- Select Hobby or Pro plan
- Click Create Studio
You can change the plan and name later. Pro plans include team collaboration features.
3
Create a New Project
Click Create New Project and enter:
- Project Name: Your game name
- Game Engine: Unity
- Game Type: Choose what fits (or Other)
4
Explore the Dashboard
Your PlayFlow dashboard shows logs, metrics, server details and more.

5
Link the PlayFlow SDK to Your Project
Now let’s link our Unity Project to the PlayFlow one we’ve just created.
- Open the Overview page in the PlayFlow dashboard
- Find the API Keys section and click the View API Keys button
- Copy the PlayFlow API Key to your clipboard
- In Unity Editor, open the PlayFlow window from the Toolbar at PlayFlow → PlayFlow Cloud
-
Inside the Token field, paste the PlayFlow API Key you copied
6
Build and Upload the Server
You can now customize the other settings in the PlayFlow Cloud window, such as the Development Build or Server Scene.When you’re happy with those, press the Upload Server button to have PlayFlow automatically build and upload a headless Linux server build of your game. This will take a brief moment, and then you will have a log in the editor console saying the build uploaded successfully.If needed, you can browse the files of the build and delete it directly from the PlayFlow Dashboard under the Builds tab; pressing the View Builds button in the PlayFlow window will open this directly for you.
7
Setup the PlayFlow Port
Now we will setup the port to use in the PlayFlow dashboard. Open up the website and head to the Configuration tab and then Network Ports section. Click the Add Your First Port button and fill in the fields.

- Port Name:
getting_started_udp
- Port Number:
7777
(Mirror’s default) - Protocol: UDP (for KCP Transport)
- Description (Optional): Optional
8
Create the Server
Now we are ready to start our server, head over to the Servers tab and click the Create Your First Server button.
A window will pop-up letting you customize the settings for this server. You can change the Name to “Mirror Game Server”, or choose any name you like as well as customizing the other settings to better suit your needs. Once you are happy, press Create Server.You should now see the server in the Servers tab and you can see its details or stop it directly from here.


9
Connect to the Server
Click on the Details button to see the details of the server. Look at the Details → Network section and copy the Host and External Port.
Configure your Mirror client with the PlayFlow server details:In NetworkManager:

- Set Network Address to the Host from PlayFlow (e.g.,
123.45.67.89
)
- Set Port to the External Port from PlayFlow
Alternative: If using NetworkManagerHUD, you can enter these values at runtime in Play Mode instead of setting them in the Inspector.
10
Test the Game
- Enter Play Mode in Unity or build your client
- Click Client (not Host or Server)
- Your game should connect to the PlayFlow server!
Debugging Tips:
- Check the PlayFlow dashboard logs to see server console output
- Ensure your firewall isn’t blocking the connection
- Verify the transport and port settings match between client and server
Take the Next Steps!
Well done! You’ve now learned how to setup and deploy your Mirror server using PlayFlow.Resources
- PlayFlow Documentation: documentation.playflowcloud.com
- PlayFlow Discord: discord.gg/P5w45Vx5Q8
- Mirror Documentation: mirror-networking.gitbook.io
- Mirror Discord: discord.gg/mirror
Next Steps
Lobby System
Add lobbies to your Mirror game
Matchmaking
Implement matchmaking for competitive play
Programmatic Access
Manage servers via API
Common Issues
Server not starting automatically
Server not starting automatically
Ensure your auto-start script is attached to a GameObject in your scene and check for
UNITY_SERVER
or UNITY_HEADLESS
preprocessor directives.Clients can't connect
Clients can't connect
- Verify the port is correctly configured in PlayFlow (7777 for default Mirror)
- Check that your transport matches between client and server
- For KCP, ensure UDP protocol is selected in PlayFlow
- Ensure firewall rules aren’t blocking connections
NetworkManager is null
NetworkManager is null
Make sure NetworkManager.singleton is set. This usually means the NetworkManager component needs to be in your scene before trying to access it.