Scripts, maps, vehicles and frameworks are all installed the same way on FiveM: as a resource. Every resource is its own folder that contains an fxmanifest.lua, sits in your server's resources directory and is started from the server.cfg.
Where is the resources folder located?
Resources are loaded from a folder called resources/ in the server data directory. Where that directory is depends on how you set up your server:
| Setup | Path |
|---|---|
| Default (recommended) | /home/container/resources |
| txAdmin Recipe / Deployer | /home/container/txData/<ProfileName>/resources |
| Manual import | The folder you specified during the import |
Upload the resource
-
Stop the server
Stop your server via the dashboard before changing any files. -
Extract the archive
Extract the downloaded archive on your PC. The server cannot read ZIP or RAR files. -
Check the folder structure
Thefxmanifest.luahas to sit directly inside the resource folder. Many downloads are nested twice (for examplemy-script-main/my-script/) – in that case only upload the inner folder:resources/ └── my-script/ ├── fxmanifest.lua ├── client.lua └── server.lua -
Note the folder name
The folder name is the name of the resource – this is exactly the name you enter in theensureline later. -
Connect via SFTP
Connect to your server via SFTP. -
Upload the folder
Upload the resource folder into yourresourcesdirectory.
Categories with square brackets
Every folder inside the resources directory is read as a resource – except folders in [square brackets]. Those are categories and may contain multiple resources:
resources/
├── [standalone]/
│ ├── script-a/
│ └── script-b/
└── my-script/
Categories can also be nested. A category name never becomes part of the resource name: a resource located at [standalone]/my-script is still simply called my-script.
Start the resource in the server.cfg
-
Open server.cfg
Open your server'sserver.cfgvia SFTP or through the CFG Editor in the txAdmin web interface. -
Add the ensure line
Add one line for every new resource:ensure my-script -
Mind the order
Resources are started in the order the lines appear in theserver.cfg. Dependencies therefore have to be listed above the scripts that need them – so your framework and your database resource first, then the individual scripts. -
Start the server
Save the file and start your server via the dashboard.
ensure, start and stop compared
| Command | Effect |
|---|---|
ensure <name> |
Starts the resource. If it is already running, it is restarted. |
start <name> |
Starts the resource if it was stopped. |
stop <name> |
Stops the resource if it was started. |
restart <name> |
Restarts a running resource. |
refresh |
Rescans the resources folder so newly uploaded resources become available. |
ensure, start, stop and restart all work with category names as well.
Check the console
After the start, watch the console in the dashboard – or the Live Console in txAdmin if you use it. Typical messages:
Started resource <name>– the resource started successfully.Couldn't find resource <name>.– the folder name does not match theensureline, or the folder is in the wrongresourcesdirectory.<name> does not have a resource manifest (fxmanifest.lua)– thefxmanifest.luais missing from the folder. This typically happens when a doubly nested folder was uploaded.- An error while starting a script – usually a dependency is missing or listed below the script in the
server.cfg.
Remove a resource
-
Stop the server
Stop your server via the dashboard. -
Remove the ensure line
Delete the matchingensureline from theserver.cfg, or comment it out with a#at the beginning of the line. -
Delete the folder
Delete the resource folder from theresourcesdirectory via SFTP. -
Start the server
Start your server and check the console for follow-up errors from other scripts that depended on the resource.
