Installing and Managing Resources
How to install, structure, and start FiveM resources including the fxmanifest.lua format and ensure directive.
Overview
Resources are the modular units that add features to a FiveM server — from chat and player spawning to entire roleplay frameworks. Each resource is a folder containing Lua (or JavaScript/C#) scripts and a manifest file. This guide covers installing community resources, writing a minimal manifest, and managing which resources start with your server.
Directory Structure
All resources live under server-data/resources/. Resources must be organized into category folders using square brackets:
resources/
[standalone]/
my-hud/
fxmanifest.lua
client.lua
server.lua
[esx]/
esx_vehicleshop/
fxmanifest.lua
...
[system]/
...
The bracketed category folder name is arbitrary and only used for organization. FXServer discovers resources by scanning subdirectories, not by category name.
The fxmanifest.lua File
Every resource must have an fxmanifest.lua in its root folder. A minimal example:
fx_version 'cerulean'
games { 'gta5' }
author 'YourName'
description 'Short description of this resource'
version '1.0.0'
client_scripts { 'client.lua' }
server_script 'server.lua'
shared_script 'shared.lua'
Key fields:
| Field | Purpose |
|---|---|
fx_version |
Manifest API version; use cerulean for all modern resources |
games |
Must include 'gta5' for FiveM |
client_scripts |
Scripts sent to and executed by game clients |
server_script |
Scripts executed server-side only |
shared_script |
Executed on both client and server |
For resources with multiple files, use a table:
client_scripts {
'config.lua',
'client/*.lua'
}
Installing a Community Resource
Most community resources are distributed as GitHub releases or ZIP files.
- Download and extract the resource folder.
- Rename the folder if needed — the folder name is the resource name used in
ensure. - Place it in the appropriate category folder under
resources/. - Verify it contains
fxmanifest.lua. If it contains__resource.luainstead, that is the legacy manifest format and still works, but consider using updated versions.
Starting a Resource
Add an ensure line to server.cfg:
ensure my-hud
ensure both starts the resource on server boot and restarts it if it crashes. The resource name must match the folder name exactly (case-sensitive on Linux).
Order matters for dependent resources. If esx_vehicleshop depends on es_extended, then es_extended must be ensured first:
ensure es_extended
ensure esx_vehicleshop
Restarting a Resource Without Rebooting
From the txAdmin live console or the FXServer console:
restart my-hud
Or to stop and start:
stop my-hud
start my-hud
This is useful during development to pick up script changes without a full server restart.
Debugging Resource Failures
If a resource fails to start, check the txAdmin console for errors. Common causes:
- Syntax error in
fxmanifest.luaor a Lua file - Missing dependency (another resource that must be ensured first)
- File path in the manifest does not match the actual filename (Linux is case-sensitive)
The log file at resources/[system]/[monitor]/monitor.log also contains startup errors.