Getting started
What a FiveM resource is, and how the server loads it
A FiveM resource explained: the folder, fxmanifest.lua, fx_version and game, client/server/shared scripts, files and ui_page, streaming, dependencies, and how ensure, start, stop and refresh work.
Overview
On FiveM everything is a resource: a script, a car, a map, a clothing pack, an inventory, a loading screen. Understanding what a resource is — a folder plus a manifest that tells the server what to do with each file — removes most of the confusion beginners have about why something does not start, does not download or does not run where they expected.
The anatomy of a resource
resources/
└── [jobs]/ <- a category folder (brackets), just for organisation
└── my_job/ <- the resource; its name is "my_job"
├── fxmanifest.lua
├── config.lua
├── client/
│ └── main.lua
├── server/
│ └── main.lua
├── html/ <- NUI (optional)
│ ├── index.html
│ └── app.js
└── stream/ <- models and textures (optional)- Folders in square brackets like
[jobs]are categories, not resources. The server looks inside them. - The resource name is the folder name.
ensure my_jobstarts the foldermy_job, wherever it sits underresources/. - Names should be lowercase with no spaces; many scripts assume their exact folder name.
fxmanifest.lua, line by line
fx_version 'cerulean'
game 'gta5'
name 'my_job'
description 'A delivery job'
version '1.0.0'
author 'you'
shared_script 'config.lua'
client_scripts { 'client/*.lua' }
server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/*.lua',
}
ui_page 'html/index.html'
files {
'html/index.html',
'html/app.js',
}
dependencies { 'oxmysql', 'ox_lib' }| Directive | What it does |
|---|---|
fx_version 'cerulean' | Manifest format version. cerulean is current and required for modern NUI. |
game 'gta5' | Target game: gta5 for FiveM, rdr3 for RedM, common for both. |
client_script(s) | Runs on every player’s game. |
server_script(s) | Runs on the server only; never sent to players. |
shared_script(s) | Runs on both sides — configs and shared helpers. |
files | Extra files clients download: NUI pages, images, fonts, data files. |
ui_page | The HTML page for the resource’s NUI. |
dependencies | Resources that must start first. |
@resource/path | Loads a file from another resource, e.g. @ox_lib/init.lua. |
Where each script runs
Deciding what goes in client_script versus server_script is the most important design decision in any resource. Client scripts can draw, read input and move the player; server scripts own the database, money and anything that must not be faked. A shared_script is simply loaded twice — once on each side — which suits configuration.
The full split, with examples, is in client vs server scripts.
Streaming assets: the stream folder
Game assets — models (.ydr, .yft), textures (.ytd), collisions and maps — are not listed in the manifest. Put them in a folder called stream and FiveM streams them to clients automatically. Metadata files such as vehicles.meta are listed under files and registered with data_file lines.
fx_version 'cerulean'
game 'gta5'
files {
'data/vehicles.meta',
'data/carvariations.meta',
'data/handling.meta',
}
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
data_file 'HANDLING_FILE' 'data/handling.meta'Streaming in depth — sizes, formats and why assets fail — is in custom assets and streaming.
Starting, stopping and reloading
| Command | Effect |
|---|---|
ensure name | Start it, or restart it if already running. The normal choice in server.cfg. |
start name | Start it if stopped; does nothing if running. |
stop name | Stop it. |
restart name | Stop and start it. |
refresh | Re-scan the resources folder for new or changed manifests. |
Order in server.cfg matters: a resource that uses oxmysql must start after oxmysql, and a framework before the scripts that use it. dependencies in the manifest enforces the most important cases. Restarting a single script while the server runs is fine for development; restarting a framework while players are online usually breaks everything that depends on it.
When a resource does not start
| Console message or symptom | Cause |
|---|---|
| “Couldn’t find resource” | The folder name does not match the ensure line, or you did not refresh. |
| Nothing happens, no error | The fxmanifest.lua is nested one folder too deep after unzipping. |
| “Failed to load script” | A syntax error; the console prints file and line. |
| Works for you, not for players | A file used by NUI or the client is missing from files. |
| Dependency error | A listed dependency is not started or not installed. |
Reading those messages is covered in F8 and server console errors.
Frequently asked questions
What is a resource in FiveM?
A folder in resources/ with an fxmanifest.lua that tells the server what the folder contains and where each script runs. Scripts, maps, cars and UIs are all resources.
What does fx_version cerulean mean?
It selects the current manifest format. cerulean loads NUI in a secure context, which modern interfaces need. Use it for all new resources.
What is the difference between ensure and start?
start only starts a stopped resource; ensure starts it or restarts it if it is already running. Use ensure in server.cfg.
Do folders in brackets like [standalone] count as resources?
No. They are categories for organisation. The server looks for resources inside them.
Do I still need lua54 'yes' in my manifest?
No. Lua 5.4 has been the default since June 2025, so the line is harmless but unnecessary.
Why can players not see my NUI images?
The files are not listed under files in the manifest, so clients never download them.
Need this built, not just explained?
Ten years of FiveM work, from Lua to NUI
Custom resources, React NUI, ESX / QBCore / Qbox integration, OneSync performance audits and security reviews — plus the websites and SEO around your server brand.
Related guides
- Getting startedClient-side vs server-side in FiveMClient scripts run on each player’s PC and handle what that player sees and does: drawing, input, markers, animations and local effects. Server scripts run once, on your server, and own everything that has value or must be trusted: money, items, jobs, the database and permissions. The client asks; the server decides. Never trust data sent by a client without checking it.
- Getting startedWrite your first FiveM script, step by stepCreate a folder resources/my_first, add an fxmanifest.lua with fx_version 'cerulean', game 'gta5', a client_script and a server_script, then write a client command that loads a model with RequestModel, waits for HasModelLoaded, spawns it with CreateVehicle and seats the player with SetPedIntoVehicle. Add ensure my_first to server.cfg, restart, and type /car adder in game.
- Assets & UIFiveM asset streamingStream folders, add-on vehicles, MLOs, texture budgets and pool sizes — and how to find the asset that is crashing your players.
- Getting startedWhere FiveM errors appear and how to read themClient script errors appear in the F8 console in game; server script errors appear in the server console (or txAdmin’s Live Console). A SCRIPT ERROR: @resource/client.lua:23: attempt to index a nil value (local 'data') line tells you the resource, the file, the line number and what went wrong. Read the first error, not the last — later errors are often consequences of the first.