fxmanifest.lua Complete Reference 2026: client_scripts, dependencies, NUI

Published on

Quick-copy FiveM fxmanifest.lua reference for 2026: fx_version, games, client_script vs client_scripts, server_script, shared_script, dependencies, optional dependency patterns, files, ui_page, lua54, node_version, exports, and data_file.

Written by Jochem, CEO of Space-Node, 5-10 years experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

FiveM fxmanifest.lua complete reference

Quick answer: In 2026, a normal FiveM resource should use fxmanifest.lua, fx_version 'cerulean', and games . Use client_script for one file, client_scripts for a list, and dependencies only for resources that must start before yours.

Copy-paste fxmanifest.lua template

fx_version 'cerulean'
games { 'gta5' }

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

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

client_scripts {
  'client/*.lua'
}

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

files {
  'html/index.html',
  'html/style.css',
  'html/app.js',
  'html/assets/*.png'
}

ui_page 'html/index.html'

dependencies {
  'ox_lib',
  'oxmysql'
}

client_script vs client_scripts

DirectiveUse it whenExample
client_scriptOne client fileclient_script 'client.lua'
client_scriptsMultiple client filesclient_scripts

The plural version expands into multiple client_script metadata entries internally. That is why both work. The mistake is mixing table syntax with the singular name.

Correct:

client_scripts {
  'client/main.lua',
  'client/menu.lua'
}

Also correct:

client_script 'client/main.lua'

Avoid:

client_script {
  'client/main.lua',
  'client/menu.lua'
}

server_script and shared_script

DirectiveRuns whereCommon use
client_script(s)Player clientUI, markers, keybinds, client natives
server_script(s)Serverdatabase, permissions, callbacks
shared_script(s)Bothconfig, locales, item tables

Load shared scripts before client/server scripts when both sides need config values.

dependencies vs dependency

Use dependency for one hard dependency and dependencies for multiple.

dependency 'ox_lib'

-- or

dependencies {
  'ox_lib',
  'oxmysql'
}

A hard dependency means your resource should not start until that resource is available. This is correct for frameworks, libraries, database wrappers, and resources whose exports you call on startup.

optional_dependencies in fxmanifest.lua

There is no official base FiveM manifest directive named optional_dependencies in the current Cfx.re resource manifest docs. If you want optional integration, do not make it a hard dependency. Check the resource at runtime instead.

Example optional ox_target support:

local hasOxTarget = GetResourceState('ox_target') == 'started'

if hasOxTarget then
  exports.ox_target:addBoxZone({
    coords = vec3(0.0, 0.0, 72.0),
    size = vec3(1.5, 1.5, 2.0),
    options = {
      {
        label = 'Open menu',
        onSelect = function()
          print('selected')
        end
      }
    }
  })
end

Use dependencies when it is required. Use GetResourceState when it is optional.

files and ui_page for NUI

If your resource has a browser UI, reference every static file the client needs.

files {
  'html/index.html',
  'html/style.css',
  'html/app.js',
  'html/fonts/*.woff2',
  'html/images/*.png'
}

ui_page 'html/index.html'

If you forget files, the UI page may load but CSS, JS, images, or fonts will 404 on the client.

Globs that work

PatternMeaning
*.luaLua files in this folder only
client/*.luaLua files directly inside client
client/**/*.luaLua files in client and nested folders
html/assets/*.pngPNG files directly inside assets

Prefer explicit folders. Huge recursive globs make debugging load order harder.

lua54 in 2026

Cfx.re docs note that lua54 is deprecated because Lua 5.3 support has been removed and Lua scripts now use Lua 5.4. Old resources may still include this line:

lua54 'yes'

It is no longer the setting that fixes modern Lua compatibility. If an old script tells you to add it, update the resource instead of relying on that flag.

node_version

If your server resource uses JavaScript, the manifest can select Node 22:

node_version '22'

Use this only when your JS resource actually needs newer Node runtime features.

exports and server_exports

exports {
  'openMenu',
  'closeMenu'
}

server_exports {
  'getPlayerData'
}

For modern Lua resources, defining exports inside the script is usually cleaner than relying only on manifest-level exports.

data_file examples

Vehicle, handling, audio, and map resources often need data files:

files {
  'data/vehicles.meta',
  'data/handling.meta'
}

data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'HANDLING_FILE' 'data/handling.meta'

The file must be listed in files and registered with the right data_file type.

Full checklist before restarting a resource

  • fx_version is cerulean
  • games includes gta5
  • client scripts are client-side only
  • server scripts do not call client-only natives
  • shared config loads before client/server scripts
  • NUI html, css, js, images, and fonts are listed in files
  • hard dependencies use dependencies
  • optional integrations use runtime GetResourceState checks
  • old __resource.lua files are migrated to fxmanifest.lua

Related FiveM guides

Jochem

About the Author

Jochem, CEO of Space-Node, expert in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 5-10 years experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

I specialize in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters.

View my full bio and credentials →

Launch Your VPS Today

Get started with professional VPS hosting powered by enterprise hardware. Instant deployment and 24/7 support included.