How to set up a QBCore server for FiveM

This guide takes you from an empty Windows or Linux machine to a running QBCore server you can join and administer. It uses txAdmin's official QBCore recipe, which is the quickest reliable way to set up a QBCore server in 2026, and then covers the parts most tutorials skip: admin permissions, ports, and how to add resources without breaking the server.

By the HighLeaks team8 min read

What you need

  • A Windows 10/11 or Windows Server machine, or a Linux server. A small test server runs fine on a modern quad-core CPU with 8 GB of RAM; plan for more as you add players and resources.
  • A free Cfx.re account (the same account you use for the FiveM forums).
  • MariaDB, the database QBCore stores players, vehicles and jobs in.
  • About 30 minutes, most of it waiting for downloads.

Get a server license key

Every FiveM server needs a license key. Keys used to come from Keymaster; they are now created in the Cfx.re Portal. Sign in with your Cfx.re account, create a new server key, and keep it private: anyone with the key can run a server under your account.

Cfx.re Portal: creating a new server license key

Install MariaDB

Install MariaDB (the current long-term-support release is a safe choice) and set a root password. On Windows the installer can add HeidiSQL, a simple tool to look at your tables later. On Linux, install mariadb-server from your distribution and run mysql_secure_installation.

You do not need to create tables by hand: the txAdmin recipe creates the database and imports QBCore's SQL for you. Avoid XAMPP for a server that stays online; a plain MariaDB service is easier to secure and update.

Download FXServer

FXServer is the FiveM server program, distributed as "artifacts". Download the build marked recommended (not simply the newest one) from the official artifacts page: Windows builds or Linux builds.

Extract it into its own folder, for example C:\FXServer\server on Windows or /home/fivem/server on Linux. Keep the server data (resources and server.cfg) in a different folder, so updating artifacts later is just replacing this one.

Run txAdmin and deploy the QBCore recipe

  1. Start FXServer.exe (Windows) or ./run.sh (Linux). txAdmin opens in your browser on port 40120 and shows a PIN in the console.
  2. Link your Cfx.re account and set a txAdmin password.
  3. Choose Popular Recipes, then QBCore Framework.
  4. Pick a folder for the server data (the suggested path is fine).
  5. Paste your license key and enter the MariaDB host, user and password when asked.
  6. Run the recipe and let it finish, including the yarn install on first start. Do not close the window while it downloads.
txAdmin setup: choosing the QBCore Framework recipe

The recipe downloads qb-core and its default resources, creates the database, imports the SQL and writes a working server.cfg. When it is done, start the server from the txAdmin dashboard.

Give yourself admin

QBCore uses FiveM's ACE permissions. Join the server once, open the txAdmin Players page, copy your license: identifier, and add it to server.cfg:

add_principal identifier.license:YOUR_LICENSE_HERE qbcore.god

Restart the server. qbcore.god is the highest QBCore group; use qbcore.admin or qbcore.mod for staff who need less. txAdmin admins are managed separately in txAdmin → Admin Manager.

Ports and connecting

PortProtocolUsed for
30120TCP and UDPPlayers connecting to the game server
40120TCPtxAdmin web panel (only open it to your own IP)

Open 30120 in the operating-system firewall and, at home, forward it on your router. To test locally, press F8 in FiveM and run connect localhost. Once the server is listed, players can join with its cfx.re join link; our FiveM server IP finder shows the address behind any join code.

Adding resources safely

Most broken QBCore servers break when resources are added, not during setup. Before adding a script:

  • Check which framework it is written for. A QBCore script needs qb-core; ESX scripts will not work without a bridge.
  • Install its dependencies first (often ox_lib, oxmysql or a specific inventory) and run any SQL it ships with.
  • Put it in its own folder under resources/[local] and add an ensure line after its dependencies in server.cfg.
  • Test on a copy of the server and watch the F8 console and the resource monitor (resmon 1) before going live.

Want to know what a popular server runs before choosing scripts? The FiveM resource finder lists every resource a public server reports. Browse QBCore releases and discussions in the QBCore hub.

Troubleshooting

ProblemLikely causeFix
Recipe fails while downloadingGitHub rate limit or network errorWait a few minutes and run the recipe again.
Could not connect to databaseWrong host, user or password in mysql_connection_stringCheck the line in server.cfg and that MariaDB is running.
Server not in the server listPort 30120 closed or the key belongs to another IPOpen/forward the port and check the key in the Cfx.re Portal.
Couldn't start resourceMissing dependency or wrong start orderRead the console line above the error and move ensure lines.
Players stuck loadingA broken resource or an oversized assetStop recently added resources one by one.

Next steps