How to Add Resources & Scripts to a FiveM Server (fxmanifest.lua)

Resources are how you add anything to a FiveM server — cars, jobs, MLOs, scripts, whole frameworks. Every resource is driven by one required file: fxmanifest.lua. This guide explains how resources work and how to add them without the dreaded “resource failed to start” error.

What a resource is

A resource is just a folder inside your server’s resources/ directory containing a fxmanifest.lua file. That manifest is the loading list: it tells FiveM which files exist, which run on the client, which run on the server, and which are shared by both. No manifest, no resource.

Anatomy of fxmanifest.lua

fx_version 'cerulean'
game 'gta5'

author 'You'
description 'My resource'
version '1.0.0'

shared_scripts { 'config.lua' }
client_scripts { 'client.lua' }
server_scripts { 'server.lua' }
  • client_scripts run only on the player’s machine (UI, draw loops, key handling).
  • server_scripts run on the FX server (database, money, validation).
  • shared_scripts run on both sides — ideal for config tables, locales, and shared event names.

Missing or mismatched script declarations are the #1 reason a resource won’t load. Our free fxmanifest.lua builder generates a valid manifest from your file list so you don’t fight the syntax.

Adding a resource step by step

  1. Drop the folder into resources/ (often grouped in a [local] or [scripts] bracket folder).
  2. Confirm it has fxmanifest.lua — if it only has the older __resource.lua, it may need updating.
  3. Add it to server.cfg with ensure resourcename, after any resources it depends on.
  4. Restart or refresh — from txAdmin or with refresh then ensure resourcename in the console.

Load order and dependencies

Most framework resources (ESX, QBCore) must start before the jobs and scripts that rely on them. If a resource errors on boot, check that its dependencies are ensured earlier in server.cfg — see our server.cfg guide for the correct ordering.

Manage it the easy way

On XGamingServer FiveM hosting you upload resources via the File Manager or SFTP and start them from txAdmin with one click — no command line required. The server configuration guide covers the full workflow.

FAQ

What’s the difference between __resource.lua and fxmanifest.lua? fxmanifest.lua is the current standard; __resource.lua is the legacy name. Use fxmanifest.lua.

My resource won’t start. Verify the manifest is valid, the folder is in resources/, it’s ensured in server.cfg, and its dependencies load first.

Where do I put script files? Inside the resource folder; then declare them under client/server/shared in fxmanifest.lua.

Sources: Cfx.re Docs — Introduction to resources.