> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playflowcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start - Fish-Net

> Step-by-step tutorial for getting up and running with PlayFlow Cloud

# Getting Started with PlayFlow

<iframe width="100%" height="400" src="https://www.youtube.com/embed/TyvBHUlYP64" title="Fish-Net on PlayFlow Cloud Tutorial" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen />

***

## Written Tutorial

This guide assumes you have some or all of your game already written using Fish-Net 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.

<Info>
  This guide is based on the [official Fish-Net PlayFlow tutorial](https://fish-networking.gitbook.io/docs/guides/server-hosting/services/playflow-cloud/getting-started-with-playflow). Visit their guide for additional details.
</Info>

## Before We Begin

<Steps>
  <Step title="Starting Project">
    If you don't have a project already setup but want to follow this tutorial, you can use the Fish-Net getting started tutorial project.

    <Card title="Getting Started Project" icon="download" href="https://github.com/maxkratt/fish-networking-getting-started/releases/download/using-syncvars-to-sync-colors/using-syncvars-to-sync-colors.unitypackage">
      Download the Fish-Net tutorial project files
    </Card>
  </Step>

  <Step title="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!

    <Info>
      If you need more detailed instructions for this step, check out the [Installation Guide](/guides/installation).
    </Info>
  </Step>

  <Step title="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.

    <Info>
      Exact details on the required modules depending on your Unity version can be found in the [Unity Modules Setup](/guides/unity-modules) guide.
    </Info>
  </Step>

  <Step title="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.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/tugboat-reuse-address.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=5ca17f778357cf1d134f8ecf1eb85b75" alt="Tugboat Reuse Address Setting" width="606" height="446" data-path="images/fishnet/tugboat-reuse-address.png" />

    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 (7770) for later.
  </Step>

  <Step title="Manage Auto Start">
    We want Fish-Net to automatically start as a server in the server build. Fish-Net 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 you have set the NetworkHudCanvas Auto Start Type to something other than **Disabled**, then you will want to disable it now, since we want our server to only behave as a server.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/autostart-type.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=a9e6118b75f3ce89c3e1ebda7e244aac" alt="Setting Auto Start Type to Disabled" width="1918" height="518" data-path="images/fishnet/autostart-type.png" />
  </Step>
</Steps>

Once that's all done we can move on to using PlayFlow Cloud!

## Deploying Your Game with PlayFlow

<Steps>
  <Step title="Create Your PlayFlow Account">
    Go to the [PlayFlow Cloud website](https://app.playflowcloud.com/) 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.
  </Step>

  <Step title="Create an Organization">
    You'll now be prompted to create an Organization. Organizations hold your projects and let you collaborate with teammates.

    Enter an organization name and click **Create Organization**. Every new organization starts on the **Free** plan, which is perfect for this tutorial. You can read more about the plan types [here](/fundamentals/plan-instance-types). When you're ready for more capacity, you can upgrade to **Pro** at any time from your organization's billing settings.

    <Info>
      You can invite teammates and manage Team Collaboration from your organization settings once it's created, on either plan.
    </Info>
  </Step>

  <Step title="Create a New Project">
    Now that you've created your first Organization, you'll be prompted to choose it and then we can move forward with creating a new project.

    Click the **Create New Project** button and enter the details of your project:

    * **Project Name**: Give your project any fitting name you'd like
    * **Game Engine**: Select **Unity** as the Game Engine

    Click **Create Project** to proceed.
  </Step>

  <Step title="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.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/dashboard.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=b278241c17cd324ec680bbd98d4e50a5" alt="PlayFlow Dashboard" width="1918" height="926" data-path="images/fishnet/dashboard.png" />

    Once you're done looking around, we'll jump into setting up our server build and running it.
  </Step>

  <Step title="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

           <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/sdk-window.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=4ac5ead0e25d9c889bde05388db26a7b" alt="PlayFlow SDK Window" width="606" height="517" data-path="images/fishnet/sdk-window.png" />
  </Step>

  <Step title="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.
  </Step>

  <Step title="Setup the PlayFlow Port">
    Now we will setup the port to use in the PlayFlow dashboard. Open up the website, go to the project **Settings** tab, then the **Configuration → Network Ports** section. Click the **Add Port** button and fill in the fields.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/add-port.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=182bebd09b7b10a66c0f6a636ef05c47" alt="Add New Port Configuration" width="562" height="632" data-path="images/fishnet/add-port.png" />

    * **Port Name**: We can enter a simple name for it here, we'll just call ours `getting_started_udp`
    * **Port Number**: This field should be filled in with the port we have entered in our Transport's Port field. Since we are using Tugboat, the default is `7770`, so enter that now
    * **Protocol**: This is the protocol used by your transport, Tugboat uses UDP, so leave that as the option
    * **Description (Optional)**: This field is optional and self-explanatory

    Once those are entered, click the **Add Port** button to finish this step.
  </Step>

  <Step title="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.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/start-server.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=5d451192209e900b554206565e3d08b1" alt="Create Server Dialog" width="688" height="865" data-path="images/fishnet/start-server.png" />

    A window will pop-up letting you customize the settings for this server. You can change the **Name** to "Fish-Net Getting Started", 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.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/launching-servers.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=dad30ded62235272a3f189c97d3d9f22" alt="Launching Servers View" width="1382" height="397" data-path="images/fishnet/launching-servers.png" />
  </Step>

  <Step title="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.

    <img src="https://mintcdn.com/playflow/xqejJlsQi8e5RWr4/images/fishnet/server-details.png?fit=max&auto=format&n=xqejJlsQi8e5RWr4&q=85&s=54e15b6d99554736fec13ce21189502e" alt="Server Details" width="783" height="831" data-path="images/fishnet/server-details.png" />

    In the Unity Editor, select the Tugboat component (or other transport you may be using):

    * Enter the IP Address you copied from the **Host** field into the Transport's Client Address field
    * Enter the **Port** you copied into the Transport's Port field
  </Step>

  <Step title="Test the Game">
    You can now run the game or build and run it and connect as a client. Your game should connect to the PlayFlow server we setup and work correctly!
  </Step>
</Steps>

## Take the Next Steps!

Well done! You've now learned how to setup and deploy your server using PlayFlow.

## Resources

* **PlayFlow Documentation**: [docs.playflowcloud.com](https://docs.playflowcloud.com/)
* **PlayFlow Discord**: [discord.gg/P5w45Vx5Q8](https://discord.gg/P5w45Vx5Q8)
* **Fish-Net Documentation**: [fish-networking.gitbook.io](https://fish-networking.gitbook.io/docs/)

## Next Steps

<CardGroup cols={3}>
  <Card title="WebGL Deployment" icon="globe" href="/quickstart/fishnet-webgl">
    Deploy Fish-Net for web browsers
  </Card>

  <Card title="Lobby System" icon="users" href="/unity/lobby-overview">
    Add Fish-Net compatible lobbies
  </Card>

  <Card title="Matchmaking" icon="shuffle" href="/unity/matchmaking">
    Implement ranked matchmaking
  </Card>
</CardGroup>
