Guide11 min read

How to start a FiveM server: a complete setup guide

From picking hardware to your first restart: what it takes to run a FiveM server properly, and the mistakes that cost new owners their first month.

Written by Lennart Voss

Server rack in a dark data centre

Most guides stop at 'install the artifacts and press start'. That gets you a server that runs, not a server people stay on. This walks through the whole path: hardware, install, configuration, and the decisions that are painful to reverse later.

Pick the hardware before you pick the scripts

A FiveM server leans hard on single-core performance. The game loop that ticks your resources does not spread across cores, so a modern CPU with a high clock speed beats a server CPU with twice the core count and a lower clock. This is the single most common purchase mistake: paying for 16 slow cores when 6 fast ones would run the same server better.

  • CPU: high single-core clock speed first, core count second
  • RAM: budget for the database and any voice service, not just the server process
  • Disk: NVMe. Streaming assets are read constantly and spinning disks show up as stutter
  • Network: unmetered or generously metered; streamed assets are downloaded by every joining player

You have three hosting routes. A game host gives you a panel and support but limits what you can install. A VPS is cheaper per unit of performance but you own the maintenance. A dedicated machine only makes sense once you know your player numbers. For a first server, a VPS with good single-core benchmarks is the honest recommendation.

Install the server build and txAdmin

FiveM servers run on builds published by Cfx.re, usually called artifacts. Recent builds ship with txAdmin, a web panel that handles deployment, scheduled restarts, live monitoring and player management. Use it. Running a server without it means doing by hand what a panel does reliably.

  1. Download a recent recommended artifact build for your operating system
  2. Create a license key in the Cfx.re Keymaster, tied to the account that will own the server
  3. Start the server once so txAdmin generates its setup link
  4. Run through the txAdmin deployer and pick a base template or an empty server
  5. Set an admin account with a real password — this panel controls your whole server
Keep the license key out of screenshots, videos and support tickets. Anyone with it can run a server under your identity, and escrowed assets you bought are bound to the account that key belongs to.

Understand server.cfg before you edit it

Everything the server loads is declared in server.cfg. Resources start with ensure, permissions are granted with add_ace and add_principal, and the load order is the order of the lines. Order matters: a framework has to be running before the resources that depend on it.

# core
ensure oxmysql
ensure ox_lib
ensure es_extended

# your content
ensure ms_garage
ensure ms_hud

sv_maxclients 64
sv_hostname "Nordhaven Roleplay"
sv_licenseKey "changeme"

add_ace group.admin command allow
add_principal identifier.fivem:1234567 group.admin

Two habits save hours later. Group the lines by purpose with comments, and never leave a resource in the folder that is not referenced in the config. An unreferenced resource looks installed, does nothing, and will be the first thing you blame when something breaks.

Database, framework, first resources

Almost every roleplay stack needs MariaDB or MySQL plus a connector, usually oxmysql. Install the database first, create a dedicated user for the server rather than using root, then set the connection string in the config. Only then install the framework — ESX or QBCore — and let it create its tables. If you are still choosing, read ESX vs QBCore before you commit; migrating later is a rebuild, not an update.

Add resources one at a time and restart between each. A server with thirty resources added in one session and a broken console gives you no way to tell which one broke it. Our installation guide covers the sequence in detail.

Before you go public

  • Set scheduled restarts in txAdmin — memory use grows over a long uptime
  • Take a database backup and actually restore it once, so you know the backup works
  • Lock admin commands behind ACE permissions instead of hardcoded identifier lists
  • Test with more than one player; half of all bugs only appear with a second client connected
  • Watch the console during a full evening and fix every warning, not just errors

The servers that survive their first month are the ones that launch small, stable and honest about what they offer. Ten well-configured resources beat sixty that were installed the night before opening.

Frequently asked questions

How much does a FiveM server cost per month?
Hosting for a small roleplay server typically runs from the price of a decent VPS up to a few hundred for a dedicated machine at scale. Scripts, maps and a Tebex store add on top. We break the full picture down in our cost guide.
Do I need a license key to run a FiveM server?
Yes. Server keys are free and generated in the Cfx.re Keymaster. The key identifies your server and ties any escrowed assets you buy to the account that owns it.
Windows or Linux for a FiveM server?
Both are supported. Linux usually gives you more performance per euro and better remote management, Windows is easier if you are not comfortable on a console. Pick the one you can actually administer under pressure.