Skip to content
ROLEPLAY FiveM Setup guide

FiveM Server Hosting Setup Guide

How to set up a FiveM roleplay server on Loafhosts: getting a license key, configuring your Custom server, first boot, server.cfg essentials, resources, and the panel tools that work with it.

Level
intermediate
Read
11 min
Updated
By
Bradford

FiveM is the community multiplayer platform built on top of Grand Theft Auto V by Cfx.re (the CitizenFX Collective), and it is the backbone of nearly every GTA V roleplay server you have ever heard of. Instead of playing GTA V Online, players connect to an FXServer, a standalone dedicated-server binary that runs its own resources, scripts, and framework, most commonly ESX or QBCore. RedM, Cfx.re’s sister platform for Red Dead Redemption 2, runs on the exact same server binary and the exact same egg, just switched over with one setting. This guide walks through getting your license key, deploying the server on Loafhosts, first boot, the server.cfg essentials, adding resources, and the panel features that work alongside a FiveM server.

What FiveM Is and How It Is Different to Host

FXServer does not come from Steam and it is not installed through SteamCMD. It is a self-contained Linux build (musl/proot) that Loafhosts downloads directly from Cfx.re’s own distribution servers (runtime.fivem.net and changelogs-live.fivem.net) the first time your server installs. The only thing tying FiveM to GTA V is that your players need a legitimate copy of the game to connect; the server itself has no relationship to Steam at all. This also means there is no Steam Workshop for FiveM. Instead, servers are built from resources: self-contained folders of Lua, JavaScript, or C# scripts that you drop into the server’s resources directory and enable by name in server.cfg. Most roleplay communities run a full framework (ESX or QBCore) plus dozens of community and custom resources on top of it.

Note: FXServer installs from Cfx.re’s own servers, not SteamCMD, even though it powers a GTA V multiplayer experience.

Note: RedM (Red Dead Redemption 2) uses the identical binary and egg as FiveM; one setting switches which game it serves.

Getting a FiveM License Key

Before your server will even start, you need a free license key from Cfx.re’s Keymaster portal at portal.cfx.re (also reachable at keymaster.fivem.net). This key ties the server to your public IP, so generate it after you know your server’s address, and if your server ever changes public IP behind an unusual NAT or proxy setup, the existing key can appear invalid until you regenerate it. Keep the key handy; you will paste it into the Startup tab during setup.

Tip: Grab your license key before you deploy so you can drop it straight into the Startup variables on first boot.

Warning: A license key generated for one IP will not reliably work if your server’s public IP later changes.

Choosing a Plan

FiveM roleplay servers vary enormously in weight depending on how many resources and scripts they run, so plan sizing comes down to your player count and how heavy your resource list is.

Loafhosts runs one configurable Custom server: you slide RAM from 1 to 32 GB and storage from 10 to 500 GB and pick a protection tier. More RAM and CPU headroom matters once your resource count and player count climb, because FXServer’s scripting runtime (Lua/JS/C#) is CPU-bound and a busy roleplay server with dozens of active resources benefits from the extra compute. A smaller build is solid value for a freshly-started community still building out its resource list. Pricing starts at $13.50/mo, and longer billing cycles save up to 25%.

Tip: Size up on RAM and CPU headroom once you are running a full framework (ESX/QBCore) with a real resource list and an active player base

Tip: A smaller build is fine for a smaller server or while you are still developing and testing your resource list

Note: Every Custom server runs on AMD Ryzen 9 7950X3D CPUs with DDR5 memory and NVMe storage

Deploying Your Server

Loafhosts runs the LoafPanel inside LoafHub at hub.loafhosts.com. After checkout, deployment is automatic and typically finishes within a couple of minutes.

  1. Configure your Custom server, pick a region close to your players, and complete checkout at loafhosts.com
  2. Open LoafHub at hub.loafhosts.com and log in
  3. Select your new FiveM server to open the panel
  4. Open the server’s Startup tab and set your FIVEM_LICENSE key, Server Hostname, and Max Players
  5. If you are running RedM instead of FiveM, switch the Game Name variable to redm
  6. Save the Startup settings, then open the Console tab so you can watch first boot
  7. Press Start

The install script pulls down the current FXServer build, seeds resources/ with the baseline citizenfx/cfx-server-data resources (spawnmanager, basic-gamemode, hardcap, chat, and a few others), and generates a starter server.cfg if one does not already exist.

Tip: There are no setup fees, so the price at checkout is the price you pay.

Note: Without a valid FIVEM_LICENSE, the server will not start at all; this is the single most common reason a fresh FiveM server fails to boot.

Key Startup Settings

The Startup tab is where the panel and Wings inject the values that get written into server.cfg on every boot. These are managed through Startup, not by hand-editing the config:

SettingWhat it controls
FIVEM_LICENSEYour Keymaster license key; required to start at all
MAX_PLAYERSMaximum concurrent players (up to 48 on the stock egg)
SERVER_HOSTNAMEThe name players see in the server browser
STEAM_WEBAPIKEYOptional Steam Web API key for Steam-linked features; leave as “none” if you do not have one
FIVEM_VERSION”recommended” (default, stable), “latest” (bleeding edge), or a specific build string
TXHOST_GAME_NAMESwitches the identical binary/egg between fivem (GTA V) and redm (RDR2)
TXADMIN_ENABLETurns on Cfx.re’s own txAdmin web panel

The main game port is not a variable you set at all; it comes from the server’s assigned network allocation and gets written into server.cfg’s endpoint_add_tcp and endpoint_add_udp lines automatically, the same way the allocation works for every other game on the panel.

Note: MAX_PLAYERS is capped at 48 on the stock FiveM egg.

Tip: Leave FIVEM_VERSION on “recommended” unless you have a specific reason to pin an exact build; an invalid version string silently falls back to recommended anyway.

Where server.cfg and Resources Live

Your server’s files sit at the root of the container. The two locations you will use most:

  • server.cfg at the server root: the main configuration file, in Source-engine console-command format (sv_hostname "...", set sv_licenseKey ..., ensure <resource>). It defines the hostname, license key, Steam Web API key, max clients, RCON password, the loaded resources, and whether the server runs as gta5 (FiveM) or rdr3 (RedM).
  • resources/ at the server root: one folder per resource, each with its own fxmanifest.lua describing the resource’s scripts and dependencies. Resources are only active once they have an ensure <name> line in server.cfg.

If you enable txAdmin (TXADMIN_ENABLE), it manages its own state under a txData/ folder and takes over config and resource management through its own web UI. When txAdmin is on, the startup command deliberately skips exec’ing server.cfg directly, so txAdmin becomes the primary way you manage the server rather than the raw file.

Note: Enabling txAdmin means a second port needs to be exposed for its web UI (default 40120); check with support if you need an extra allocation for it.

Adding Resources

There is no Steam Workshop for FiveM. Resources are added by dropping a folder into resources/ (via SFTP or the panel’s File Manager) and then adding an ensure <resource-name> line to server.cfg so the server loads it on boot. Most roleplay servers start from a framework, ESX or QBCore, and layer additional community or custom resources on top. If you enable txAdmin, its recipe/deployer system can automate pulling in a full resource pack for you instead of doing it resource by resource.

  1. Upload the new resource’s folder into resources/ using SFTP or the File Manager
  2. Add an ensure <resource-name> line to server.cfg (the FiveM Config Editor’s raw view is a safe place to do this)
  3. Restart the server
  4. Watch the console for the resource starting cleanly, and check for any missing-dependency errors

Tip: Add resources one at a time when you are building a new server so a bad one is easy to spot in the console.

Warning: Resources loaded in the wrong order (a dependency ensured after the thing that needs it) are a common source of boot errors; check a resource’s fxmanifest.lua for its dependency list if it fails to start.

Connecting to Your Server

Once the console shows the server has started, your server appears in the in-game FiveM server browser under the SERVER_HOSTNAME you set. Share your IP and port directly if you would rather players use FiveM’s Direct Connect option, which is more reliable when browser filters or bad indexing hide a server.

  1. Confirm the console shows a clean startup with no resource errors
  2. Copy the server’s IP and port from the panel
  3. Search for your server name in the FiveM in-game browser, or connect directly with the IP and port
  4. Have one player join and confirm the framework and resources load correctly

Panel Features That Work With FiveM

  • Config Editor: LoafPanel includes a FiveM Config Editor (BETA) that opens server.cfg for editing without SFTP, keeps the port and secret lines locked to protect them from a bad edit, and is covered in its own guide.
  • Backups: take a backup before adding a new resource, updating your framework, or making any change you are not sure about. Roleplay servers accumulate real player data (characters, inventories, economy) in resources and databases, so backups before risky changes matter more here than on most game types.
  • Schedules: automate a daily restart during a quiet hour to clear memory and keep the resource runtime healthy over long uptimes.
  • Auto-Restart: keep the crash watchdog on so a resource crash or an unhandled script error does not leave your community locked out until you notice.
  • Change Game: if you decide to switch a server between FiveM and RedM (or to a different game entirely), Change Game lets you reconfigure without ordering a brand-new server.

Note: FiveM’s own admin control uses in-game console commands and, if enabled, Cfx.re’s txAdmin web panel, rather than a Source-engine RCON console; LoafPanel’s dedicated RCON console tool is built for Arma Reforger and does not apply to FiveM. Steam Workshop mod tooling likewise does not apply here since FiveM resources are not distributed through Steam.

Keeping the Server Healthy

A FiveM roleplay server accumulates real state fast: player characters, inventories, in-game economies, and whatever your resources persist to a database. Treat it accordingly.

Tip: Take a backup before every framework update, resource pack change, or database migration.

Tip: Watch the console after every restart for resource start errors before you announce the server is back up.

Note: Loafhosts offers a 3-day money-back guarantee on game servers if FiveM hosting is not the right fit.

Frequently Asked Questions

Do I need a Steam account to run a FiveM server?

No. FXServer downloads directly from Cfx.re’s own distribution servers, not SteamCMD, and has no dependency on Steam at all. Players do need a legitimate copy of GTA V to connect, but the server itself is entirely separate from Steam.

Why won’t my FiveM server start?

The most common cause is a missing or invalid FIVEM_LICENSE. Grab a free key from portal.cfx.re and set it on the Startup tab. If it was working and suddenly stopped, check whether your server’s public IP changed; license keys can be IP-bound.

Can the same server run RedM instead of FiveM?

Yes. The FiveM egg runs the identical binary for both games; switching the Game Name Startup variable between fivem and redm changes which game it serves.

How do I install roleplay resources like ESX or QBCore?

There is no Steam Workshop involved. Upload the framework’s resource folders into resources/ via SFTP or the File Manager, then add ensure lines for each resource in server.cfg and restart. If you enable txAdmin, its recipe/deployer system can install a full framework for you.

What is txAdmin and should I enable it?

txAdmin is Cfx.re’s own browser-based admin panel for FiveM/RedM, and most established roleplay servers use it for resource and player management. Turning it on (TXADMIN_ENABLE) hands config and resource management to txAdmin instead of a raw server.cfg exec, and it needs its own port exposed (default 40120) separate from the game port.

Is DDoS protection included with FiveM hosting?

The Advanced and Strict protection tiers include Terabit.io L4 and L7 DDoS filtering. The Basic protection tier includes standard DDoS mitigation only. A public-facing roleplay community with a large player base is a common target, so Strict protection is the safer choice if that describes your server.

Can I get a refund if FiveM hosting is not for me?

Yes. Loafhosts offers a 3-day money-back guarantee on game servers, so you can try FiveM hosting and request a refund within that window if it is not the right fit.

Rate this guide

Tap a star, it helps us decide what to write (and fix) next.