Skip to content

FiveM Setup

Get your FiveM roleplay server online with txAdmin, framework support, and custom resources. This guide covers setup, framework installation, resource management, and performance optimization.


PlanBest ForPlayer Capacity
StarterBeta tests, whitelist-only servers~16-24 players
ProEstablished RP communities with moderate scripts~32-48 players
PremiumHeavy economies, custom cars/MLOs, priority support~64-96 players

  1. Create your server

    Go to panel.mambahost.comCreate ServerFiveM

  2. Get your license key

    Register at keymaster.fivem.net and generate a server key

  3. Deploy and access txAdmin

    After deployment, find your txAdmin URL and credentials in the console

  4. Complete txAdmin setup

    Follow the wizard to configure your server name, framework, and resources

  5. Start the FXServer

    Launch from txAdmin and verify players can connect


  1. Download ESX from the official repository

  2. Upload to /resources via SFTP

  3. Import the SQL schema into your database

  4. Configure server.cfg — ensure ESX loads before dependent resources

  5. Add database credentials to your configuration

  1. Download QBCore and its dependencies (qb-core, qb-menu, qb-target, etc.)

  2. Upload to /resources via SFTP

  3. Run database migrations using the provided SQL files

  4. Update server.cfg with proper load order

  5. Configure qb-core/config.lua with your server settings


Resources must load in the correct order in server.cfg:

# 1. Database (always first)
ensure oxmysql
# 2. Framework core
ensure es_extended
# OR ensure qb-core
# 3. Framework dependencies
ensure esx_menu_default
ensure esx_menu_dialog
# 4. Core systems
ensure esx_identity
ensure esx_society
# 5. Jobs and features
ensure esx_policejob
ensure esx_ambulancejob
# 6. Third-party resources
ensure custom_hud
ensure custom_inventory

Enable OneSync for more players and better synchronization:

# In server.cfg
set onesync on
# For Infinity mode (64+ players)
sets onesync_enableInfinity 1

All FiveM plans include MySQL access.

  1. Get credentials from your panel or request via support

  2. Configure connection string in server.cfg:

    set mysql_connection_string "mysql://user:password@localhost/database?charset=utf8mb4"
  3. Import your framework’s SQL schema

  4. Test the connection — check console for database errors on startup


RecommendationWhy
Remove unused resourcesEach ensure adds load, even if stopped
Schedule restarts every 6-12 hoursClears memory from long sessions
Store data in MySQL, not JSONReduces disk I/O
Use CDN for static assetsFaster client downloads
Monitor with resmon 1Identifies slow resources

ProblemSolution
ESX is nil / QBCore is nilFramework not loading — check load order in server.cfg
Resource not foundMissing dependency — install required resources
Database connection failedVerify credentials and connection string format
Players stuck on loadingCheck for missing assets, clear cache, verify CDN URLs
Voice not workingEnsure port 30120 UDP is open; check voice resource config

  1. txAdmin Console — Real-time logs and errors
  2. Server Console — In your control panel
  3. citizen-server.log — In txData/logs/ folder
SCRIPT ERROR: @es_extended/server/main.lua:142: attempt to index a nil value

This tells you:

  • Resource: es_extended
  • File: server/main.lua
  • Line: 142
  • Error: Something expected data but got nothing