How to install resources on your FiveM server
Everything that makes a FiveM server unique is a resource: the scripts for jobs, cars, shops, maps and menus. Installing a resource is a short job, but a wrong step leaves you with a server that loads half of it, or fails to start. This guide covers where files go, how to start a resource, and how to avoid the common traps.
What a resource is
A resource is a folder inside your server's resources directory. It holds a manifest file, called fxmanifest.lua, that tells FiveM what files the resource contains and which are scripts. Without that manifest, the folder is not a resource.
Resources come in several kinds:
- Scripts that add behaviour, such as jobs and menus.
- Maps that add buildings or locations.
- Vehicles and clothing, added as streamed assets.
- Libraries that other resources depend on.
Before you install
- Check where it came from. Download only from the author's official page or a store you trust. Resources are code that runs on your server, and a malicious one can give a stranger control.
- Read the instructions. Many resources need a database table, a dependency or a configuration step.
- Check compatibility. Some need a certain framework. See How to choose a FiveM framework.
- Take a backup. See Creating and restoring backups.
Step by step
- Download the resource, and unzip it on your computer.
- Make sure the folder holds
fxmanifest.luadirectly inside, not inside another subfolder. A common mistake is a zip that extracts to a folder inside a folder. - Upload the resource folder into
resources/. Large folders upload faster over SFTP, and smaller ones through the file manager. - Open
server.cfgand add a line to start it:
ensure my-resource
The name is the folder name, not the title. Folder names with spaces cause problems, so use letters, numbers and dashes.
- Restart the server, or from the console run:
refresh
ensure my-resource
refresh makes the server rescan the resources folder, and ensure starts or restarts that resource. This is quicker than restarting the whole server.
Grouping resources in folders
As your server grows, put resources in category folders whose names are wrapped in square brackets, such as [maps] and [scripts]. The server looks inside them, and you still start resources by their own names. It keeps the main folder tidy.
You can also start a whole group at once with ensure [maps], although it is better to start each resource by name when order matters.
Load order
Resources start in the order they appear in server.cfg. A script that needs a library must come after it. The usual order is:
- FiveM's own base resources.
- The database resource.
- Your framework.
- Libraries and shared dependencies.
- Everything else.
If a resource says "could not find dependency", move the dependency higher in the list.
Updating a resource
- Stop the resource with
stop name, or the server. - Back up its folder and its config.
- Replace the files, keeping your own settings. Read the changelog for new required settings.
- Run
refreshandensure name.
Never overwrite a config file blindly, because you will lose your own settings.
Keeping the server fast
Each resource costs processing time. The resmon tool, opened in the game with the console command resmon 1, shows how much each uses. A resource that takes a lot of time, even when nothing is happening, is a candidate for removal or replacement. Remove ones you no longer use. How to fix server lag covers general approaches.
When something goes wrong
- The resource does not start. The console says why, usually a missing dependency or a syntax error. See Common FiveM errors and how to fix them.
- Nothing appears in game. Check that the resource is in
server.cfg, and that you restarted or ensured it. - Players cannot download assets. A streamed file may be too large, or a path wrong.
Add resources one at a time and test each, so you always know which change broke something.
Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.