Skip to content
FIVECRATE

How to Install FiveM Scripts and Resources Safely

How to install FiveM scripts: check the files, put the folder in resources, add its dependencies and SQL, then set the ensure order in server.cfg.

Server developer checking a downloaded folder, dependency icons and security approval before installation
Author: FiveCrate
Published:
Updated:
Read time: 21 min
Applies to
FiveM Legacy and FiveM for GTAV Enhanced (early access), FXServer source of 2026-11-17, txAdmin v8.1.2, ox_lib v3.42.2, Qbox qbx_core 1.24.1, ESX Legacy and QBCore recipes as of November 2026
Last verified

Direct Answer

To install FiveM scripts, read the script’s README and fxmanifest.lua first, then copy the folder that holds fxmanifest.lua into your server’s resources folder, either directly or inside a [category] folder, under the exact name the README uses. Install the resources it depends on, import its .sql file if it ships one, and set its config. Add ensure scriptname to server.cfg below the lines that start what it needs: its framework if it uses one, ox_lib and oxmysql. On a running server, type refresh, then ensure scriptname, and look for Started resource scriptname in the console.

The steps are the same on FiveM Legacy and on FiveM for GTAV Enhanced. What differs for scripts on Enhanced, such as Asset Escrow and NUI callback strict mode, is listed in its own section below.

What a FiveM script is: a resource in the resources folder

Cfx calls every add-on a resource: “a collection of files - such as client scripts, server scripts, and streaming assets - that can be started, stopped and restarted at any time.” A script you download is one resource, or a few that work together.

FXServer loads resources from a folder called resources in the server data directory. txAdmin calls that directory the Server Data folder and describes it as the folder that contains the resources and cache folders, usually the one that also holds server.cfg. Every resource folder needs a manifest named fxmanifest.lua (older resources use __resource.lua) that lists the files the resource uses.

Two details in the FXServer resource scanner decide most installs:

  • The folder name is the resource name. The scanner takes each folder’s name as the resource name. That name is what you type after ensure, and what other resources list as a dependency.
  • Only bracketed folders are searched deeper. A folder whose name is in square brackets is opened and scanned for more resources. Any other folder counts as one resource, so FXServer never looks for a manifest further down inside it.

Where is the FiveM resources folder?

Your setupWhere to look
txAdmin recipe on WindowstxData sits in the parent folder of the folder that holds FXServer.exe. The recipe’s server data folder, with resources inside, is a subfolder of txData whose name ends in .base
txAdmin recipe on LinuxtxData sits in the folder that contains run.sh; the server data folder is a subfolder of it, as on Windows
Game host running PterodactyltxAdmin’s docs say txData is usually set to /home/container there
txAdmin with Existing Server DataThe folder you selected, which must already hold server.cfg and resources

Resource folder brackets: what [category] folders do

Folders whose names start with [ and end with ] are categories. They hold resource folders, they can hold other categories, and you may name them as you like.

  • One line starts the whole folder. ensure [category], start [category] and stop [category] act on every resource below that folder, including those in nested categories, because FXServer files each resource under every bracketed folder in its path.
  • The order inside a category is by name. FXServer collects a category’s resources in a C++ std::set, which keeps its entries sorted. They start in name order, not in the order you copied them. A dependency declared in a manifest still starts first, as the next sections show.
  • A category must not be a resource. A bracketed folder that contains fxmanifest.lua produces the warning [name] is a category, but has a resource manifest (if this is meant to be a resource, don't use [] around the name).

The official recipes sort their resources this way. The Qbox recipe unpacks the Cfx defaults into [cfx-default] and its other resources into folders such as [ox], [qbx] and [standalone]. The ESX Legacy recipe ends with ensure [core], ensure [standalone] and ensure [esx_addons]. Qbox’s documentation suggests a [custom] folder for scripts you add yourself.

ensure vs start in FiveM: which command to use

CommandWhat the docs say it doesWhat the FXServer source adds
start nameStarts the resource if it was stopped; accepts a categoryPrints Couldn't find resource name. when no scanned folder has that name
ensure nameRestarts the resource if it was started, otherwise starts it; accepts a categoryWhile server.cfg is still running, it never restarts a resource that is already started
restart nameRestarts the resource if it was startedOn a stopped resource it prints Can't restart a stopped resource.
stop nameStops the resource if it was started; accepts a categoryAlso stops every resource that depends on it
refreshRescans the resources folder and loads all manifests, making new resources available to startPrints Scanning resources. and then a Found ... summary line

Use ensure in server.cfg. The official default, Qbox, ESX Legacy and QBCore recipes all do. At startup it behaves like start: a comment in the source explains that restarting a resource there would stop the resources that depend on it without starting them again. After startup, ensure is the one command that both starts a new resource and reloads one you changed. Older READMEs, such as ESX’s vehicle shop, still write start esx_vehicleshop; in server.cfg that starts the resource just the same.

The docs and the source disagree on one point. The Server Commands page says restart “also supports category names”, but the restart command in the FXServer source looks its argument up as a single resource and has no category branch, unlike start, stop and ensure, so restart [category] ends in Couldn't find resource [category]. To restart a whole category, use ensure [category].

FiveM resource load order: dependencies first

A manifest line dependency 'name', or a dependencies { } list, “requires the specified resource to load before the current resource”. The FXServer dependency loader shows what happens before a resource starts:

  1. A missing dependency stops the start. The console prints Could not find dependency X for resource Y. and the resource does not start.
  2. A stopped dependency is started first. If that start fails, the console prints Could not start dependency X for resource Y.
  3. Entries that begin with / are runtime constraints, such as a minimum server build or OneSync. When one fails, the console prints Resource 'Y' can't run: followed by a numbered reason for each failed entry, such as server needs to be ... or higher or onesync: OneSync needs to be enabled.

The Qbox core shows all three. This block is copied from the fxmanifest.lua of qbx_core v1.24.1, released on October 30, 2026:

dependencies {
    '/server:10731',
    '/onesync',
    'ox_lib',
    'oxmysql',
}

provide 'qb-core'

qbx_core needs server build 10731 or newer, OneSync, ox_lib and oxmysql. The provide line marks it as a replacement for qb-core, so it starts in place of qb-core when another resource requires that name. This is also why the Qbox recipe can run ensure qbx_core before ensure [ox], the folder that holds oxmysql: starting qbx_core starts oxmysql first.

Declared dependencies only help when the author declared them. A script that calls another resource without listing it depends on the order of your ensure lines. Overextended’s docs tell you to add oxmysql “to the top of your resource list” and to set mysql_connection_string before starting any resources. Qbox’s docs tell you to put your own scripts below all other ensure lines, so they start after Qbox.

The ensure order in the official recipes

PositionQbox recipeESX Legacy recipeQBCore recipe (deprecated)
1ensure ox_libensure oxmysqlensure qb-core
2ensure qbx_coreensure esx_libensure [qb]
3ensure ox_targetensure es_extendedensure [standalone]
4ensure [ox]ensure [core]ensure [voice]
5ensure [qbx]ensure [standalone]ensure [defaultmaps]
6ensure [standalone]ensure [esx_addons]

The default resources (mapmanager, chat, spawnmanager and so on) come before these lines in the Qbox and QBCore files, and chat comes first in the ESX file. A script you add goes after the last line of its framework, or, on a server without one, after the resources its README lists.

Restarting a dependency on a live server stops its dependants. When a resource stops, FXServer stops every resource that depends on it, and the source comment mentioned above notes they are not started again. After you restart oxmysql, ox_lib or the framework, restart the scripts that depend on it, or restart the whole server.

How to add a script or resource to a FiveM server, step by step

Step 1: Read the README and fxmanifest.lua

Read the install notes before you copy anything. ESX’s vehicle shop README is a typical example. It lists the resources its job mode needs (esx_society, esx_billing, esx_addonaccount, esx_addoninventory and cron), tells you to “Import esx_vehicleshop.sql in your database”, gives the server.cfg line, and names the option Config.EnablePlayerManagement in config.lua.

Then open fxmanifest.lua and note every dependency or dependencies entry. Cfx’s Finding Resources page warns that some resources rely on others, “so do your research before picking one”, and that resources under the standalone tag typically have no such dependencies.

Many manifests, including those of ox_lib and qbx_core, still contain lua54 'yes'. The manifest reference calls that setting deprecated: since June 2025 all Lua scripts use Lua 5.4, and you do not need to enable it.

Step 2: Download the release build, not the source code

Take the packaged release when the project offers one. On GitHub, a release lists its packaged files in its Assets section, which also offers Source code (zip). ox_lib’s docs offer two routes, “Download a release or build the source code”, and building means running bun i and bun run build in ox_lib/web. The Qbox recipe itself downloads the release file ox_lib.zip.

ox_lib shows why this matters in November 2026. Since v3.41.0 (October 25, 2026) every release bundles cfxlua-require alongside ox_lib, and the release notes say that if you clone the repository, you must clone cfxlua-require too. The manifest of ox_lib v3.42.2, released on November 7, 2026, lists that resource as a dependency:

dependencies {
    '/server:7290',
    '/onesync',
    'require'
}

fx_dependencies {
    'require: 1.0.2',
}

cfxlua-require answers to the name require through provide 'require'. Copy both folders from the release zip; without the cfxlua-require folder, the dependency loader stops ox_lib with Could not find dependency require for resource ox_lib.

For a paid, escrow-protected resource, sign in to the Cfx Portal, select Assets, pick the asset under Granted Assets and select Download. Cfx support notes that downloaded assets only work on servers that you own. On FiveM for GTAV Enhanced, Cfx lists Asset Escrow as “Not implemented yet”.

Step 3: Unpack it and check the folder level

  1. Find the folder that holds fxmanifest.lua. It must sit directly in resources or in a bracketed folder inside it. If unpacking created an extra folder around it, move the inner folder up; otherwise FXServer treats the outer folder as the resource and reports that it has no manifest.
  2. Give it the name the README uses. That name must match your ensure line and the dependency lists of other resources.
  3. Copy every file, hidden ones included. For an escrowed resource, Cfx support says the .fxap file and all hidden files must reach the server, and that some FTP programs skip hidden or protected files.

Step 4: Install its dependencies first

Install each dependency the same way, under the exact name the manifest uses. Each one must either be declared in the script’s manifest, so FXServer starts it automatically, or have its own ensure line above the script.

Step 5: Import the SQL file, if the script has one

Back up the database first: in HeidiSQL, right-click the database on the left and choose Export database as SQL. MariaDB’s restore guide warns that when a file contains DROP TABLE and CREATE TABLE statements, “existing tables with the same names will be dropped and recreated”. In HeidiSQL, select the database on the left, click File, then Run SQL file…, pick the file and confirm. Import into the database named in your mysql_connection_string, the one the server uses. The FiveM database setup guide covers encodings, the command line and phpMyAdmin.

Step 6: Set the config

Open the script’s config file, usually config.lua or a file in a config folder. Settings that choose the framework, inventory or target resource must match what your server runs; the framework section below lists the Qbox values. In an escrowed script, the config is the only part you can change.

Step 7: Add the ensure line to server.cfg

In txAdmin, open CFG Editor in the server menu, add the line and click Save File (CTRL+S). On a Qbox server, Qbox’s docs place a [custom] folder below every other ensure line. Here it is after the recipe’s own block:

# Qbox & Extra stuff
ensure ox_lib
ensure qbx_core
ensure ox_target
ensure [ox]
ensure [qbx]
ensure [standalone]
ensure [voice]
ensure [assets]

ensure [npwd-apps]
ensure qbx_npwd
ensure npwd

ensure [custom]

You can also keep your lines in a separate file. The exec command runs the commands in a file relative to the server data directory, which is how the Qbox recipe loads its ox.cfg.

Step 8: Start the script and read the console

  • Without a full restart: in txAdmin’s Live Console, type refresh, then ensure scriptname. On the Resources page, Reload & Refresh sends the same refresh command, and Start next to a resource sends ensure.
  • With a full restart: use Restart Server in txAdmin’s sidebar.

A clean start prints Started resource scriptname, or Started resource scriptname (1 warning) with a count when the resource has warnings. Anything else is covered under Troubleshooting.

Step 9: Test in game, one script at a time

Qbox’s documentation adds one script, restarts, reads the console, tests it in game and only then moves on: “Doing one at a time means that when something breaks, you know which script did it.” Use the same method on any framework, ideally on a test server first.

How to check a FiveM script before you run it

Cfx’s own advice is short: “Use resources at your own risk.” Cfx will not support community-made resources, so follow each resource’s terms and use the creator’s support channels when something breaks. These checks show what a script will do before it runs:

  1. See what runs where. In the manifest, client_script files are loaded on each player’s game and added to the files players download; server_script files run inside FXServer.
  2. Question permission lines in the README. By default, FiveM’s sandbox blocks a resource from writing into other resources, from working in the server main folder or outside resource folders, and from running os.execute. Spawning workers and child processes is restricted too. A README that asks for add_filesystem_permission, add_unsafe_worker_permission or add_unsafe_child_process_permission asks you to lift one of those limits for that resource, and the docs say: “Only enable these for resources you trust completely.”
  3. Read ACE lines before you paste them. add_ace resource.name ... lets a resource run commands. ox_lib’s docs ask for four specific commands (add_ace, remove_ace, add_principal, remove_principal). The ESX recipe gives es_extended four. The QBCore recipe gives qb-core everything with add_ace resource.qb-core command allow # Allow qb-core to execute commands. Grant only what a script’s own documentation lists.
  4. Take “prohibited logic” seriously. Cfx’s Resource FAQ says a resource flagged for prohibited logic “likely contains malicious code”, that one resource can “infect” others, and that you should check the code of the resource it names. The backdoor guide covers removal.
  5. Know that escrowed code cannot be read. Qbox’s docs describe an escrowed script as one whose folder has a .fxap file and whose Lua files look like gibberish. Asset Escrow exists to stop others from modifying or accessing those scripts, so judge such a script by its creator’s terms and support.

FiveCrate’s own FiveM scripts are listed in the catalogue; the same checks apply to every resource, whoever made it.

How to install scripts on Qbox, ESX, QBCore and standalone servers

Qbox

  • Folder and order: put your scripts in resources/[custom] and add ensure [custom] at the very bottom of server.cfg.
  • Config values: for framework or core, choose qbx or qbox if offered, otherwise qb or qbcore. For inventory choose ox_inventory or ox, for target ox_target or ox, and for menus, input, progress bars and notifications ox_lib or ox.
  • Leave qb-core out: do not copy qb-core or another qb- resource that Qbox replaces. Qbox’s docs say running both means double menus, commands and errors.
  • QBCore scripts: qbx_core answers to the name qb-core, so scripts that need qb-core start normally while setr qbx:enableBridge "true" stays in server.cfg. Qbox resources also answer to qb-vehiclekeys, qb-weathersync, qb-management, qb-mechanicjob, qb-taxijob, qb-towjob, qb-truckerjob, qb-scrapyard, qb-lapraces and qb-npwd.
  • Other qb- dependencies: a script that lists qb-target or qb-inventory fails with Could not find dependency qb-target for resource my_script. It needs a Qbox option in its config, a version from its author, or a developer.

ESX Legacy

The ESX recipe starts oxmysql, esx_lib and es_extended before its [core], [standalone] and [esx_addons] folders, so add-on scripts go below those lines. The vehicle shop README puts its resource in an [esx] folder while the recipe uses [esx_addons]. Category names are free, so either works if the ensure line comes after es_extended.

QBCore

QBCore’s docs now say “QBCore has withdrawn from other platforms”, and its FiveM guides remain online as a reference. On October 29, 2026, the official txAdmin recipes repository marked the QBCore recipe as deprecated and removed it from its recipe index files. On an existing QBCore server, new scripts go below ensure qb-core and the recipe’s category lines. If you are choosing a framework now, see the framework comparison.

Servers without a framework

A server built from FiveM Basic Server, which the recipe index describes as “A minimal server, without framework”, has no framework to start first. Its recipe’s server.cfg starts five default resources: mapmanager, chat, spawnmanager, basic-gamemode and hardcap. A standalone script goes below those lines, after the resources its README and its dependency lines name, such as ox_lib or oxmysql. A script that declares Qbox, ESX or QBCore as a dependency cannot start on such a server: FXServer stops it with Could not find dependency X for resource Y., as described in the load order section above.

Installing scripts on FiveM for GTAV Enhanced

Cfx asks owners to “review the breaking changes before switching, as some require code or config updates”. For scripts, these are the rows that matter:

AreaFiveM for GTAV Enhanced
Asset EscrowListed under removed features as “Not implemented yet”
NUI callbacksStrict mode is on by default (Legacy: off). A blocked call returns HTTP 403 “The requested NUI callback was forbidden.” and nothing is printed to the console. A resource opts out with nui_callback_strict_mode 'false' in its manifest
C# resourcesMono was replaced by .NET. This concerns resources that ship .net.dll files; Cfx says it will share more information for developers
Streamed filesA stream_enhanced folder is loaded instead of stream when it exists; stream alone still works but is deprecated
Resource buildersResources can no longer be builders
Player IDsAn ID is reused after a player disconnects, which Cfx says may affect resource logic

Strict mode exists so that a malicious resource cannot call another resource’s NUI callbacks. With it, a resource’s NUI can no longer call another resource’s callbacks directly, so a script whose interface relies on that stops responding on Enhanced. The console stays silent; the docs point to the Network tab in the NUI dev tools to see the blocked call. For such a script, an updated version from its author is the safer fix than the opt-out line.

Troubleshooting

“Couldn’t find resource” after adding a script

FXServer prints Couldn't find resource name. when no scanned folder has that name. Check that the folder name matches the ensure line exactly, that the folder sits directly in resources or in a bracketed folder, and, on a running server, that you ran refresh first. For a category the message is Couldn't find resource category [name]. The Couldn’t start resource guide covers this and the other start errors.

“does not have a resource manifest (fxmanifest.lua)”

The warning names a folder that FXServer took for a resource. Usually it is a wrapper folder around the real one, so move the inner folder up. Otherwise check that the file is named exactly fxmanifest.lua.

“Could not find dependency” or “Could not start dependency”

The first means the dependency is not installed under that name. The second means it is installed but failed to start; its own error appears in the console above that line. Either way the script itself does not start, and Qbox’s docs show the pair as it appears: Could not find dependency qb-target for resource my_script. followed by Couldn't start resource my_script. Fix the dependency, then start the script again.

“Resource ’…’ can’t run:” with a numbered list

Each numbered line is a failed runtime constraint from the manifest’s dependency list. server needs to be ... or higher means your FXServer build is older than the manifest requires; see updating FXServer artifacts. onesync: OneSync needs to be enabled means the resource needs OneSync, which the onesync setting controls (on, off or legacy). A gameBuild line that says sv_enforceGameBuild needs to be at least ... (current is ...) means the resource needs a higher game build than your sv_enforceGameBuild setting.

“No such export … in resource …”

Lua raises No such export X in resource Y when a script asks resource Y for an export it cannot get. Check that Y is installed under exactly that name and starts before the script. The No such export guide goes further.

“You lack the required entitlement” or “Failed to verify protected resource”

Both concern escrowed resources. For the entitlement error, Cfx support says to restart the server, make sure the server key is correct, and transfer the asset in the Portal if it was bought on another account. For “Failed to verify protected resource”, Cfx support names files corrupted during transfer as a cause and says to make sure the .fxap file and all hidden files were copied. Details are in the entitlement error guide.

“exists in more than one place”

Two folders carry the same resource name, for example an old copy left in another category. The warning names the copy in use and the duplicate; delete the one you do not want.

“has an outdated manifest (__resource.lua instead of fxmanifest.lua)”

The resource still uses the old manifest name. The docs say you can rename it to fxmanifest.lua and update its structure, or the warning stays. fxmanifest.lua explained shows the current layout.

Scripts stopped after restarting oxmysql, ox_lib or the framework

Stopping a resource stops everything that depends on it, and a restart does not bring those back. Start the stopped scripts again with ensure, or restart the server.

“Table ’…’ doesn’t exist”

A script that stores its own data can print this when its tables are missing. Import the script’s .sql file into the database your server uses, as in Step 5.

Next Steps

Official documentation and repository references