PiTyUs.Hire me

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.

Updated 12 min readBy PiTyUs · FiveM developer

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

A typical resource foldertext
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_job starts the folder my_job, wherever it sits under resources/.
  • Names should be lowercase with no spaces; many scripts assume their exact folder name.

fxmanifest.lua, line by line

fxmanifest.lualua
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' }
DirectiveWhat 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.
filesExtra files clients download: NUI pages, images, fonts, data files.
ui_pageThe HTML page for the resource’s NUI.
dependenciesResources that must start first.
@resource/pathLoads 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.

fxmanifest.lua for an addon vehiclelua
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

CommandEffect
ensure nameStart it, or restart it if already running. The normal choice in server.cfg.
start nameStart it if stopped; does nothing if running.
stop nameStop it.
restart nameStop and start it.
refreshRe-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 symptomCause
“Couldn’t find resource”The folder name does not match the ensure line, or you did not refresh.
Nothing happens, no errorThe 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 playersA file used by NUI or the client is missing from files.
Dependency errorA 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