Guide8 min read

How to install a FiveM script without breaking your server

Dependencies, load order, SQL imports and the restart that actually applies your change. The installation routine that keeps a live server stable.

Written by Tobias Frank

Terminal window with a running process

Installing a resource is five steps. Skipping any of them produces the same console error, which is why the same question fills every support channel every day.

Read the dependencies first

Almost every modern resource expects a database connector such as oxmysql, often a shared library like ox_lib, and sometimes a framework. Install and start those before the resource itself. A missing dependency produces an error that names the resource you just installed, which sends people looking in the wrong place.

Unpack it correctly

  1. Extract the archive and check whether it contains the resource folder or a wrapper folder around it
  2. Move the folder that holds fxmanifest.lua into your resources directory
  3. Do not rename the folder unless the documentation says you may
  4. Keep the folder out of any subfolder starting with [ unless the whole group is loaded
A wrapper folder is the most common installation error we see. If the path ends in resources/ms_garage/ms_garage/fxmanifest.lua, the server will never find it.

Import the SQL, once

If the resource ships a .sql file, import it into the database the server uses — not into a fresh database you created for the occasion. Import once. Running the same import twice on tables without guards is a reliable way to lose data.

Declare it in server.cfg

ensure oxmysql
ensure ox_lib
ensure es_extended

ensure ms_garage    # after the framework, not before

ensure starts the resource and restarts it if it was already running. Order is load order: anything a resource depends on has to appear above it. For a full picture of the config file, see the server setup guide.

Restart, then read the console

Restart the server rather than refreshing when you install something new — refresh picks up new resources, but a proper restart gives you a clean console to read. Then actually read it. The first error is the real one; the ten below it are usually consequences.

Configure last, in small steps

Change a handful of values, restart the single resource, test in game. Editing forty config lines and restarting once means you will not know which line broke it. When something misbehaves after an update, check the config against the new default file — new keys with sensible defaults are the usual difference.

If the resource is heavy after installation, do not guess. Take a resmon reading and compare it to what the author documents — the method is in why your server lags.

Frequently asked questions

Why does my resource not start?
In order of likelihood: a wrapper folder around the resource, a missing dependency, the resource declared above its framework in server.cfg, or a typo in the folder name.
ensure, start or restart — which do I use?
Use ensure in server.cfg. It starts a resource and restarts it if it is already running, which makes the config idempotent.
Do I have to restart the whole server for a config change?
Usually restarting the single resource is enough. Restart the server when you add a new resource or change anything the framework loads at startup.