Menu
 

FiveM Dedicated Server Setup Guide 2025 - txAdmin Installation

FiveM Dedicated Server Setup Guide 2025

Setting up your own FiveM dedicated server allows you to create a custom GTA V roleplay experience. This guide covers installation, configuration, and optimization for a smooth multiplayer server.

📋 Quick Overview

  • Server Requirements: Windows or Linux, 8-64GB RAM depending on player count
  • Framework: ESX or QBCore (recommended)
  • Management: txAdmin web panel included
  • Database: MySQL for persistent player data
  • License: Free Cfx.re key for non-commercial use

Prerequisites

Hardware Requirements

ComponentMinimum (32 players)Recommended (64+ players)
CPU4 cores @ 3.0 GHz8 cores @ 3.5 GHz
RAM8 GB32 GB
Storage100 GB SSD200 GB NVMe SSD
Network100 Mbps upload1 Gbps upload
OSWindows 10/11 64-bitWindows Server 2019/2022 or Ubuntu 22.04 LTS

Software Prerequisites

  • GTA V: Legitimate copy of Grand Theft Auto V (Steam or Epic Games)
  • FiveM Account: Free account at Cfx.re Keymaster
  • MySQL Server: For player data and economy (optional for testing, required for production)
  • Git: For cloning framework repositories

Step 1: Obtain Cfx.re License Key

  1. Visit Cfx.re Keymaster
  2. Create a free account or log in
  3. Navigate to "Servers"
  4. Click "New Server"
  5. Enter server name and select "Non-Commercial" (free)
  6. Copy your Server License Key

Commercial License: For monetized servers, you'll need a commercial license. Follow the licensing guidelines at fivem.net/license.

Step 2: Download FiveM Server Files

Windows Installation

  1. Download the latest FiveM Artifact from Cfx.re Artifacts
  2. Extract to a dedicated folder (e.g., C:\FiveMServer)
  3. Run FXServer.exe once to generate initial files
  4. Close the server when prompted

Linux Installation (Ubuntu/Debian)

# Create server directory
mkdir ~/fivemserver
cd ~/fivemserver

# Download latest FiveM artifact
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/fx.tar.xz

# Extract files
tar -xvf fx.tar.xz
mv fx.tar.xz server/

Step 3: Configure txAdmin

txAdmin is included with FiveM and provides a web-based management panel.

  1. Navigate to your FiveM server directory
  2. Locate txAdmin folder
  3. Edit txAdmin/data/config.json:
{
  "licenseKey": "YOUR_LICENSE_KEY_HERE",
  "serverName": "My FiveM Server",
  "locale": "en",
  "masterAccount": "your_email@example.com"
}
  1. Start the server: FXServer.exe
  2. Open browser to http://localhost:40120
  3. Complete txAdmin setup wizard
  4. Set your admin username and password

txAdmin Features

  • Server start/stop/restart
  • Player management and bans
  • Console and log viewer
  • Resource management
  • Automated backups
  • Performance monitoring

Step 4: Install a Roleplay Framework

Option A: ESX Framework (Recommended for Beginners)

# Navigate to resources directory
cd ~/fivemserver/server/resources

# Clone ESX framework
git clone https://github.com/ESX-Org/esx_legacy.git [esx]

# Clone additional ESX resources
git clone https://github.com/ESX-Org/esx_policejob.git [esx]/policejob
git clone https://github.com/ESX-Org/esx_ambulancejob.git [esx]/ambulancejob

Option B: QBCore Framework (Recommended for Advanced Users)

# Navigate to resources directory
cd ~/fivemserver/server/resources

# Clone QBCore framework
git clone https://github.com/qbcore-framework/qb-core.git [qbcore]

# Clone QBCore resources
git clone https://github.com/qbcore-framework/qb-clothing.git [qbcore]/clothing
git clone https://github.com/qbcore-framework/qb-vehicleshop.git [qbcore]/vehicleshop

Step 5: Configure server.cfg

Edit the server.cfg file in your FiveM directory:

# Only change the IP if you're using a VPN
setr sv_hostname "My FiveM Roleplay Server"
set sv_maxplayers 64
set sv_licensekey "YOUR_LICENSE_KEY_HERE"

# Add your framework
ensure [esx]
ensure [qbcore]

# Add essential resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem

# Add custom resources
ensure [esx]/esx_policejob
ensure [esx]/esx_ambulancejob

Step 6: Set Up MySQL Database

Windows MySQL Setup

  1. Download and install MySQL Community Server
  2. During installation, set root password
  3. Create a database for FiveM:
mysql -u root -p
CREATE DATABASE fivem CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'fivemuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON fivem.* TO 'fivemuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Import Database Schema

  1. Locate your framework's SQL schema file
  2. For ESX: [esx]/esx_legacy/database.sql
  3. For QBCore: [qbcore]/qb-core/database.sql
  4. Import into your database using MySQL Workbench or CLI:
mysql -u fivemuser -p fivem < database.sql

Configure Database Connection

Edit your framework's database configuration file (usually config.lua):

Config.Mysql = {
    Host = 'localhost',
    Database = 'fivem',
    User = 'fivemuser',
    Password = 'your_password',
    Port = 3306
}

Step 7: Launch the Server

Windows Launch

Create a batch file start_server.bat:

@echo off
cd C:\FiveMServer
start cmd /k FXServer.exe +exec server.cfg
pause

Linux Launch

Create a shell script start_server.sh:

#!/bin/bash
cd ~/fivemserver
./run.sh +exec server.cfg

Start the server and open your browser to http://your-server-ip:40120 to access txAdmin.

Step 8: Configure Firewall & Port Forwarding

Windows Firewall

New-NetFirewallRule -DisplayName "FiveM UDP 30120" -Direction Inbound -LocalPort 30120 -Protocol UDP -Action Allow
New-NetFirewallRule -DisplayName "FiveM TCP 40120" -Direction Inbound -LocalPort 40120 -Protocol TCP -Action Allow

Linux Firewall (UFW)

sudo ufw allow 30120/udp
sudo ufw allow 40120/tcp
sudo ufw allow 3306/tcp  # MySQL (if hosting locally)
sudo ufw enable

Router Port Forwarding

PortProtocolPurpose
30120UDPGame Port
40120TCPtxAdmin Web Panel

Essential First Steps

  1. Set Admin Password: In txAdmin, create your first admin account
  2. Configure Economy: Set starting money and job salaries
  3. Add Jobs: Configure police, EMS, and civilian jobs
  4. Set Up Vehicles: Add spawn points for vehicles
  5. Configure Chat: Set up roleplay chat channels

Optimization Tips

  • OneSync: Enable OneSync in server.cfg for better performance with 64+ players
  • Stream Distance: Adjust entity streaming distance in framework config
  • Resource Management: Remove unused resources to reduce RAM usage
  • Database Indexing: Ensure database tables are properly indexed
  • Regular Backups: Schedule automated database backups via txAdmin

Next Steps

Need Help? Supercraft offers managed FiveM hosting with txAdmin pre-configured, MySQL database included, and expert support available 24/7.

Top