Getting Started with PlayFlow
Step-by-step tutorial for getting up and running with PlayFlow Cloud.
This guide assumes you have some or all of your game already written using FishNet 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.
Before We Begin...
Starting Project
If you don't have a project already setup but want to follow this tutorial, you can use the Getting Started FishNet tutorial project. The files for it can be downloaded here:
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!
Add Tugboat
Select the NetworkManager in your project and add the Tugboat component if it isn't already there (If you are using a different transport, that is also fine).
Enable the Reuse Address checkbox, this will be needed for our server to work correctly.

The other two fields we'll be paying attention to are the Port and Client Address ones. For now you can leave the default settings, we'll remember the port number for later and we'll use the Client Address field in our client build to input the URL of our hosted server.
Manage Auto Start
We will want FishNet to automatically start as a server in the server build we make. FishNet will actually do this by default with the Start On Headless option on the ServerManager. If you disabled this, be sure to manage starting the server itself, or simply re-enable it.
If we have set the NetworkHudCanvas Auto Start Type to something other than Disabled, then we will want to disable it now, since we want our server to only behave as a server.

Once that's all done we can move on to using PlayFlow Cloud!
Deploying Your Game With PlayFlow
Create your PlayFlow account
Now that PlayFlow is installed, let's go to the website and setup our dashboard.
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.
Create a Game Studio
You'll now be prompted to create a Game Studio. Game Studios make it easy to organize your game projects and work smoothly with your team.
Enter a name for studio and select either the Hobby or Pro plan, you can read more about the plan types here. For this tutorial we will be using the Hobby plan, but don't worry, you can always change the plan and even the name after it's created.
Once you've done that, click Create Studio and you'll be good to continue.
Explore the Dashboard
With your new project created and selected, you can check out the PlayFlow dashboard for it.
PlayFlow has a lot of powerful features and makes it very easy for you, the developer of your game, to view the logs, metrics, server details and more. The PlayFlow dashboard can also be used to directly upload your game's server builds and manage server instances.

Once you're done looking around, we'll jump into setting up our server build and running it.
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. Then copy the PlayFlow API Key to your clipboard.
Now go to the Unity Editor and open the PlayFlow window from the Toolbar at PlayFlow → PlayFlow Cloud.
Inside the Token field, paste the PlayFlow API Key you copied.

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, you can 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.
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.

Once those are entered, click the Add Port button to finish this step.
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, we've changed the Name to FishNet Getting Started
, you can of course 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.

Connect to the Server
Click on the Details button to see the details of the server. You can view the Details, Metrics, and Logs of the server here; we will look at the Details → Network section and copy the Host and the External Port fields.

In the Unity Editor, select the Tugboat component (or other transport you may be using).
Take the Next Steps!
Well done! You've now learned how to setup and deploy your server using PlayFlow. If you want to check out more of their features you can checkout their documentation here: https://documentation.playflowcloud.com/
You are also encouraged to join their Discord server here: https://discord.gg/P5w45Vx5Q8
Last updated