> Complete FiveM Server Setup Guide for 2026

Step-by-step guide to setting up a FiveM (GTA V RP) server. Learn installation, configuration, resources, and optimization for your roleplay community.

Intermediate
2 hours

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
Legal Note: You need a legitimate copy of GTA V to run a FiveM server.

---

Prerequisites

System Requirements

RequirementMinimumRecommended
CPU4 cores6+ cores
RAM8 GB16 GB
Storage50 GB100 GB SSD
Bandwidth20 Mbps100 Mbps
OSWindows 10 / LinuxWindows 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

  • 1.Download FiveM Server
    • >Visit fivem.net
    • >Go to "Server" → "Download"
    • >Download the latest server artifact
  • 2.Extract Server Files
  •    C:\FiveM-Server\
       ├── server-data\
       └── run.exe
       
  • 3.Create Server Data Folder
  • Create server-data folder with:
       server-data/
       ├── resources/
       │   └── [local]/
       ├── cache/
       └── server.cfg
       

    Linux Installation

    Bash
    # 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

  • 1.Visit keymaster.fivem.net
  • 2.Log in with your FiveM account
  • 3.Click "Register a Server"
  • 4.Fill in server details:
    • >Server name
    • >IP address (or domain)
    • >Server type (home/dedicated)
    5. Copy your license key

    ---

    Step 3: Server Configuration

    Basic server.cfg

    Create server.cfg in server-data/:

    Config
    # 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

    Config
    # 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:

    Essential Resources to Install

    Core Resources (included with FiveM):

    Config
    ensure mapmanager
    ensure chat
    ensure spawnmanager
    ensure sessionmanager
    ensure fivem
    ensure hardcap
    ensure rconlog
    ensure baseevents
    

    Recommended Additional:

    Config
    # 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:

    BATCH
    @echo off
    cd /d C:\FiveM-Server\server-data
    ..\run.exe +exec server.cfg
    pause
    

    Linux Start

    Create start.sh:

    Bash
    #!/bin/bash
    cd ~/fivem/server-data
    ../run.sh +exec server.cfg
    

    Make executable:

    Bash
    chmod +x start.sh
    

    Systemd Service (Linux)

    Create /etc/systemd/system/fivem.service:

    INI
    [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:

    Bash
    sudo systemctl enable fivem
    sudo systemctl start fivem
    

    ---

    Step 6: Database Setup (ESX/QBCore)

    Most RP servers need a database.

    MySQL Installation

    Windows:

  • 1.Download MySQL Community Server
  • 2.Install and set root password
  • 3.Create database: CREATE DATABASE fivem_server;
  • Linux (Ubuntu):

    Bash
    sudo apt install mysql-server
    sudo mysql_secure_installation
    sudo mysql -u root -p
    

    SQL
    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:

    Config
    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

  • 1.Download ESX Legacy from GitHub
  • 2.Extract to resources/[esx]/
  • 3.Import SQL files to database
  • 4.Add to server.cfg:
  • Config
    ensure es_extended
    ensure esx_menu_default
    ensure esx_menu_list
    ensure esx_menu_dialog
    # Add other ESX resources...
    

    QBCore Installation

  • 1.Download QBCore from GitHub
  • 2.Extract to resources/[qb]/
  • 3.Configure qb-core/config.lua
  • 4.Add to server.cfg:
  • Config
    ensure qb-core
    ensure qb-spawn
    ensure qb-hud
    # Add other QBCore resources...
    

    ---

    Step 8: Port Forwarding

    Required Ports

    PortProtocolPurpose
    30120TCP/UDPGame server
    30120TCPHTTP (downloading resources)

    Router Configuration

  • 1.Access router (usually 192.168.1.1)
  • 2.Find Port Forwarding
  • 3.Forward ports to server IP
  • 4.Test with canyouseeme.org
  • ---

    Step 9: Adding Custom Vehicles

    Vehicle Installation

  • 1.Download vehicle addon (.ytd, .yft files)
  • 2.Create folder: resources/[vehicles]/my-vehicle/
  • 3.Create fxmanifest.lua:
  • 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'
    
  • 4.Add to server.cfg:
  • Config
    ensure my-vehicle
    

    ---

    Step 10: Admin Management

    Adding Admins

    Method 1: License-based

    Config
    add_ace group.admin fivem allow
    add_principal identifier.license:YOUR_LICENSE_ID group.admin
    

    Method 2: Steam-based

    Config
    add_ace group.admin fivem allow
    add_principal identifier.steam:YOUR_STEAM_ID group.admin
    

    Admin Commands

    Config
    # 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

  • 1.Limit resources - Only run what you need
  • 2.Optimize maps - Use LoD levels properly
  • 3.Vehicle limits - Don't overload car packs
  • 4.Database optimization - Regular cleanup
  • OneSync Configuration

    Config
    onesync_enabled true
    onesync_distanceCullVehicle 1000
    onesync_distanceCullPed 1000
    onesync_population true
    

    Streaming Optimization

    Config
    sv_syncmode "onesync"
    sv_scriptCompression true
    fileserver_add ".*" "https://files.yoursite.com"
    

    ---

    Troubleshooting

    Server Not Visible

  • 1.Check port forwarding
  • 2.Verify license key
  • 3.Check firewall rules
  • 4.Ensure sv_master1 is set
  • Players Can't Connect

  • 1.Verify OneSync settings
  • 2.Check resource errors
  • 3.Ensure all resources downloaded
  • 4.Check for artifact updates
  • High CPU Usage

  • 1.Reduce resource count
  • 2.Optimize custom scripts
  • 3.Lower slot count
  • 4.Check for infinite loops
  • Database Errors

  • 1.Verify MySQL is running
  • 2.Check connection string
  • 3.Import missing SQL tables
  • 4.Check user permissions
  • ---

    Security Best Practices

    Basic Security

    Config
    # Limit RCON access
    rcon_password "complex-password-here"
    
    # Anti-cheat (basic)
    sv_pureLevel 2
    
    # Hide sensitive info
    sv_endpointPrivacy true
    

    Advanced Protection

  • 1.Use server-side validation
  • 2.Implement anti-cheat scripts
  • 3.Regular backups
  • 4.Monitor server logs
  • 5.Use txAdmin for management
  • ---

    txAdmin Integration

    txAdmin provides a web interface for server management.

    Installation

  • 1.Download txAdmin
  • 2.Run installer
  • 3.Configure server path
  • 4.Access web panel at http://your-ip:40120
  • Features

    • >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
    Next steps:
    • >Install your preferred framework (ESX/QBCore)
    • >Add custom vehicles and maps
    • >Create unique scripts for your server
    • >Set up Discord integration