☀️ Summer Sale: get 10% off for life with code
guides gta-v-fivem icon GTA V: FiveM

Mastering FiveM Server Hosting: A Complete Setup Guide for 2026

Dive into FiveM server hosting with this comprehensive guide, covering everything from license keys and deployment to database setup and going live in 2026.

Marcus Hale Marcus Hale · August 26, 2026 11 min read
Mastering FiveM Server Hosting: A Complete Setup Guide for 2026

So, you're looking to create your own FiveM server? That's awesome! FiveM offers an incredible platform for custom roleplay, racing, or just pure sandbox fun within the GTA V world. Getting a server up and running might seem a bit daunting at first, but with the right guidance, you'll be hosting your own community in no time. This guide will walk you through every step, from securing your license to going live, with a focus on practical tips and leveraging powerful hosting solutions like ServerPrism.

Understanding FiveM and Its Requirements

FiveM is a modification framework for Grand Theft Auto V that allows you to play on custom dedicated servers. It's not affiliated with Rockstar Games, but it provides a robust environment for server owners to create unique experiences. Before we dive into the setup, let's understand the core components you'll need:

  • A CFX.re Account and License Key: Essential for running any FiveM server.
  • Server Files: The core FiveM server binaries.
  • Resources (Scripts/Assets): These define your server's gameplay, UI, vehicles, and more.
  • A Database (Often MySQL): Crucial for persistent data like player inventories, accounts, and server-side configurations.
  • A Powerful Host: To ensure smooth performance for your players.

Step 1: Getting Your CFX.re License Key

The CFX.re license key is a unique identifier for your FiveM server and is absolutely mandatory. Without it, your server won't start. Here's how to get one:

  1. Visit the CFX.re Keymaster: Go to https://keymaster.fivem.net/.
  2. Log In: Use your FiveM forum account (or create one if you don't have one). This is the same account you use to log into the FiveM client.
  3. Register a New Server: Click on 'Register a new server'.
  4. Fill in the Details:
    • Label: A name to help you identify your key (e.g., 'My Awesome FiveM Server').
    • IP Address: Enter the public IP address of your server. If you're using a game server host like ServerPrism, this will be provided to you. For now, you can often use 0.0.0.0 as a placeholder if you don't have your server yet, and update it later. However, it's best to register with the correct IP if possible.
    • Server Type: Select 'VPS/Dedicated Server'.
    • Which service will you use to host this server?: Select 'Other (VPS/Dedicated Server)' or your specific host if listed.
  5. Generate: Click 'Generate'.

Once generated, you'll see your license key. Copy this key immediately and store it safely. You'll need to add it to your server's configuration file.

Common Pitfall: Forgetting to update the IP address on Keymaster if your server's public IP changes. This will prevent your server from starting.

Step 2: Choosing the Right Hosting Plan

Performance is key for a smooth FiveM experience. The more players, resources, and custom scripts you have, the more CPU, RAM, and disk I/O your server will demand. Here's what to consider:

  • CPU Cores & Speed: FiveM is quite CPU-intensive, especially for complex scripts and many players. Aim for high clock speed cores.
  • RAM: 8GB is a good starting point for a small server (10-20 players) with basic resources. For larger communities with extensive modpacks and 64+ players, you'll want 16GB, 32GB, or even 64GB+.
  • Storage: SSD NVMe storage is highly recommended for faster resource loading and database operations. HDD will cause noticeable lag.
  • Bandwidth: While FiveM isn't as bandwidth-heavy as some other games, reliable, unmetered bandwidth is crucial for consistent player connections.

ServerPrism offers dedicated game server hosting with instant deployment, allowing you to choose plans tailored to FiveM's demands. Their infrastructure is optimized for low latency and high performance, perfect for a responsive server.

Step 3: Deploying Your FiveM Server on ServerPrism

Once you've chosen your plan, deploying your server on ServerPrism is straightforward:

  1. Select FiveM: In the ServerPrism control panel, you'll find FiveM listed as a one-click install option.
  2. Choose Your Location: Pick a server location closest to your target player base for the best latency.
  3. Instant Deployment: With ServerPrism, your server will be provisioned and ready in minutes. You'll receive access details (IP address, SFTP/SSH credentials, control panel login).

Your server will come pre-configured with the latest FiveM server binaries and txAdmin (the web-based server manager), making the initial setup much easier.

Step 4: Initial txAdmin Setup and Configuration

txAdmin is an invaluable tool for managing your FiveM server. It provides a web interface for starting/stopping the server, installing resources, monitoring performance, and much more.

  1. Access txAdmin: Open your web browser and navigate to http://YOUR_SERVER_IP:40120. ServerPrism typically configures this port by default.
  2. Initial Setup Wizard: Follow the on-screen prompts:
    • Login: Create an administrator account for txAdmin.
    • Data Folder: Select a data folder for your server. ServerPrism often pre-configures this, usually ~/fx-server/server-data.
    • Server Type: Choose 'Local server package' if you're using the pre-installed files.
    • FiveM Server Artifacts: Ensure the latest recommended artifacts are selected. txAdmin can often auto-update these.
    • License Key: Paste the CFX.re license key you obtained in Step 1 into the sv_licenseKey field. This is critical.
    • Server Name: Give your server a recognizable name.
    • Resources: txAdmin will guide you through adding basic resources. For now, you can stick with the default 'CFX Default' or 'ESX Legacy' if you plan for a roleplay server.
  3. Start Your Server: Once the setup is complete, you should be able to start your server from the txAdmin dashboard.

Pro Tip: Always keep your FiveM server artifacts updated through txAdmin to benefit from performance improvements and bug fixes.

Step 5: Adding Resources (Scripts, Maps, Vehicles)

Resources are what make your FiveM server unique. They are essentially scripts and assets that modify or add functionality to the game.

  1. Resource Structure: FiveM resources are typically placed in the resources folder within your server-data directory. Each resource gets its own subfolder.
  2. Uploading Resources:
    • SFTP: Use an SFTP client (like FileZilla) to connect to your server using the credentials provided by ServerPrism. Navigate to ~/fx-server/server-data/resources.
    • Upload: Drag and drop your downloaded resource folders (e.g., es_extended, qb-core, polyzone, custom vehicles) into the resources directory.
  3. Starting Resources:
    • server.cfg: The primary configuration file for your FiveM server. You'll find it in your server-data folder. Open it using txAdmin's built-in file editor or via SFTP.
    • start or ensure: To load a resource, you need to add a line to your server.cfg file. Use ensure resource_name for critical resources that must load, or start resource_name for others. For example:
      ensure mapmanager
      ensure chat
      ensure spawnmanager
      ensure fivem-map-skater
      ensure fivem-map-hipster
      ensure es_extended
      start my_custom_vehicle_pack
      
    • Order Matters: For frameworks like ESX or QBCore, ensure their core scripts and dependencies are started before any dependent scripts. es_extended needs to be ensured before scripts that use its functions.

Important: Always read the installation instructions for each resource you download. They often have specific requirements or configurations.

Step 6: Setting Up a MySQL Database (and Server Splitting with ServerPrism)

Most advanced FiveM frameworks (like ESX, QBCore) and many scripts rely on a MySQL database to store persistent data. This includes player inventories, money, character data, vehicle ownership, and more.

Why Server Splitting?

Running a MySQL database on the same server as your FiveM game server can consume significant resources, especially RAM and CPU. For larger communities, this can lead to performance bottlenecks. ServerPrism offers server splitting capabilities, allowing you to host your MySQL database on a separate, optimized server. This dedicates more resources to your FiveM instance, leading to a smoother gameplay experience, and your database server can be individually scaled and secured.

Setting Up MySQL (Option 1: On the Same Server)

If you're starting small, you might run MySQL on the same machine.

  1. Install MySQL: On a Linux server, you can usually install it with:
    sudo apt update
    sudo apt install mysql-server -y
    sudo mysql_secure_installation # Follow prompts to secure your installation
    
  2. Create a Database and User: Log into MySQL as root:
    sudo mysql
    
    Then execute these commands (replace your_database, your_user, and your_password):
    CREATE DATABASE your_database;
    CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON your_database.* TO 'your_user'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;
    
  3. Import SQL Schemas: Many FiveM resources (e.g., es_extended.sql) come with .sql files. You need to import these into your new database:
    mysql -u your_user -p your_database < /path/to/resource/es_extended.sql
    

Setting Up MySQL (Option 2: Server Splitting with ServerPrism - Recommended for Scale)

This is the optimal approach for performance and scalability.

  1. Provision a Separate Database Server: With ServerPrism, you can easily provision a smaller, dedicated server instance specifically for your MySQL database. Choose a plan with ample RAM and fast NVMe storage.
  2. Install MySQL on the Database Server: Follow the same installation steps as above on your new database server.
  3. Configure Remote Access: This is crucial. By default, MySQL only allows connections from localhost. You need to allow your FiveM game server to connect.
    • Edit mysqld.cnf: Open the MySQL configuration file, typically sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf.
    • Change bind-address: Find the line bind-address = 127.0.0.1 and change it to bind-address = 0.0.0.0 to allow connections from any IP. Alternatively, and more securely, bind it to the private IP of your FiveM server if they are on the same internal network.
    • Restart MySQL: sudo systemctl restart mysql
    • Firewall: Ensure your database server's firewall (e.g., ufw) allows incoming connections on port 3306 from your FiveM server's IP address. sudo ufw allow from YOUR_FIVEM_SERVER_IP to any port 3306.
  4. Create a Database and User with Remote Access: Log into MySQL as root on your database server and execute:
    CREATE DATABASE your_database;
    CREATE USER 'your_user'@'YOUR_FIVEM_SERVER_IP' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON your_database.* TO 'your_user'@'YOUR_FIVEM_SERVER_IP';
    FLUSH PRIVILEGES;
    EXIT;
    
    Replace YOUR_FIVEM_SERVER_IP with the actual public (or private, if applicable) IP of your FiveM game server.
  5. Import SQL Schemas: Use mysql -u your_user -p -h YOUR_DATABASE_SERVER_IP your_database < /path/to/resource/es_extended.sql from your FiveM server, or transfer the .sql files to the database server and run the command there.

Connecting FiveM to Your Database

Regardless of your setup, you'll need to configure your FiveM server to connect to the database. This is typically done in your server.cfg or a framework-specific configuration file.

  1. Add mysql-async or oxmysql: These are popular database connectors for FiveM. Ensure one of them is ensured in your server.cfg.
  2. Configure Connection String: In your server.cfg (or a dedicated config.cfg for your framework), add your database connection details:
    # Example using mysql-async or oxmysql
    set mysql_connection_string "mysql://your_user:your_password@YOUR_DATABASE_SERVER_IP:3306/your_database?charset=utf8mb4"
    
    Replace YOUR_DATABASE_SERVER_IP with either localhost (if on the same server) or the actual IP of your separate database server.

Step 7: Going Live and Maintaining Your Server

With everything configured, it's time to invite players!

  1. Whitelist (Optional): If you're building a private community, consider using a whitelist resource (steam-id-whitelist or similar) to control who can join.
  2. Server List Visibility: Your server should automatically appear in the FiveM server list once it's running correctly and public. Ensure your sv_master1 is set to "" or "https://servers.fivem.net/" in server.cfg.
  3. Firewall: Double-check that your server's firewall allows incoming UDP traffic on ports 30120 and 30110 (the default FiveM ports).
  4. Monitoring: Regularly check txAdmin for server health, resource usage, and any errors in the console. ServerPrism's monitoring tools can also give you insights into your server's performance.
  5. Backups: Crucially, set up regular backups of your server-data folder and your MySQL database. ServerPrism offers automated backup solutions, which are highly recommended.
  6. Community Management: Engage with your players, gather feedback, and address issues promptly. A thriving community is the heart of any successful FiveM server.

Hosting a FiveM server is an ongoing journey of learning and customization. Don't be afraid to experiment with new resources, learn Lua scripting, and constantly refine your server's experience. With a solid foundation from a reliable host like ServerPrism and the knowledge from this guide, you're well on your way to building an amazing FiveM community!

Ready to get started?

Deploy your GTA V: FiveM server in under 2 minutes.

Get GTA V: FiveM Hosting
FiveM GTA V server hosting txAdmin MySQL game server ServerPrism