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.
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.
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
- Start
FXServer.exe(Windows) or./run.sh(Linux). txAdmin opens in your browser on port 40120 and shows a PIN in the console. - Link your Cfx.re account and set a txAdmin password.
- Choose Popular Recipes, then QBCore Framework.
- Pick a folder for the server data (the suggested path is fine).
- Paste your license key and enter the MariaDB host, user and password when asked.
- Run the recipe and let it finish, including the yarn install on first start. Do not close the window while it downloads.
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.godRestart 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
| Port | Protocol | Used for |
|---|---|---|
| 30120 | TCP and UDP | Players connecting to the game server |
| 40120 | TCP | txAdmin 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 anensureline after its dependencies inserver.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
| Problem | Likely cause | Fix |
|---|---|---|
| Recipe fails while downloading | GitHub rate limit or network error | Wait a few minutes and run the recipe again. |
| Could not connect to database | Wrong host, user or password in mysql_connection_string | Check the line in server.cfg and that MariaDB is running. |
| Server not in the server list | Port 30120 closed or the key belongs to another IP | Open/forward the port and check the key in the Cfx.re Portal. |
| Couldn't start resource | Missing dependency or wrong start order | Read the console line above the error and move ensure lines. |
| Players stuck loading | A broken resource or an oversized asset | Stop recently added resources one by one. |
Next steps
- Add interiors with how to install an MLO.
- Add vehicles with how to install add-on cars.
- Still choosing a framework? Read ESX vs QBCore and QBox vs QBCore.