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

# Full Setup Guide

> Take a fresh FiveM server from first boot to online and joinable.

This is the end-to-end path for a brand-new FiveM server on Lumix Solutions. It covers the two things people trip on most - the **txAdmin port** in the Startup tab and the **TCP/UDP endpoints** in `server.cfg` - along with everything around them.

If you just ordered your server and haven't logged in yet, start with the [Quickstart](/quickstart), then come back here.

<Steps>
  <Step title="Grab your ports from the Network tab">
    Open the [Network](/lumi-panel/management/network) tab. Every FiveM server ships with **two allocations**:

    * **Game port** - what players connect to (the default template uses `30120`).
    * **txAdmin port** - usually aliased `tx` or `txadmin`.

    Note both port numbers down. You'll match your Startup variables and `server.cfg` to them in the next steps.
  </Step>

  <Step title="Set your license key and txAdmin port in Startup">
    Open the [Startup](/lumi-panel/configuration/startup) tab. Two variables matter before your first boot:

    * **`FIVEM_LICENSE`** - your Cfx license key. Generate one at [portal.cfx.re](https://portal.cfx.re) tied to **this server's IP** (shown in [Network](/lumi-panel/management/network)), then paste it in.
    * **`TXADMIN_PORT`** - must match the **txAdmin port** from Step 1. If this doesn't match your allocation, txAdmin won't be reachable and the port will be refused on boot.

    <Warning>
      The txAdmin port variable has to equal the txAdmin allocation exactly. A mismatch here is the single most common reason txAdmin "won't load" on a new server - the server boots, but nothing is listening on the port you're trying to open.
    </Warning>
  </Step>

  <Step title="First boot and txAdmin setup">
    Head to the [Console](/lumi-panel/general/console) and hit **Start**. On first boot the console prints a one-time PIN:

    ```text theme={null}
    [txAdmin] PIN to setup the admin account: 1234
    ```

    Open txAdmin in your browser at `http://YOUR_IP:TXADMIN_PORT` (using the txAdmin port from Step 1), enter the PIN, and create your admin account. Save the credentials - the PIN won't be reprinted. Lost it? Run `txaPin` in the console for a fresh one. See [txAdmin](/games/fivem/txadmin) for the full walkthrough.
  </Step>

  <Step title="Fix the TCP/UDP endpoints in server.cfg">
    Open the [Files](/lumi-panel/management/files) tab and edit `server.cfg` in your server root (or use txAdmin's built-in cfg editor). Find the endpoint lines - they tell FiveM which port to listen on, and they **must match your game port** from Step 1:

    ```cfg theme={null}
    endpoint_add_tcp "0.0.0.0:30120"
    endpoint_add_udp "0.0.0.0:30120"
    ```

    If your game allocation isn't `30120`, change **both** lines to your allocated port. On Lumix Solutions these are usually pre-filled to match your allocation - don't change them unless the port is wrong.

    <Warning>
      The TCP and UDP endpoints must use the **same port** as each other, and that port must match your game allocation. A port here that doesn't match your allocation means players can't connect and your server won't list.
    </Warning>
  </Step>

  <Step title="Set your identity and slots">
    While you're in `server.cfg`, set what players see in the server browser:

    ```cfg theme={null}
    sv_hostname "^1Lumix ^7Roleplay"
    sets tags "roleplay, esx, custom"
    sets locale "en-US"
    load_server_icon myLogo.png

    sv_maxClients 64
    set onesync on
    ```

    OneSync is required for anything above 32 slots and for most modern frameworks. See [Server Configuration](/games/fivem/server-cfg) for hostname color codes, banners, and the full breakdown.

    <Note>
      Running **custom EUP**? Without a valid [Cfx subscription](https://portal.cfx.re), your server is capped at **10 players** while custom EUP is loaded. Bump your slots above 10 and you'll need an active Element Club tier - otherwise players past the cap can't connect.
    </Note>
  </Step>

  <Step title="Connect a database (if your framework needs one)">
    ESX, QBCore, and most script packs need a MySQL database. Request one from the [Databases](/lumi-panel/management/databases) tab, then point `oxmysql` at it in `server.cfg`:

    ```cfg theme={null}
    set mysql_connection_string "mysql://USER:PASS@HOST:PORT/DB?charset=utf8mb4"
    ```

    Use the Lumi-Panel database **endpoint**, not `localhost`. Full steps in [Database Setup](/games/fivem/database-setup).
  </Step>

  <Step title="Start your resources and boot">
    List your resources with `ensure`, in dependency order - frameworks and libraries before the scripts that rely on them:

    ```cfg theme={null}
    ensure oxmysql
    ensure es_extended
    ensure my-custom-script
    ```

    `server.cfg` is only read on boot, so restart from the [Console](/lumi-panel/general/console) to apply everything. Your server should now show in the FiveM browser and accept connections.
  </Step>
</Steps>

## Quick checklist

| Setting                                 | Where        | Must match                                      |
| --------------------------------------- | ------------ | ----------------------------------------------- |
| `FIVEM_LICENSE`                         | Startup tab  | Generated against this server's IP              |
| `TXADMIN_PORT`                          | Startup tab  | txAdmin allocation in Network                   |
| `endpoint_add_tcp` / `endpoint_add_udp` | `server.cfg` | Game allocation in Network (same port for both) |
| `mysql_connection_string`               | `server.cfg` | Database endpoint, not `localhost`              |

## If it won't come up

Most first-boot failures are a bad license key, a txAdmin/game port mismatch, or a malformed cfg line. Walk through [Startup Issues](/games/fivem/startup-issues) - it maps the exact console errors to fixes. Server boots but doesn't appear in the list or players can't join? That's [Display Issues](/games/fivem/display-issues).

<Tip>
  Still stuck after that? Sign in to the [Billing Portal](https://billing.lumixsolutions.org) and [open a ticket](https://billing.lumixsolutions.org/submitticket.php) with the last \~50 lines of your console. A real engineer will respond - not a script reader.
</Tip>
