FiveM Guide

How to Set Up a FiveM QBCore Server From Scratch

August 2026 · 8 min read · Stellar AI

Starting a FiveM roleplay server can feel overwhelming but the process is straightforward once you know the steps. This guide covers everything from choosing a host to getting QBCore running with your first custom scripts.

Step 1 — Choose a host

You need a server to run FiveM. The most popular options for beginners are ZAP-Hosting and GTXGaming — both have one-click FiveM installs and reasonable pricing around £10-20/month.

For a serious server with 50+ players you'll want at least 8GB RAM and an NVMe drive. Start small and upgrade as your player count grows.

Step 2 — Get a FiveM server licence

You need a server licence key from the Cfx.re keymaster. Go to keymaster.fivem.net, link your Steam account and generate a key. This is free and takes a few minutes.

sv_licenseKey "your-licence-key-here"

Step 3 — Install QBCore

QBCore is the most popular FiveM roleplay framework. Download it from the official QBCore GitHub organisation. The easiest way is to use the QBCore installer script which downloads all required resources automatically.

Required resources for QBCore:

qb-core, oxmysql, ox_lib, qb-multicharacter, qb-spawn, qb-hud, qb-inventory, qb-phone

Step 4 — Set up your database

QBCore uses MariaDB/MySQL for data storage. Your host should provide a database — create one and note the credentials. Then update your server.cfg with the connection string.

set oxmysql_connection_string "mysql://user:pass@localhost/dbname?charset=utf8mb4"

Step 5 — Configure server.cfg

Your server.cfg controls what resources load and in what order. The order matters — always ensure dependencies before the resources that need them.

sv_licenseKey "your-key" sv_hostname "My FiveM Server" sets sv_projectName "My Server" ensure ox_lib ensure qb-core ensure oxmysql ensure qb-multicharacter ensure qb-spawn ensure qb-hud ensure qb-inventory

Step 6 — Add your first scripts

Once the base framework is running you can start adding custom scripts — police jobs, drug systems, housing, jobs and more. Each script goes in its own folder in the resources directory with an ensure line in server.cfg.

Generate custom scripts for your new server

Describe what you need and Stellar AI writes the complete script — fxmanifest, client, server and config — ready to drop into your resources folder.

Generate your first script free →