Skip to main content
FiveM starts resources in the order of the ensure lines in server.cfg, from top to bottom. A resource must come after every resource it uses, so put libraries and the database (oxmysql) first, then your framework, then scripts, then maps and cars. A resource can also list dependencies in its fxmanifest.lua, which makes FiveM start those first.

Why does the ensure order matter?

Many scripts call functions (exports) of another resource as soon as they start. If that other resource hasn’t started yet, you get errors such as “No such export” or a framework object that is nil, and the script doesn’t work until you restart it. Settings follow the same rule: put set and setr lines above the resources that read them, so the values are there when the resource starts. exec lines, such as vMenu’s permissions file, also go above the resource that needs them.

ensure, start, stop and restart

All four resource commands also accept a category folder, for example ensure [cars] starts every resource in resources/[cars]. Details: FiveM server commands.

A safe server.cfg ensure order

Use only the lines for resources you have. qb-core is an example: ESX uses es_extended, Qbox uses qbx_core. The base resources you see depend on how the server was set up.
Inside a category folder such as [qb], you don’t control the order. If one script in a category needs another from the same category, ensure that one by name above the category line.

How do dependencies in fxmanifest.lua work?

A resource can say what it needs in its fxmanifest.lua:
According to the FiveM resource manifest reference, a dependency “requires the specified resource to load before the current resource”. FiveM starts the listed resources first. If a listed resource doesn’t exist, the resource that needs it doesn’t start, and the console says which dependency is missing. Not every script lists its dependencies, so a correct ensure order is still the safest way.

How to change the order on FREAKHOSTING

1

Open the raw server.cfg

Go to Server config and click Advanced: open the raw file.
2

Move the lines

Cut and paste the ensure lines into the right order. Remove duplicate ensure lines for the same resource.
3

Save and restart

Click Save Content and restart the server. Read the console from the top for the first red error.
FiveM Resources page showing resources with their category folder, a Start at boot toggle that adds or removes the ensure line in server.cfg, and a Delete button

Start at boot on the Resources page adds or removes a resource's ensure line

The Start at boot switch on Resources adds or removes a resource’s ensure line. After you switch on a resource that depends on others, check its position in the raw file. The file editor keeps a History, so you can go back to an earlier version.
If Server config shows the check txAdmin runs this server, txAdmin uses a server.cfg in another folder. Change the order there, in txAdmin’s server.cfg editor or in Files.

How do I fix start order errors without a restart?

While the server runs, you can start things in the right order from the Console:
Then fix the order in server.cfg so it is right at the next start. See FiveM server console commands.

Frequently asked questions

Should I use ensure or start in server.cfg?

Use ensure. It starts the resource, and if it is already running, it restarts it instead of doing nothing.

Does the order of ensure lines really matter?

Yes. Resources start from top to bottom, and a script that uses another resource’s exports at start-up fails if that resource isn’t running yet.

Where does oxmysql go in server.cfg?

Before your framework and every script that uses the database. The set mysql_connection_string line goes above ensure oxmysql.

Can I ensure a whole folder?

Yes. ensure [cars] starts every resource in the [cars] category folder. The square brackets are part of the folder name.

What does “No such export” mean?

A script called a function of a resource that isn’t started, is started later, or has another name. Check the order and the spelling.

FiveM server guide

Every FiveM guide in one place.

Configure server.cfg

The Server config page and the raw file.

Console commands

ensure, refresh, restart and more.

Couldn't find resource

Fix resources that don’t start.

Install QBCore or ESX

Recipes write the order for you.
Reviewed by the FREAKHOSTING team on 29 October 2026. Game Panel steps were checked on our panel (FXServer build 35245 (Recommended) with txAdmin); game and plugin details follow their official documentation. Steps may differ slightly if FiveM, txAdmin or the resource change.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: October 2026