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:
https://github.com/PlayFlowCloud/PlayFlow-Multiplayer-Unity-SDK.git
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.Mirror NetworkManager Settings
5

Configure Transport

Mirror typically comes with KCP Transport by default, which is a UDP-based transport.KCP Transport Settings
Note the port number (default is 7777) - you’ll need this for PlayFlow configuration.
Once that’s all done we can move on to using PlayFlow Cloud!

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)
Click Create Project to proceed.
4

Explore the Dashboard

Your PlayFlow dashboard shows logs, metrics, server details and more.PlayFlow Dashboard
5

Link the PlayFlow SDK to Your Project

Now let’s link our Unity Project to the PlayFlow one we’ve just created.
  1. Open the Overview page in the PlayFlow dashboard
  2. Find the API Keys section and click the View API Keys button
  3. Copy the PlayFlow API Key to your clipboard
  4. In Unity Editor, open the PlayFlow window from the Toolbar at PlayFlow → PlayFlow Cloud
  5. Inside the Token field, paste the PlayFlow API Key you copied PlayFlow SDK Window
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.Add New Port Configuration
  • Port Name: getting_started_udp
  • Port Number: 7777 (Mirror’s default)
  • Protocol: UDP (for KCP Transport)
  • Description (Optional): Optional
Click the Add Port button to finish this step.
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.Create Server DialogA 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.Launching Servers View
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.Server DetailsConfigure your Mirror client with the PlayFlow server details:In NetworkManager:
  • Set Network Address to the Host from PlayFlow (e.g., 123.45.67.89)
In KCP Transport:
  • 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

  1. Enter Play Mode in Unity or build your client
  2. Click Client (not Host or Server)
  3. 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

Next Steps

Common Issues