Save 20% with WELCOMEView sales
Setting Up fxmanifest.lua (FiveM)

Setting Up fxmanifest.lua for FiveM (Copy-Paste Examples)

Fast answer: every FiveM resource needs an fxmanifest.lua file in the resource folder. It tells FXServer which game the resource supports, which scripts to load, and which files go to clients. Below are copy-paste examples for a standard script resource, shared/client/server scripts, NUI resources (ui_page + files), and maps (this_is_a_map 'yes' with ymap streams), plus fixes for common manifest errors.

Last updated: June 25, 2026

Minimal fxmanifest.lua

fx_version 'cerulean'
game 'gta5'

client_script 'client.lua'
server_script 'server.lua'

Cfx.re’s official resource manifest documentation identifies fxmanifest.lua as the current manifest file and notes that old __resource.lua manifests are deprecated. Use fx_version 'cerulean' for modern FiveM resources unless a resource author documents a different requirement.

Complete example with metadata

fx_version 'cerulean'
game 'gta5'

author 'Your Name'
description 'Example FiveM resource'
version '1.0.0'

lua54 'yes'

shared_script 'config.lua'
client_script 'client.lua'
server_script 'server.lua'

The author, description, and version fields are metadata: they do not change how scripts run, but FXServer prints a console warning such as “version is required. please specify a version in your fxmanifest.lua.” when version is missing. Add a version '1.0.0' line to clear it. The optional lua54 'yes' line enables Lua 5.4 for the resource and is required by many current frameworks and libraries.

Client, server, and shared scripts

fx_version 'cerulean'
game 'gta5'

shared_scripts {
 'config.lua',
 '@ox_lib/init.lua'
}

client_scripts {
 'client/*.lua'
}

server_scripts {
 '@oxmysql/lib/MySQL.lua',
 'server/*.lua'
}

Use shared_scripts only for files that are safe on both sides. Do not put server secrets, license keys, database passwords, or webhook URLs into shared files.

NUI resource example

fx_version 'cerulean'
game 'gta5'

ui_page 'web/index.html'

files {
 'web/index.html',
 'web/style.css',
 'web/app.js'
}

client_script 'client.lua'

If a UI is blank in game, check that every HTML, CSS, JavaScript, font, and image file is listed under files. Missing files are a common cause of broken NUI screens.

Map or MLO resource example

fx_version 'cerulean'
game 'gta5'

this_is_a_map 'yes'

files {
 'stream/*.ymap',
 'stream/*.ytyp'
}

For maps and interiors, keep streamed files in a stream folder and verify the resource starts without console warnings. If a map does not load, use the FiveM console and txAdmin logs before editing unrelated resources.

Common mistakes

  • Using __resource.lua in a new resource.
  • Putting server.lua under client_scripts.
  • Forgetting NUI files under files.
  • Putting secrets inside shared_scripts.
  • Misspelling folders, especially client, server, and stream.

Validation checklist

  1. Resource folder has fxmanifest.lua at the top level.
  2. game 'gta5' is present for FiveM.
  3. Client files load on the client, server files load on the server.
  4. Every NUI/static file is listed under files.
  5. server.cfg includes ensure resource-name.

Related guides

Dependency order in server.cfg

The manifest tells FiveM which files belong to a resource, but server.cfg still controls start order. Start shared libraries and framework dependencies before resources that use them.

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my-script

If a resource throws export errors on startup, check whether the dependency is installed, named correctly, and ensured before the script that calls it.

Framework-specific notes

ESX, QBCore, and Qbox resources often need framework imports, database libraries, and config files. Keep framework setup in documented files. Do not hide important setup in random client files. A clean manifest makes support easier because staff can see every file that loads.

Review checklist before publishing a script

  • No secrets in shared or client files.
  • No unused test files listed in the manifest.
  • All NUI assets listed under files.
  • Dependencies documented in the README or product description.
  • Resource starts cleanly after a full server restart.

Dependency order still matters

The manifest tells FXServer which files belong to a resource, but server.cfg still controls start order. Start shared libraries, frameworks and database dependencies before scripts that call them. If a resource throws export errors on boot, check the dependency name and order before editing the script itself.

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my-script

Review before shipping a resource

Check that client files do not contain secrets, server files are not sent to the client, NUI assets are listed under files, and dependencies are named exactly as they are installed. A working manifest should make the resource understandable to another developer without opening every Lua file.

If a script uses framework exports, database libraries or shared config, document that in the README or product notes. Most install problems come from missing dependencies or incorrect start order, not from the manifest syntax itself.

After editing the manifest, restart the full server once. Hot reloads can hide missing files or order problems that only appear on a clean boot.

If the clean boot fails, read the first error, not the last cascade of errors after dependencies are already broken.

fxmanifest.lua layers for metadata, scripts, dependencies and files
A resource manifest declares metadata, executable scripts, dependencies and packaged files.

Read an fxmanifest in four layers

  • Metadata: declare the FX version, supported game and useful author, description and version details.
  • Scripts: separate client, server and shared execution deliberately; do not expose server-only logic to clients.
  • Dependencies: state resources or runtime constraints that must exist before this resource can run.
  • Files: include NUI and data assets that clients need. Cfx.re notes that a local ui_page and its dependencies must be referenced in files.

The manifest is semi-declarative Lua executed separately from the resource scripts. Keep it explicit, remove obsolete entries, and verify every referenced path on a case-sensitive production filesystem.

Cfx.re resource-manifest reference

Leave a Reply