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 isnil, 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
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.
How do dependencies in fxmanifest.lua work?
A resource can say what it needs in itsfxmanifest.lua:
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.

Start at boot on the Resources page adds or removes a resource's ensure line
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: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?
Useensure. 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. Theset 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.Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: October 2026