How to install a RedM script
Every RedM resource installs the same way at heart: a folder in resources, its dependencies running, and an ensure line in server.cfg. What varies is the database and inventory work around it. This checklist covers the whole path, whatever the script.
Before you start
- A working RedM server (FXServer, usually managed by txAdmin)
- File access to the server (local disk, SFTP or your host's file manager)
- Database access if the script stores data
Install steps
Step 1: Get the files
Paid, escrowed scripts are downloaded from the Cfx.re portal (formerly Keymaster) with the account that bought them. Free scripts usually come from a GitHub release. Prefer release archives over a copy of the repository: releases often include built web files that the source does not.
Step 2: Put the folder in resources
The folder name is the resource name used in
server.cfg. Bracketed folders like[scripts]are categories: FXServer scans inside them, so you can group resources without changing their names.resources/ [framework]/ [scripts]/ my-script/ fxmanifest.luaStep 3: Read the fxmanifest
fxmanifest.luatells you what the resource needs.dependencieslists resources that must be present; a line like'@oxmysql/lib/MySQL.lua'inserver_scriptsmeans it uses oxmysql even if it is not listed as a dependency.server_scripts { '@oxmysql/lib/MySQL.lua', 'server/main.lua', } dependencies { 'oxmysql', }Step 4: Run the SQL and add items
Look for an
installation,sqlorinstallfolder. Import SQL files into the database your framework uses. Item definitions go wherever your inventory reads them: theitemstable for VORP,rsg-core/shared/items.luafor RSG.Step 5: Add the ensure line
Put it after everything the script depends on. If the script detects your framework automatically, it must come after the framework too.
ensure oxmysql # framework resources... ensure my-scriptStep 6: Load it
On a fresh boot the new line is read automatically. On a running server, type
refreshin the server console so FXServer sees the new folder, thenensure my-script. Restarting a framework resource live is risky; restart the whole server when in doubt.refresh ensure my-scriptStep 7: Read the console
Watch the server console for errors when the resource starts, and the client console (F8) once you join. Most problems show up there in plain words: a missing dependency, an unknown table or a missing item.
Troubleshooting
"Couldn't find resource"
The folder name does not match the ensure line, or the folder is nested one level too deep (a folder inside a folder after extraction).
The UI is blank
The built web files (often app/, html/ or web/build/) are missing. Download the release archive, not the source.
Works after a restart but not on a cold boot
Start order. The script starts before something it needs. See the ensure order guide.
FAQ
What is the difference between start and ensure?
start starts a stopped resource. ensure starts it, or restarts it if it is already running, which is why server.cfg files use ensure.
Can I rename a resource folder?
Only if nothing refers to it by name. Other resources call exports and events by resource name, and escrowed resources are best kept as delivered.
Do I need to restart the server for every new script?
No, refresh then ensure works for most scripts. Restart fully if the script hooks into the framework at boot.
Related guides
- RedM server.cfg ensure orderWhy start order matters in a RedM server.cfg and the order that works: database, libraries, framework core, inventory, then your scripts.
- Install oxmysql on RedMSet up oxmysql for RedM: download the release build, set mysql_connection_string, ensure it first and fix the usual connection errors.
- Cfx.re escrow and the Cfx.re Portal (ex-Keymaster) for RedM scriptsHow escrowed RedM scripts work: purchase, Cfx.re Portal download (ex-Keymaster), license key ownership, open config files and common errors.