Complete FiveM Server Setup Guide for 2026
Want to create your own GTA V roleplay server? This comprehensive guide walks you through setting up a FiveM server from scratch, including essential resources and configuration.
What is FiveM?
FiveM is a modification framework for GTA V that allows you to:
- >Run custom multiplayer servers
- >Add custom vehicles, maps, and scripts
- >Create roleplay experiences
- >Use custom game modes
- >Bypass GTA Online limitations
---
Prerequisites
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 6+ cores |
| RAM | 8 GB | 16 GB |
| Storage | 50 GB | 100 GB SSD |
| Bandwidth | 20 Mbps | 100 Mbps |
| OS | Windows 10 / Linux | Windows Server / Ubuntu |
Required Items
- >GTA V license (must be legitimate)
- >Static IP or dynamic DNS
- >Port forwarding ability
- >Basic scripting knowledge (helpful)
Step 1: Install FiveM Server
Windows Installation
- >Visit fivem.net
- >Go to "Server" → "Download"
- >Download the latest server artifact
C:\FiveM-Server\
├── server-data\
└── run.exe
server-data folder with:
server-data/
├── resources/
│ └── [local]/
├── cache/
└── server.cfg
Linux Installation
# Create directory
mkdir -p ~/fivem/server-data
cd ~/fivem
# Download latest artifact (check fivem.net for latest URL)
# Download latest artifact from https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/
# Visit the URL above and copy the link for the latest recommended build
wget <PASTE_LATEST_ARTIFACT_URL_HERE>
# Extract
tar -xf fx.tar.xz
# Create cache folder
mkdir -p server-data/cache
---
Step 2: Generate License Key
- >Server name
- >IP address (or domain)
- >Server type (home/dedicated)
---
Step 3: Server Configuration
Basic server.cfg
Create server.cfg in server-data/:
# FiveM Server Configuration
# Server Identity
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_licensekey "your-license-key-here"
sv_hostname "My FiveM RP Server"
sets sv_projectName "My RP Server"
sets sv_projectDesc "A new roleplay experience"
sets sv_projectLogo "https://your-logo-url.com/logo.png"
# Server Slots
sv_maxclients 32
# RCON Password (for remote admin)
rcon_password "your-rcon-password"
# Master List
sv_endpointPrivacy true
sv_master1 ""
# Steam API Key (for steam auth)
steam_webApiKey "your-steam-api-key"
# Script Resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
# Custom Resources
ensure my-gamemode
# Advertise to FiveM list
add_ace builtin.everyone command.help allow
Advanced Configuration
# Performance Settings
onesync_enabled true
onesync_population true
sv_syncmode "onesync"
sv_scriptCompression true
# Game Settings
sv_airbrake true
sv_allowcelsius true
sv_forceIndirectListing true
# Anti-Cheat (basic)
sv_pureLevel 2
# Voice Chat
setr voice_use3dAudio true
setr voice_useSendingRangeOnly true
setr voice_serverCycle 10
# Logging
set sv_logfile 1
set sv_logecho 1
---
Step 4: Essential Resources
Download Resources
FiveM servers need resources (scripts, maps, etc.). Download from:
- >FiveM Forums
- >GitHub
- >Tebex Store (premium)
Essential Resources to Install
Core Resources (included with FiveM):
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure baseevents
Recommended Additional:
# HUD & UI
ensure esx_status
ensure esx_hud
# Database Integration
ensure mysql-async
ensure es_extended
# Vehicles
ensure LegacyFuel
ensure Garages
# Jobs & Economy
ensure esx_jobs
ensure esx_banker
Resource Folder Structure
resources/
├── [essential]/
│ ├── mapmanager/
│ ├── chat/
│ └── spawnmanager/
├── [gameplay]/
│ ├── my-gamemode/
│ ├── jobs/
│ └── housing/
├── [vehicles]/
│ ├── car-pack-1/
│ └── car-pack-2/
└── [maps]/
├── custom-interior/
└── custom-maps/
---
Step 5: Starting the Server
Windows Start
Create start.bat:
@echo off
cd /d C:\FiveM-Server\server-data
..\run.exe +exec server.cfg
pause
Linux Start
Create start.sh:
#!/bin/bash
cd ~/fivem/server-data
../run.sh +exec server.cfg
Make executable:
chmod +x start.sh
Systemd Service (Linux)
Create /etc/systemd/system/fivem.service:
[Unit]
Description=FiveM Server
After=network.target
[Service]
Type=simple
User=fivem
WorkingDirectory=/home/fivem/fivem/server-data
ExecStart=/home/fivem/fivem/run.sh +exec server.cfg
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable:
sudo systemctl enable fivem
sudo systemctl start fivem
---
Step 6: Database Setup (ESX/QBCore)
Most RP servers need a database.
MySQL Installation
Windows:
CREATE DATABASE fivem_server;Linux (Ubuntu):
sudo apt install mysql-server
sudo mysql_secure_installation
sudo mysql -u root -p
CREATE DATABASE fivem_server;
CREATE USER 'fivem'@'localhost' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON fivem_server.* TO 'fivem'@'localhost';
FLUSH PRIVILEGES;
Database Configuration
Add to server.cfg:
set mysql_connection_string "server=127.0.0.1;database=fivem_server;userid=fivem;password=your-password"
ensure mysql-async
---
Step 7: Installing ESX or QBCore
ESX Installation
resources/[esx]/server.cfg:ensure es_extended
ensure esx_menu_default
ensure esx_menu_list
ensure esx_menu_dialog
# Add other ESX resources...
QBCore Installation
resources/[qb]/qb-core/config.luaserver.cfg:ensure qb-core
ensure qb-spawn
ensure qb-hud
# Add other QBCore resources...
---
Step 8: Port Forwarding
Required Ports
| Port | Protocol | Purpose |
|---|---|---|
| 30120 | TCP/UDP | Game server |
| 30120 | TCP | HTTP (downloading resources) |
Router Configuration
---
Step 9: Adding Custom Vehicles
Vehicle Installation
resources/[vehicles]/my-vehicle/fxmanifest.lua:fx_version 'cerulean'
game 'gta5'
files {
'vehicle.ytd',
'vehicle.yft',
'vehicle_hi.yft'
}
data_file 'handling.meta' 'handling.meta'
data_file 'vehicles.meta' 'vehicles.meta'
data_file 'carcols.meta' 'carcols.meta'
data_file 'carvariations.meta' 'carvariations.meta'
server.cfg:ensure my-vehicle
---
Step 10: Admin Management
Adding Admins
Method 1: License-based
add_ace group.admin fivem allow
add_principal identifier.license:YOUR_LICENSE_ID group.admin
Method 2: Steam-based
add_ace group.admin fivem allow
add_principal identifier.steam:YOUR_STEAM_ID group.admin
Admin Commands
# Permission levels
add_ace group.superadmin command allow
add_ace group.admin command.kick allow
add_ace group.mod command.mute allow
---
Server Optimization
Performance Tips
OneSync Configuration
onesync_enabled true
onesync_distanceCullVehicle 1000
onesync_distanceCullPed 1000
onesync_population true
Streaming Optimization
sv_syncmode "onesync"
sv_scriptCompression true
fileserver_add ".*" "https://files.yoursite.com"
---
Troubleshooting
Server Not Visible
sv_master1 is setPlayers Can't Connect
High CPU Usage
Database Errors
---
Security Best Practices
Basic Security
# Limit RCON access
rcon_password "complex-password-here"
# Anti-cheat (basic)
sv_pureLevel 2
# Hide sensitive info
sv_endpointPrivacy true
Advanced Protection
---
txAdmin Integration
txAdmin provides a web interface for server management.
Installation
http://your-ip:40120Features
- >Live console
- >Player management
- >Resource management
- >Scheduled restarts
- >Discord integration
- >Automatic updates
Conclusion
Your FiveM server is now ready for players! Remember to:
- >Keep server artifacts updated
- >Regular backups of database and resources
- >Monitor server performance
- >Engage with your community
- >Follow FiveM terms of service
- >Install your preferred framework (ESX/QBCore)
- >Add custom vehicles and maps
- >Create unique scripts for your server
- >Set up Discord integration