Save 20% with WELCOMEView sales
How to Create a FiveM Server: txAdmin Setup (2026)

How to Create a FiveM Server: txAdmin Setup (2026)

Quick answer: to create a FiveM server on Windows, follow the current Cfx.re setup guide: download the latest recommended server, run FXServer.exe for GTAV Legacy or cfx-server.exe for GTAV Enhanced, link txAdmin to your Cfx.re account, create a server key in the Cfx.re Portal, deploy FiveM Basic Server (CFX Default), then save, run, and connect locally.

Choose your setup path first

  • Local learning server: follow the Cfx.re getting-started txAdmin flow; no public VPS or database is required for the CFX Default recipe.
  • Managed game host: use a current Cfx.re-authorized provider when you want the provider to handle the server instance and panel; confirm backups, exports, and support scope.
  • VPS or dedicated host: use the Windows or Linux vanilla guide only if you will own OS patching, firewalling, DDoS planning, backups, monitoring, and recovery.

Do not install ESX, QBCore, Qbox, MySQL, or paid resources until the base server starts and a clean client can connect. Then choose a framework from current documentation and test one dependency layer at a time.

Building a FiveM server means setting up a GTA V multiplayer environment where you and your friends can run custom roleplay scenarios, custom maps, and modified vehicles. This guide walks you through the entire setup: from hardware selection and OS choice to deploying your first QBCore or ESX framework. The official CFX Default recipe makes the first local deployment mostly visual through txAdmin. Total setup time depends on the operating system, network, framework, database, and resource set, so this guide does not promise a fixed duration.

txAdmin dashboard showing the Recipe Deployer with CFX Default FiveM recipe selected
The txAdmin web dashboard makes server management visual — no command-line required.

By the end of this guide you will have:

  • A working local server, or a public server only after you deliberately configure hosting, networking, and firewall access
  • A configured server.cfg with hostname, license key, and resource list
  • A database only when the selected framework or recipe requires one; the CFX Default recipe does not
  • A framework decision based on your required resources and maintained documentation, or the framework-free CFX Default starting point
  • TCP and UDP port 30120 configured only when self-hosting a public server
  • A working txAdmin instance linked to your Cfx.re account

Quick Start — 9 Steps

  1. Choose the deployment path — use a local machine for learning, an authorized managed game host for the shortest hosted path, or a VPS/dedicated host only if you will manage the OS, firewall, backups, updates, and monitoring.
  2. Download the correct FiveM server — use the latest recommended Windows download or the official Linux artifact for Linux. On GTAV Enhanced, the Windows archive and executable use cfx-server_win_x64 and cfx-server.exe instead of the Legacy names.
  3. Start the server and txAdmin — run FXServer.exe for GTAV Legacy or cfx-server.exe for GTAV Enhanced. The browser should open txAdmin automatically; otherwise open http://localhost:40120, enter the console PIN, and link your Cfx.re account.
  4. Create a server key — open the Cfx.re Portal from txAdmin, create and copy the key, then paste it into the Recipe Deployer.
  5. Finish the base recipe — for the CFX Default recipe, complete the deployer and use the generated server.cfg. Do not add a framework, database adapter, or paid resources until the clean base server starts and a client can connect.
  6. Add a database only if required — follow the selected framework recipe and database-library documentation. Use a dedicated least-privilege user and test a backup restore before launch.
  7. Choose a framework only after the base test — keep CFX Default for a framework-free server, or deploy an actively maintained ESX, QBCore, or Qbox recipe whose dependencies match the resources you intend to use.
  8. Configure public networking only if needed — a self-hosted public server normally needs TCP and UDP 30120 allowed in both the operating-system and provider firewalls. A local learning server does not need public exposure.
  9. Connect — open the FiveM client, press F8, and run connect <your-server-ip>:30120.

The clean CFX Default recipe is the shortest path. A public roleplay server takes longer because hosting, networking, framework dependencies, database work, resources, security, and restore testing are separate tasks.

Prerequisites & System Requirements

Capacity-planning example

  • CPU: Intel i5-8400 / AMD Ryzen 5 2600 (6+ cores recommended)
  • RAM: 16GB DDR4 (32GB for 64+ slot servers)
  • Storage: 100GB SSD minimum (NVMe preferred for script loading)
  • Network: 1Gbps connection with 10TB+ monthly bandwidth
  • OS: Windows Server 2019+ or Ubuntu 20.04+ LTS

Capacity warning: plan from the measured CPU time, memory, storage, network route, database load, and resource set. A hosting label, price, or player count alone does not prove performance.

Familiar with Docker? Check out our Docker-based Tutorial here:

Required Software Dependencies

# Windows Server Setup
# Download and install Microsoft Visual C++ Redistributable 2019
# Install Windows Server with Desktop Experience

# Linux Server Setup (Ubuntu 20.04+)
sudo apt update && sudo apt upgrade -y
sudo apt install curl wget unzip screen -y

Framework Selection: ESX vs QBCore vs QBOX

ESX Framework

  • Best for: Traditional roleplay servers, established communities
  • Advantages: Mature ecosystem, extensive documentation, stable codebase
  • Performance: Lower resource consumption
  • Script Availability: Largest selection of compatible scripts

QBCore Framework

  • Best for: Modern feature-rich servers, new communities
  • Advantages: Active development, built-in optimization, modular structure
  • Performance: Higher resource usage but better scalability
  • Script Availability: Growing ecosystem with frequent updates

QBOX Framework

  • Best for: Performance-focused servers requiring custom solutions
  • Advantages: Optimized core, TypeScript support, modern architecture
  • Performance: Best optimization for 100+ concurrent players
  • Script Availability: Limited but growing rapidly

Framework decision: Cfx.re lists ESX, QBCore, and Qbox for information and says the correct choice depends on the server’s requirements. Start with the framework whose maintained documentation, dependencies, and resource compatibility match the project; use txAdmin recipes where the framework maintains one.


Step-by-Step Server Creation

Step 1: FiveM Server Installation

FXServer console window starting a FiveM server with the Cfx.re PIN and resource load status
FXServer console — the PIN here links txAdmin to your Cfx.re account.
# Create server directory
mkdir fivem-server && cd fivem-server

# Download FiveM server files (Windows)
# Windows: download the latest recommended server.7z from the official Windows artifact listing

# Download FiveM server files (Linux)
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/[BUILD-ID]/fx.tar.xz
tar -xf fx.tar.xz

Replace [BUILD-ID] with the latest build number from FiveM Artifacts.

Current registration path: txAdmin opens the Cfx.re Portal, where you create, copy, and return the server key to the Recipe Deployer. Older Keymaster screenshots are no longer used here.

Step 2: Server Configuration

server.cfg file open in VS Code showing QBCore framework setup with essential resources and oxmysql
A complete server.cfg with QBCore essentials.

Create server.cfg with essential configurations:

# Basic Server Information
sv_hostname "Your Server Name ^7| Custom Framework"
sv_maxclients 48
sv_endpointPrivacy true # Hides player IPs from public reports; it does not hide the server origin

# Server Security
rcon_password "your-secure-rcon-password"
sv_licenseKey "your-cfx-portal-key"

# Performance Optimization
set mysql_connection_string "mysql://username:password@localhost/database"
# Optional: set sv_enforceGameBuild only when a resource requires a documented build
set steam_webApiKey "your-steam-api-key"

# Essential Resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap

# Framework Resources (Choose ONE)
# ESX Framework
ensure es_extended
ensure esx_menu_default
ensure esx_menu_dialog
ensure esx_menu_list

# QBCore Framework 
ensure qb-core
ensure qb-multicharacter
ensure qb-management
ensure qb-smalltalk

# Essential Scripts
ensure oxmysql # or mysql-async for ESX
ensure screenshot-basic
ensure fivem-appearance

Full Guide: How To Configure your Server.cfg

Step 3: Database Setup

oxmysql MySQL connection string configuration in server.cfg with utf8mb4 charset and slow query warning
oxmysql connection string format — note the utf8mb4 charset.

Database choice is framework-specific. Follow the current recipe and database-library documentation, use utf8mb4, create a dedicated least-privilege user, and test backup restoration. Do not claim that every FiveM server requires one database product.

-- Create database
CREATE DATABASE fivem_server;
USE fivem_server;

-- Create dedicated user
CREATE USER 'fivem_user'@'localhost' IDENTIFIED BY 'secure_password123!';
GRANT ALL PRIVILEGES ON fivem_server.* TO 'fivem_user'@'localhost';
FLUSH PRIVILEGES;

Step 4: Framework Installation

ESX Installation

# Clone ESX Legacy (recommended version)
git clone https://github.com/esx-framework/esx-legacy.git
cd esx-legacy
# Import SQL files in correct order:
# 1. legacy.sql
# 2. esx_addons_account.sql 
# 3. esx_property.sql

QBCore Installation

# Download QBCore from official source
git clone https://github.com/qbcore-framework/qb-core.git
# Import qbcore.sql into database
# Configure shared/config.lua with your database details

Essential Resource Categories

Security Resources (Critical)

  • ac_ESX or qb-anticheat: Prevents common exploits
  • screenshot-basic: Enables admin screenshots
  • discord-screenshot: Discord integration for moderation
  • fiveguard: Advanced anti-cheat (paid, recommended for 50+ slots)

Performance Resources

  • oxmysql: Optimized MySQL wrapper (replaces mysql-async)
  • ox_target: Optimized targeting system
  • ox_inventory: Performance-focused inventory system
  • qb-smalltalk: Reduces network overhead

Essential Gameplay Scripts

# Jobs System
ensure esx_jobs # ESX
ensure qb-jobs # QBCore

# Banking System 
ensure esx_atm # ESX
ensure qb-banking # QBCore

# Vehicle System
ensure esx_vehicleshop # ESX 
ensure qb-vehicleshop # QBCore

# Housing System
ensure esx_property # ESX
ensure qb-houses # QBCore

Server Optimization and Performance

Server.cfg Optimization

# Network Optimization
set netsyncs_cullDistanceWalkingPlayerSyncType 100
set netsyncs_cullDistanceDrivingPlayerSyncType 600
set netsyncs_cullDistanceVehicleSyncType 1000

# Entity Culling
set netsyncs_distanceCullVehicles true
set netsyncs_entityCullByDistanceOnDrop true

# Resource Loading
set monitor_maxResourceFPS 60
set monitor_maxResourceTickTime 0.2

# Memory Management
set gc_maxResourceScheduledObjects 5000
set gc_forceResourceGC true

Database Optimization

-- MySQL 8.0 removed the legacy query cache. Do not add query_cache settings.
-- Measure slow queries and tune indexes and InnoDB settings for the actual workload.

-- Optimize connection settings
SET GLOBAL max_connections = 500;
SET GLOBAL innodb_buffer_pool_size = 2147483648;

Common Issues and Solutions

Issue: “Failed to load resource”

Cause: Missing dependencies or incorrect folder structure Solution: Verify fxmanifest.lua syntax and ensure all dependencies are present

Issue: High server ms/lag

Cause: Inefficient scripts or database queries Solution: Use performance monitoring tools:

ensure monitor
set monitor_resourceUsage true

Issue: Players unable to connect

Ubuntu terminal showing ufw firewall rules to allow FiveM ports 30120 TCP and UDP
Open the FiveM ports on the host firewall.

Cause: Firewall blocking FiveM ports Solution: Open ports 30120 (TCP) and 30120 (UDP):

# Ubuntu UFW
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp

# Windows Firewall 
netsh advfirewall firewall add rule name="FiveM" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FiveM UDP" dir=in action=allow protocol=UDP localport=30120

Advanced Configuration

Custom Loading Screen

Create __resource.lua in a custom resource:

fx_version 'cerulean'
game 'gta5'

loadscreen 'index.html'
loadscreen_cursor 'yes'
loadscreen_manual_shutdown 'yes'

files {
 'index.html',
 'style.css',
 'script.js'
}

Discord Integration

# Add to server.cfg
set discord_webhook "YOUR_WEBHOOK_URL"
set discord_botToken "YOUR_BOT_TOKEN"
set discord_guildId "YOUR_GUILD_ID"

ensure Badger_Discord_API

Testing and Quality Assurance

Pre-Launch Checklist

  • [ ] Server starts without errors
  • [ ] Database connections functional
  • [ ] All essential scripts load properly
  • [ ] Framework-specific features work (character creation, jobs, etc.)
  • [ ] Performance metrics under 50ms server time
  • [ ] Security measures active

Load Testing

# Use FiveM's built-in stress testing
connect 127.0.0.1:30120
# Monitor resource usage with multiple test connections

Maintenance and Updates

Automated Backup Script (Linux)

#!/bin/bash
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p /backups/fivem_$DATE
mysqldump -u fivem_user -p fivem_server > /backups/fivem_$DATE/database.sql
cp -r /path/to/fivem-server /backups/fivem_$DATE/
tar -czf /backups/fivem_backup_$DATE.tar.gz /backups/fivem_$DATE/
rm -rf /backups/fivem_$DATE/

Update Management

  • Monitor FiveM Updates weekly
  • Test framework updates on development server first
  • Keep script backups before major updates

Resource Recommendations by Server Type

Roleplay Server Essentials

Racing Server Essentials

  • Vehicle Mods: Car Packs
  • Racing System: Lap timing, leaderboards
  • Tuning: Performance modifications, visual customization

Freeroam Server Essentials

  • Teleportation: Fast travel systems
  • Vehicle Spawning: Admin tools, player menus
  • PvP Systems: Combat enhancements, safe zones

The Next Steps (after Launch)

Legal and Compliance

Important: Monetization must comply with Take-Two Interactive’s policy. Selling in-game currency or gameplay advantages is prohibited.

Acceptable Monetization:

  • Cosmetic items (clothing, vehicle skins)
  • Priority queue slots
  • Custom character slots
  • Discord perks

Performance Benchmarking

Expected Performance Metrics

  • 16-32 Players: 15-25ms server time, 2-4GB RAM usage
  • 32-64 Players: 25-35ms server time, 6-8GB RAM usage
  • 64+ Players: 35-50ms server time, 12+ GB RAM usage

Monitor using:

# Add to server.cfg
set monitor_enableResourceTimeWarning true
set monitor_resourceTimeWarningThreshold 25

Scaling and Growth Strategy

Performance Scaling Checkpoints

  1. 20+ Players: Optimize database queries, enable entity culling
  2. 40+ Players: Upgrade to dedicated database server
  3. 64+ Players: Implement CDN for resource downloads
  4. 80+ Players: Consider server clustering or queue systems

Community Building Resources

Add Custom Mods to your server


FAQ

Technical Setup Questions

Q: What’s the minimum RAM needed for a stable 32-slot FiveM server?

A: 16GB RAM minimum, but 32GB recommended for optimal performance. FiveM servers consume approximately 0.3-0.5GB RAM per concurrent player, plus 4-6GB base system overhead. Servers with extensive MLO maps or vehicle packs require additional 8-12GB RAM allocation.

Q: Can I run a FiveM server on shared hosting or basic VPS?

A: A local machine is suitable for learning, and an authorized managed game host is the shortest hosted path. For a VPS or dedicated host, verify TCP/UDP endpoint access, single-core performance, storage, region, backups, DDoS mitigation, and support scope. Price alone does not predict player capacity.

Q: Why does my server crash when loading certain scripts?

A: Script crashes typically result from:

  • Missing dependencies (check fxmanifest.lua for required resources)
  • Framework incompatibility (ESX scripts on QBCore servers)
  • Unsupported or outdated server artifacts (update to the current latest recommended build from Cfx.re)
  • Memory allocation limits (increase with set sv_maxResourceScheduledObjects 5000)

Run monitor resource to identify problematic scripts consuming >50ms execution time.

Q: How do I fix “Failed to load resource” errors?

A: Systematic troubleshooting approach:

  1. Verify resource folder structure matches fxmanifest.lua
  2. Check dependency loading order in server.cfg
  3. Ensure all required files exist (client/server scripts, SQL files)
  4. Use txAdmin’s server.cfg editor and validator, then start the server and inspect the first concrete error in the FXServer log
  5. Review fxserver.log for specific error details

Framework and Configuration Questions

Q: Should I choose ESX, QBCore, or Qbox for a new FiveM server?

A: QBCore for most new servers due to active development and modern architecture. ESX only if using existing ESX-specific scripts worth $500+. QBOX for 100+ player servers requiring maximum performance optimization. Framework migration costs 40-60 hours of development time.

Q: Can I convert ESX scripts to QBCore automatically?

A: No automated conversion exists. Manual conversion requires:

  • Database schema changes (40+ table modifications)
  • Event system rewrites (esx:QBCore:)
  • Callback function updates
  • Item/weapon ID remapping
  • UI framework changes (es_extended → qb-core)

Budget 8-12 hours per complex script conversion.

Q: What’s the correct MySQL connection string format?

A: Use this exact format:

mysql://username:password@localhost:3306/database_name?charset=utf8mb4

Use the database supported by the selected framework, recipe, and library. Keep utf8mb4, a dedicated user, current backups, and a tested restore path; verify authentication options against that database’s current documentation.

Q: How many resources can I run simultaneously without performance issues?

A: Performance limits by resource count:

  • 50-75 resources: Acceptable for 32-slot servers
  • 75-100 resources: Maximum for 64-slot servers
  • 100+ resources: Requires optimization or 128+ slot dedicated hardware

Monitor with perfmon – keep total resource tick time under 15ms.

Performance and Optimization Questions

Q: Why is my server running at 200+ ms with only 20 players?

A: High server MS indicates:

  • Inefficient database queries (check oxmysql slow query log)
  • Unoptimized scripts (use monitor to identify >20ms resources)
  • Insufficient server specifications
  • Network bottlenecks (check bandwidth utilization)

Target <50ms server time. Disable resource-heavy scripts during peak hours.

Q: How do I optimize database performance for 64+ players?

A: Database optimization checklist:

-- Increase buffer pool size (50% of available RAM)
SET GLOBAL innodb_buffer_pool_size = 4294967296;

-- MySQL 8.0 removed the legacy query cache. Do not add query_cache settings.
-- Capture slow queries before changing global database settings.

-- Optimize connection handling
SET GLOBAL max_connections = 500;
SET GLOBAL thread_cache_size = 50;

Use dedicated database server for 80+ concurrent players.

Q: What causes frequent player timeouts and connection issues?

A: Connection problems stem from:

  • Firewall blocking ports 30120 TCP/UDP
  • Insufficient bandwidth (minimum 100Mbps for 50+ players)
  • Resource overload causing network desync
  • Outdated FiveM client versions
  • DDoS attacks (implement Cloudflare protection)

Test connectivity with telnet your-server-ip 30120.

Monetization, assets, and current rules

Do not rely on a tutorial for a legal conclusion or a fixed list of permitted products. Before monetizing, review the current Creator Platform License Agreement presented by Cfx.re, the official Tebex setup guidance, and the applicable Tebex terms. Cfx.re identifies Tebex as its authorized monetization partner.

Use only assets, music, brands, code, and other content that the server is authorized to distribute and run. Preserve licenses and purchase records, follow each resource’s terms, and obtain qualified legal or tax advice for jurisdiction-specific questions.

Resource and Script Questions

Q: Which scripts are essential for a professional roleplay server?

A: Core essential scripts by priority:

  1. Character creation: fivem-appearance or esx_skin
  2. Job system: Framework-specific job scripts
  3. Banking: esx_banking or qb-banking with ATM locations
  4. Vehicle system: Dealerships, garages, impounds
  5. Housing: Property system with interior support
  6. Inventory: ox_inventory (performance-optimized)
  7. Communication: Phone system, radio, dispatch

Budget $200-500 for quality essential scripts.

Q: How do I identify and remove problematic or resource-heavy scripts?

A: Performance monitoring process:

# Add to server.cfg
ensure monitor
set monitor_resourceUsage true
set monitor_enableResourceTimeWarning true

Review /resources/monitor/ logs weekly. Remove resources consistently exceeding 25ms execution time or 100MB RAM usage.

Q: Can I use free scripts from GitHub safely?

A: High risk. Free GitHub scripts often contain:

  • Backdoors and malicious code
  • Poor optimization causing crashes
  • Outdated dependencies
  • No support or documentation

Audit all code before implementation. Consider paid, vetted alternatives from established marketplaces.

Troubleshooting Common Issues

Q: Players spawn underground or in invalid locations?

A: Spawning issues indicate:

  • Missing spawn point coordinates in database
  • Conflicting MLO interiors
  • Map loading order problems
  • Character position corruption

Reset spawn coordinates:

UPDATE users SET position = '{"x": -269.4, "y": -955.3, "z": 31.2}' WHERE position IS NULL;

Q: Why do vehicles disappear or become invisible?

A: Vehicle persistence problems from:

  • Exceeded entity limits (default 2048 vehicles)
  • Missing stream files in vehicle resource
  • Network synchronization failures
  • Database cleanup scripts removing active vehicles

Implement proper vehicle cleanup with 30-minute inactive timers.

Q: Server randomly restarts or becomes unresponsive?

A: System stability issues typically caused by:

  • Memory leaks in custom scripts
  • Operating system resource exhaustion
  • Hardware overheating or failures
  • Automated restart scripts misconfiguration

Monitor system resources and implement gradual restart warnings for maintenance.

Uncertainty Note: Performance specifications vary significantly based on script quality, player behavior patterns, and underlying hardware configuration – actual requirements may exceed recommendations by 25-50%.

Primary references: use the current Cfx.re server setup guide, txAdmin documentation, and FiveM Native Reference. Recheck them before applying platform-sensitive steps.


Uncertainty Disclaimer: Server performance varies significantly based on script quality, player behavior, and hardware configuration. The specifications provided represent minimum recommendations; actual requirements may be higher.

Source boundary: current Cfx.re setup, framework, command, resource, and monetization references are linked in this guide. Recheck them before Production because platform behavior and agreements can change.

Verification required: run the selected current artifact and recipe in a disposable environment, inspect txAdmin and FXServer logs, connect with a client, test framework-critical flows, and verify backup restoration before launch.

Conclusion

Successfully creating a FiveM server requires careful framework selection, proper resource allocation, systematic optimization, and ongoing maintenance to achieve stable performance and community growth.



Once the server is reachable, use the FiveM server list guide to verify the public listing fields, privacy state and connect path.

4 comments

  1. POSSIBLE DE VOUS CONTACTER POUR que vous puissiez code notre serveur ? je mettrais le prix veuillez me contacter sur mon adresse mail

    1. bitte kann ich ihren server beitreten wenn ja

  2. How can i play this on localhost

  3. Tiffany Rachells

    any help installing thru zap host PLEASSSE

Leave a Reply