START HERE·YOUR FIRST RESOURCE·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this whole lesson - every step, code block, and the exact console errors - plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.
Start Here · Your first resource

What is a resource?

Here is the one idea this whole section is built on: everything you ever add to a FiveM server is a resource, and a resource is just a folder. A new job, a custom car, a heist, a UI, the framework itself, all of it ships as folders the server loads. Learn what a folder needs to count as a resource and you have the key that every later lesson turns. In this one you make a resource by hand, give it one line of code, and watch the server start it and print proof it is alive.

You'll learn
What a FiveM resource actually is, why resources exist, and how to make one the server will start and print proof it loaded.
Time
~10 minutes
Difficulty
Beginner. Almost no code, just folders, one config line, and a single print.
You need
You finished the "Set up your machine" module, so you have a server you can restart and you can find its resources folder.
BEFORE YOU START

What a resource is

A resource is a folder of code and assets, plus one special file called a manifest, that FiveM loads and runs as a single unit. "As a single unit" is the important part. The server does not load loose files scattered around your machine. It loads whole folders. Each folder is one feature you can switch on or off by itself.

The special file that makes a folder count as a resource is the manifest, and its name is always fxmanifest.lua. Think of it as a label card taped to the front of the box. It tells the server "this folder is a resource, here is its name, and here are the files inside it that you should run". A folder with no fxmanifest.lua is just a folder. FiveM walks right past it. A folder with one is a resource the server can start.

Vocabulary

resource
A folder of code and assets that FiveM loads as one unit. One resource = one feature you can turn on or off.
manifest (fxmanifest.lua)
The label-card file every resource must have. It names the resource and lists the files the server should load. No manifest, not a resource.
asset
Any non-code file a resource ships with, like an image, a sound, a car model, or a UI page. Code and assets live together in the same folder.
ensure
The server.cfg keyword that tells the server to start a resource by name (and restart it if it was already running).

Why resources exist

A real FiveM server is not one giant program. It is dozens, sometimes hundreds, of small ones running side by side: a framework, a job system, a car dealership, a phone, an inventory, and on and on. If all of that were one tangled pile of files, a single broken line anywhere would take the whole server down, and you could never tell which feature caused it.

Resources solve that by keeping every feature in its own folder, separate from the rest. That separation buys you three things you will lean on constantly:

  • You can toggle features one at a time. Add a resource, remove a resource, and the others do not care.
  • You can start, stop, and restart one feature without touching the rest. When you edit your job script, you reload just that resource. The framework, the inventory, and everyone playing keep running.
  • You can tell exactly which feature broke. When something errors, the console names the resource. You go straight to that one folder instead of searching the whole server.

Compare it to apps on a phone. Each app is self-contained. You install one, delete one, or force-close one that misbehaves, and the rest of the phone keeps working. A resource is a FiveM server's version of an app: a separate, switchable unit. That is why "everything is a resource" is the first thing you learn. It is the model the whole platform is organized around.

How it works

When the server boots, it scans its resources folder, finds every subfolder that has a fxmanifest.lua inside it, and starts the ones you listed in server.cfg. A folder without a manifest gets ignored. A folder with a manifest that you did not list stays available but does not start. The manifest makes it a resource; the server.cfg line is what actually turns it on.

The smallest resource that can do something is a folder holding two files: the manifest and one script file for the server to run.

text
resources/
  qu_hello/
    fxmanifest.lua    the label card: names the resource, lists its files
    server.lua        a script the server runs

The folder name qu_hello is the resource's name. The server reads fxmanifest.lua to learn that server.lua belongs to this resource and should run on the server side. The next lessons go deep on what goes inside those files. Right now the goal is smaller and just as important: prove you can make a folder the server recognizes, starts, and runs, by having it print one line you can see.

Make a resource that prints on start

You are going to create a resource with just enough inside it to prove it loaded: the folder, the manifest, and one tiny script that prints a single line the moment the resource starts. Kept deliberately small. Once you can make the server start your resource and watch it print, adding real code later is a tiny step.

Make the resource folder

An empty folder the server can find.

Inside your server's resources folder, create a new folder named exactly:

text
resources/qu_hello

The folder name is the resource name. Keep it all lowercase, with no spaces, using only letters, numbers, and underscores. You will type this same name in server.cfg in a moment, so spell it the same in both places. The qu_ prefix just marks this as one of your Quasar School practice resources, so it never clashes with a real script you install later.

Create the manifest file

The folder now counts as a resource and points at one script.

Inside qu_hello, create a new file named exactly:

text
fxmanifest.lua

The name must be exactly fxmanifest.lua, not manifest.lua and not the old __resource.lua you may see in ancient tutorials. Open it and put in these three lines:

lua
fx_version 'cerulean'
game 'gta5'
 
server_script 'server.lua'

fx_version 'cerulean' is the manifest format version, and cerulean is the current one. game 'gta5' says this resource is for GTA V, which is what FiveM runs on. The third line is a server_script directive: it tells FiveM to load a file named server.lua and run it on the server. Those first two lines make FiveM treat the folder as a real resource; the third gives it a file to run. Some old guides also add a lua54 'yes' line here. Leave it out. As of 2025 that setting is deprecated and ignored, because Lua 5.4 is now the only runtime.

Add one line of code

The resource now has a script that prints when it starts.

Inside qu_hello, create a second file named exactly:

text
server.lua

Open it and put in this single line:

lua
print('[qu_hello] resource started')

print is a function: a named action that writes a line of text to the server console (the txAdmin Live Console), not to a player's screen and not to chat. Because this line sits at the top of the file, with nothing wrapping it, the server runs it once the instant the resource starts. The [qu_hello] tag at the front is just text you typed, so you can spot your own line when the console is busy. Before you run it, predict: what one line should appear in the console right after the resource starts?

Tell the server to start it

The server will start your resource on boot.

Open your server.cfg file. It sits next to the resources folder. Near the other lines that begin with ensure, add:

text
ensure qu_hello

ensure means "start this resource, and if it was already running, restart it". The name after it must match the folder name exactly, character for character. Save the file.

Restart and read the console

You see the server start qu_hello and print your line.

In the txAdmin Live Console (the text box at the bottom of the txAdmin web panel where you type server commands), type this and press Enter so the server re-reads your new folder and runs it:

text
ensure qu_hello

Then watch the console. Among the startup lines you will see the server acknowledge your resource by name, and right after it, the line your server.lua printed.

Those two lines are the whole win. The server scanned the resources folder, found qu_hello with its manifest, matched it to your ensure line, started it, and ran server.lua, which printed your line. You proved the loop works, and that loop is the same one every script you ever install rides on.

Common beginner mistakes

Almost every "it just won't start" problem at this stage is one of three small things. Read these once now and you will recognize them instantly later.

SymptomFix
Could not find resource qu helloYour folder name has a space or a capital letter. Rename it to qu_hello: all lowercase, no spaces, underscores only. The name in server.cfg must match the folder name exactly.
couldn't load resource qu_helloFiveM found a folder but could not read it as a resource. The manifest is missing, misnamed, or has a typo. Confirm the file is named exactly fxmanifest.lua and contains fx_version 'cerulean' and game 'gta5'.
Couldn't load script server.lua: No such fileYour manifest has server_script 'server.lua' but no file named exactly server.lua sits next to it. Create server.lua in the qu_hello folder, or fix the spelling to match.
The resource starts but no [qu_hello] line printsYour server.lua is empty or the print line is missing. Put print('[qu_hello] resource started') in server.lua, save, and run ensure qu_hello again.
Nothing about qu_hello appears in the console at allYou forgot the ensure line, or you edited the wrong server.cfg. Add ensure qu_hello to the same server.cfg your server actually loads, save it, and restart.
If a folder sits in resources but is not in server.cfg, will FiveM load it?

No. Having the folder there (with a valid fxmanifest.lua) makes it a resource the server can start, but it stays off until you tell the server to start it. That switch is the ensure qu_hello line in server.cfg. The manifest makes it a resource; the ensure line is what actually turns it on. No ensure line means the resource just sits there, recognized but not running.

Try it yourself

What you can do now

  • Explain that a resource is a folder of code and assets that FiveM loads as one unit.
  • Say why fxmanifest.lua matters: no manifest, not a resource.
  • Describe why resources exist: features stay separate and individually switchable.
  • Make a resource by hand, point its manifest at server.lua, and start it from server.cfg with ensure.
  • Use a top-level print so the resource writes one line to the server console the moment it starts.
  • Recognize the most common reasons a new resource won't start or won't print.

You now know what every script you will ever touch actually is: a folder with a manifest. Next you crack that manifest open. The lesson "fxmanifest.lua, line by line" walks through every line a manifest can hold and what each one tells the server to do.