> ## 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.

# Overview

> Understand the fundamentals of dedicated game servers and how PlayFlow simplifies hosting and management.

## What is a Dedicated Game Server?

In multiplayer gaming, a **dedicated game server** is an authoritative, standalone server that runs the game logic. Unlike player-hosted games where one player's machine acts as the server (peer-to-peer), a dedicated server runs in a professional data center.

This model is the standard for most commercial multiplayer games because it provides a fair, stable, and secure environment for all players.

**Key Benefits:**

* **Authority & Security**: The server is the ultimate source of truth, preventing common cheats like aimbots or speed hacks that manipulate the game on a player's local machine.
* **Performance & Stability**: Hosted on powerful hardware with high-speed internet, dedicated servers provide a low-latency, reliable connection for all players, unaffected by any single player's network issues.
* **Persistence**: The server can run 24/7, allowing for persistent game worlds that exist even when players are offline.
* **Scalability**: You can spin up as many server instances as you need to handle a growing player base.

```mermaid theme={null}
graph LR
    subgraph Players
        pA[Player A]
        pB[Player B]
        pC[Player C]
    end

    subgraph "PlayFlow Cloud"
        ds(Dedicated Server)
    end

    pA -- TCP/UDP --> ds
    pB -- TCP/UDP --> ds
    pC -- TCP/UDP --> ds
```

## How PlayFlow Manages Game Servers

PlayFlow is a platform designed to completely remove the complexity of managing your own dedicated server infrastructure. We handle the hardware, networking, and scaling, so you can focus on building your game.

The lifecycle of a game server on PlayFlow is simple:

<Steps>
  <Step title="1. Upload Your Build">
    You package your game's server executable and assets into a `.zip` file and upload it to PlayFlow. For Unity developers, our plugin can do this for you automatically.
  </Step>

  <Step title="2. Configure Your Server">
    In the PlayFlow dashboard, you define the network settings for your server, such as which internal ports your server listens on. Each port is either TCP or UDP (a toggle), with a separate TLS checkbox for TCP ports. For example, your server might listen on port `7777` for gameplay traffic. This is the internal port your server binds to — the public port that clients connect on is allocated separately by PlayFlow.
  </Step>

  <Step title="3. Deploy an Instance">
    You can launch a server instance from the dashboard or via an API call. You choose the geographic region (required) and the server size, and PlayFlow handles the rest.
  </Step>

  <Step title="4. Connect Players">
    Each running server returns a `network_ports` array in its API response. Read the `host` and `external_port` values from that array to build your client's connection string — never hardcode a fixed IP or port, since the public port is allocated per instance and differs from your internal listen port.
  </Step>
</Steps>

## PlayFlow Networking Architecture

PlayFlow simplifies networking so you don't have to worry about port forwarding or firewalls. Your server listens on its internal ports, and PlayFlow gives your clients a reachable `host` and `external_port` for each one. How that address is served depends on the protocol:

* **UDP** traffic is routed through PlayFlow's proxy fleet on a dedicated proxy IPv4. Clients connect to the proxy, which forwards traffic to your server on its internal port.
* **TCP** traffic is served directly from your server machine on a shared PlayFlow host (`relay.computeflow.cloud`), with optional Fly-managed TLS when you enable the TLS checkbox.

In both cases the public port is allocated by PlayFlow and differs from your internal listen port, so always read `host` and `external_port` from the server's `network_ports` array rather than assuming a static address.

Here’s how it works:

1. When you deploy a server, PlayFlow returns a `host` and `external_port` for each configured port — a dedicated proxy IP for UDP, or the shared `relay.computeflow.cloud` host for TCP.
2. Your game clients connect using the returned `host` and `external_port`.
3. For UDP, PlayFlow's proxy forwards the traffic to your game server on its internal port. For TCP, clients reach the server machine directly on its allocated port.

```mermaid theme={null}
graph LR
    subgraph "Internet"
        client["Game Client"]
    end

    subgraph "PlayFlow Global Network"
        proxy("Global Proxy")
    end

    subgraph "PlayFlow Data Center"
        server("Game Server<br/>Listens on internal port")
    end

    client -- "Connects to host:external_port" --> proxy
    proxy -- "Forwards UDP traffic" --> server
```

This architecture provides several advantages:

* **Simplicity**: Your server code doesn't need to know its public address — it just listens on its internal port.
* **Managed connectivity**: For UDP, the proxy fronts your server so it isn't addressed directly; for TCP, connections reach the server machine directly on a shared PlayFlow host with optional managed TLS.
* **Scalability**: The proxy fleet handles UDP traffic and scales automatically to distribute load.

## Next Steps

Now that you understand the basics, you're ready to get started.

<CardGroup cols={2}>
  <Card title="Quick Start Guide" icon="rocket" href="/quickstart">
    Follow our step-by-step guide to deploy your very first game server.
  </Card>

  <Card title="Game Servers API" icon="code" href="/unity/game-servers">
    Learn how to programmatically start, stop, and list servers from your game client or backend.
  </Card>
</CardGroup>
