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

# FiveM server.cfg Explained - Full Configuration Guide

> Understand every important line of server.cfg on your FiveM server hosting at Wasabi Hosting - license key, OneSync, game builds, resources, and more.

`server.cfg` is the heart of every FiveM server: it sets your server name, player slots, license key, which resources start, and in what order. This guide breaks the file down line by line so you know exactly what to change and what to leave alone. Edit it through the **File Manager** in the [Wasabi Hosting Game Panel](https://panel.wasabihosting.com) or via [SFTP](/server/file-management).

## A Typical server.cfg

```bash theme={null}
# Network endpoints — keep these as-is
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

# Server identity
sv_hostname "My City RP | Serious Roleplay | discord.gg/mycity"
sets sv_projectName "My City RP"
sets sv_projectDesc "A serious roleplay community with custom jobs and vehicles."
sets locale "en-US"
sets tags "roleplay, economy, custom"

# Player slots
sv_maxclients 48

# License & API keys
sv_licenseKey "cfxk_xxxxxxxxxxxxxxxxxxxx_xxxxx"
set steam_webApiKey "YOURSTEAMWEBAPIKEY"

# Core settings
set onesync on
sv_enforceGameBuild 3095
sv_scriptHookAllowed 0

# Resources — order matters
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap

# Permissions (see the Add Admins guide)
add_ace group.admin command allow
add_principal identifier.fivem:1234567 group.admin
```

## Line-by-Line Breakdown

### Network Endpoints

`endpoint_add_tcp` and `endpoint_add_udp` tell FXServer which IP and port to listen on. FiveM uses port **30120** (both TCP and UDP) by default. On Wasabi Hosting these are pre-configured to match your allocated port — don't change them unless support tells you to, or the server will fail to bind.

### Server Identity

| Setting               | Purpose                                                     |
| --------------------- | ----------------------------------------------------------- |
| `sv_hostname`         | The name shown in the in-game server list                   |
| `sets sv_projectName` | Project name shown prominently in the modern server list UI |
| `sets sv_projectDesc` | Short description shown under the project name              |
| `sets locale`         | Your server's primary language (e.g. `en-US`, `de-DE`)      |
| `sets tags`           | Comma-separated keywords players can filter by              |

### Player Slots

`sv_maxclients` sets the maximum number of players. Values above 48 require OneSync (see below). Keep the slot count realistic for your plan's resources — more slots means more CPU and RAM usage.

### License Key

`sv_licenseKey` is **required** — the server won't start without a valid key. Generate one for free at the [Cfx.re Keymaster](https://keymaster.fivem.net) (sign in, click **New server**, register your server's IP, copy the key). One key is valid for one server at a time.

### Steam Web API Key

`set steam_webApiKey` is optional but recommended: it enables **Steam identifiers** for players who launch through Steam, which many admin and whitelist scripts rely on. Create a free key at [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey).

### OneSync

`set onesync on` enables OneSync, FiveM's modern entity synchronization system. It's required for more than 48 players (up to 2048 slots) and expected by virtually all modern frameworks and scripts. Leave it on unless a legacy resource explicitly requires otherwise.

### Enforced Game Build

`sv_enforceGameBuild` locks the server (and connecting clients) to a specific GTA V DLC build — for example `2802` (The Criminal Enterprises), `2944` (San Andreas Mercenaries), or `3095` (The Chop Shop). Newer builds unlock newer vehicles, weapons, and map content, but every resource that references DLC content must support the build you pick.

### Script Hook

`sv_scriptHookAllowed 0` blocks clients from using ScriptHookV-based single-player mod menus on your server. **Keep this at `0`** — allowing it opens the door to client-side cheating.

### Resource Start Order

Each `ensure resource_name` line starts a resource at boot. Resources start **top to bottom**, so dependencies (framework core, database connector) must appear before the scripts that use them. See [Install Resources](/games/fivem/install-resources) for details.

### Permissions Preview

`add_ace` and `add_principal` lines define admin permissions using FiveM's ACE system — for example granting `group.admin` access to commands and assigning players to that group by identifier. This is covered fully in the [Add Admins guide](/games/fivem/add-admins).

## Applying Changes

Changes to `server.cfg` take effect only after a **server restart**. Save the file, then restart from the Game Panel or from txAdmin.

## Common Mistakes

<AccordionGroup>
  <Accordion title="Editing server.cfg while the server is running">
    Nothing breaks, but nothing happens either — the file is read once at startup. Always restart after saving. Some hosting setups also regenerate or cache configs, so verify your change survived the restart by checking the file again.
  </Accordion>

  <Accordion title="Missing or invalid license key">
    The most common startup failure. The console will show an authentication error and the server stops or stays unlisted. Re-copy the key from the [Keymaster](https://keymaster.fivem.net) with no extra spaces or quotes, and make sure it isn't already in use on another server.
  </Accordion>

  <Accordion title="Wrong resource order">
    If scripts error with "attempt to index a nil value" or can't find framework exports, a dependency probably starts too late. Move framework and database resources (e.g. `oxmysql`, `es_extended`, `qb-core`) above everything that depends on them.
  </Accordion>

  <Accordion title="Duplicate or conflicting settings">
    Recipes sometimes leave duplicate lines behind. If a setting doesn't seem to apply, search the whole file — the last occurrence usually wins.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Install Resources" icon="puzzle-piece" href="/games/fivem/install-resources">
    Add scripts, MLOs, and vehicles with the correct load order.
  </Card>

  <Card title="Add Admins" icon="user-shield" href="/games/fivem/add-admins">
    Full guide to ACE permissions and txAdmin admins.
  </Card>
</CardGroup>

<Card title="Need more headroom for your city?" icon="rocket" href="https://wasabihosting.com/game-servers/fivem">
  FiveM hosting from **€4.80/month** on Ryzen 7950X3D/9950X hardware — upgrade any time and keep all your files.
</Card>
