FiveM fxmanifest.lua Complete Guide 2026: Directives, Examples, and __resource.lua Migration

Published on

fxmanifest.lua for FiveM: all key directives, shared_script examples, NUI files and dependencies, plus common errors and __resource.lua migration.

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

FiveM fxmanifest.lua Complete Guide 2026: Directives, Examples, and __resource.lua Migration

If you search fxmanifest fivem, fivem resource manifest, or fxmanifest shared_script example, you are editing FiveM resources. The manifest is the contract between your Lua code and the CitizenFX runtime. Mistakes here mean resources fail to start, NUI pages 404, or dependencies load in the wrong order. This guide walks through common directives, shows real patterns, highlights mistakes, and explains how to move off legacy __resource.lua.

On busy servers, clean manifests save hours. Space-Node FiveM customers often run dozens of resources; predictable boot order makes debugging and support faster when something refuses to load.

fxmanifest.lua vs __resource.lua

fxmanifest.lua is the current standard. Legacy __resource.lua still appears in old downloads. Migration is mostly renaming and syntax updates: resource_manifest_version becomes fx_version, and directive names grew clearer over time. For new work in 2026, use fxmanifest.lua only.

Cross-resource includes with @syntax

Manifests often reference files from other resources using an @resourceName/path prefix inside shared_script, client_script, or server_script blocks. A common pattern is @ox_lib/init.lua before your config.lua so library globals exist. The string after @ must match the folder name on disk exactly, including case on Linux hosts.

Minimal Working Manifest

fx_version 'cerulean'
game 'gta5'

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

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

This loads one server file and one client file. Most real resources add shared code, NUI, and a files table.

Core Directives Explained

fx_version

fx_version selects the feature set and API compatibility for your resource. cerulean is the common modern baseline for FiveM work in 2026. Older examples may show adamant; prefer current upstream docs when you start a new project.

game

game 'gta5' targets Grand Theft Auto V. This line is required for standard FiveM resources.

name, author, description, version

Metadata fields help server operators audit what runs. They do not fix bugs, but they speed up support when logs reference resource names.

Script Directives

client_script

Loads Lua on game clients. Accepts a string path or a table of paths.

client_script 'client/main.lua'
client_script {
    'client/utils.lua',
    'client/hud.lua',
}

server_script

Loads Lua on the server only.

server_script 'server/main.lua'

shared_script

Runs on both server and client. Ideal for config, constants, and utility functions that must match on both sides.

fxmanifest shared_script example (typical config pattern):

shared_script 'config.lua'

You can pass a table for multiple shared files:

shared_script {
    '@ox_lib/init.lua',
    'config.lua',
    'shared/locale.lua',
}

Order matters: libraries like ox_lib often need to initialize before your config reads their globals.

Deprecated script aliases

You may see client_scripts or server_scripts in old manifests. Prefer client_script and server_script with tables for clarity.

NUI: ui_page and files

ui_page

Points to your HTML entry for NUI.

ui_page 'html/index.html'

files

Lists assets NUI must fetch: HTML, CSS, JS, images, fonts. If a file is not listed, the browser context may return 404.

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

Common mistake: forgetting nested assets you add later in development.

Dependencies and Load Order

dependency

dependency declares hard requirements. The runtime ensures named resources start before yours.

dependency 'oxmysql'

dependencies

Table form for multiple dependencies:

dependencies {
    'ox_lib',
    'oxmysql',
}

Use exact resource folder names as they appear in resources/. Typos silently hurt until runtime errors appear.

optional dependencies

Some ecosystems document optional patterns via community conventions. If you branch behavior when a resource is missing, guard in code and document in README, not only in manifest.

Escrow and Licensing (Awareness)

Paid resources sometimes ship escrow binaries or locked artifacts. Manifests still declare scripts entries as expected by the asset seller. Follow vendor instructions exactly; do not randomly rename files they verify by path.

provide and convar_category (Advanced)

provide

provide can expose virtual resource names for compatibility when replacing another resource. Use only when you understand server pack wiring; misuse creates double starts or confusing load graphs.

convar_category

Groups server.cfg convars in admin UIs for some panels. Helpful for large frameworks, optional for tiny scripts.

lua54 and compiler hints

lua54 'yes'

Enables Lua 5.4 semantics when supported by your runtime chain. Many modern resources set this explicitly.

lua54 'yes'

Verify compatibility of dependencies before flipping legacy resources.

this_is_a_map 'yes'

Marks map resources that replace or add map content. Incorrect flags cause streaming issues or missing collision.

data_file entries

data_file wires game data types to files: handling, vehicles, peds, maps, and more. Car packs and handling mods rely on correct pairs.

Example pattern (illustrative; adjust types to your asset):

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

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

Wrong data_file lines produce silent spawn failures or invisible vehicles.

Real-World Combined Example

fx_version 'cerulean'
game 'gta5'
lua54 'yes'

name 'my-jobpack'
author 'Jochem'
version '1.2.0'

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

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

server_script {
    'server/main.lua',
    'server/database.lua',
}

ui_page 'web/index.html'

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

dependencies {
    'ox_lib',
    'oxmysql',
}

Common Mistakes Checklist

  • Missing files entries for NUI assets.
  • Wrong dependency names compared to folder names on disk.
  • shared_script order before library init.
  • Mixing legacy __resource.lua patterns with new fx_version without testing.
  • Huge wildcard includes that load dev tools accidentally (avoid blind ** patterns unless you mean it).

Migration from __resource.lua (Practical Steps)

  1. Rename to fxmanifest.lua.
  2. Replace resource_manifest_version with fx_version 'cerulean' (or the version your framework documents).
  3. Map old client_script/server_script tables to new syntax (usually direct ports).
  4. Add game 'gta5' if missing.
  5. Start the resource in a test server with F8 console watch for parse errors.

server_only_script and client_only_script

Some ecosystem templates use server_only_script and client_only_script names to make boundaries obvious. Server-only files never ship to clients, which reduces accidental exposure if you mix concerns. When in doubt, split secrets into server_script modules and keep shared_script limited to constants and safe helpers.

Exports, load order, and paid assets

If resource A calls exports from resource B, B must start first. Declare that with dependency blocks and a sensible server.cfg order. Paid escrow assets still depend on exact paths in fxmanifest.lua; integrity checks key off those paths, so do not rename shipped files to “clean up” folders unless the vendor documents it.

Bundled NUI and front-end build pipelines

Many UIs are built with Vite, webpack, or React. Either commit built files (for example under html/dist) or build in CI before upload. The files table must list every asset the browser requests, including hashed chunk names after a bundler upgrade. Missing one new chunk is a classic “works in dev, white screen in prod” failure.

Advanced streaming patterns and artifacts

Some map or streaming-heavy resources defer work until certain streaming milestones. Behavior can shift across artifact generations, so read framework notes when you bump server builds. On hosting support, “works on my PC” often traces to Linux case sensitivity (Logo.png vs logo.png), missing files entries, or a typo in ensure that Windows tolerated because of a different folder copy.

Testing manifests without guesswork

Use a tight local loop before you push to players:

  1. Boot FXServer with a minimal ensure list plus the resource under test.
  2. Read the console for manifest parse errors before anyone connects.
  3. Use NUI devtools when available to catch 404s on static assets.
  4. When porting large packs, add dependencies in small batches so the first failure points to the last change.

Version metadata and repeatable releases

The version field in a manifest is metadata for humans and tooling, not an auto-updater. Still, bump it when you ship breaking manifest changes so operators can correlate support tickets. Pair semver-style strings with git tags on your own resources so rollback is one checkout away.

Hosting and Support Context

When a resource fails only on production, compare artifact version, folder case sensitivity on Linux, and manifest paths. Space-Node FiveM hosting runs Linux servers, so Windows-only path assumptions and accidental Resource vs resource folder mismatches break in ways you never see on a casual Windows dev machine.

FAQ

What is fxmanifest.lua in FiveM?

It is the resource manifest that tells the CitizenFX runtime which scripts, UI files, dependencies, and data files to load for a resource.

What is a shared_script in fxmanifest?

A Lua file executed on both server and client, typically config and shared helpers, so values stay synchronized without duplication.

fxmanifest vs __resource.lua: which should I use?

Use fxmanifest.lua for all new work. __resource.lua is legacy; migrate when you maintain old packs.

Why does my NUI show a white screen?

Often missing files entries, bad ui_page path, or browser errors in F8 NUI devtools if enabled. Verify paths are relative to the resource root.

Do dependencies auto-install?

No. dependency only controls start order. You must ensure required resources exist in resources/ and start them via server.cfg.

fxmanifest.lua is small but authoritative. Invest time in correct directives once, and you avoid weeks of mystery crashes that trace back to a missing line in a manifest.

About the Author

Jochem – Infrastructure Engineer at 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 FiveM Server Today

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

FiveM fxmanifest.lua Complete Guide 2026: Directives, Examples, and __resource.lua Migration