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

# FiveM Hosting Guide

> Deploy, configure, and manage your FiveM roleplay server on CrazyNode.

Run a FiveM server on CrazyNode with support for popular frameworks like ESX, QBCore, and custom resources.

## Initial setup

<Steps>
  <Step title="Get your license key">
    Register at [keymaster.fivem.net](https://keymaster.fivem.net) and generate a server license key. Bind it to your CrazyNode server IP.
  </Step>

  <Step title="Enter the license in startup">
    In the panel, open **Startup** and paste your license key into the `sv_licenseKey` variable.
  </Step>

  <Step title="Start the server">
    Click **Start**. The server will download the latest FiveM artifacts on first boot.
  </Step>

  <Step title="Connect via FiveM client">
    Use `connect YOUR_SERVER_IP:PORT` in the FiveM client console.
  </Step>
</Steps>

## Installing a framework

### ESX Legacy

1. Download ESX Legacy from the [official GitHub](https://github.com/esx-framework).
2. Upload the resources into `/resources/[esx]`.
3. Import the SQL schema into your MySQL database.
4. Configure `server.cfg` and add `ensure es_extended`.

### QBCore

1. Clone [qb-core](https://github.com/qbcore-framework) and dependencies into `/resources/[qb]`.
2. Import the QBCore SQL file.
3. Configure connection strings and add `ensure qb-core` in `server.cfg`.

## Editing server.cfg

The `server.cfg` file controls everything about your FiveM server — hostname, tags, resources, and permissions.

```cfg theme={null}
sv_hostname "My CrazyNode FiveM Server"
sv_maxclients 64
sets tags "roleplay, economy"
sets locale "en-US"

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode

sv_licenseKey "YOUR_LICENSE_HERE"
```

## MySQL database

Most frameworks require MySQL. Provision a database from the panel's **Databases** tab, then update `server.cfg`:

```cfg theme={null}
set mysql_connection_string "mysql://user:password@host/database?charset=utf8mb4"
```

<Tip>
  Keep resources updated regularly and remove unused ones to keep server performance high.
</Tip>
