Skip to main content
  • Instant digital delivery
  • Lifetime updates on selected products
  • Trusted by server owners
FiveMX
Shop
Full ServersBundlesNew releases
FiveMX

Start building your server today.

Curated FiveM resources, instant delivery, free starter mods, and practical guides in one calm marketplace.

Browse the shopsupport@fivemx.com

Shop

  • Shop
  • FiveM Mods
  • All Products
  • Free Mods
  • Best Scripts & Mods
  • FiveM Scripts

Frameworks

  • QBCore Scripts
  • ESX Scripts
  • QBox
  • Standalone

Community

  • Blog
  • Support
  • Creators
  • Affiliate

Legal

  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Digital Delivery
  • Cookie Policy
  • GDPR Compliance
  • DMCA
  • Imprint
  • Editorial Policy

Server Templates

  • QBCore Server Template
  • ESX Server Template
  • NoPixel Server Template
  • Server Packs
  • Free Server Templates
  • Tebex Alternative
Β© 2026 FiveMX. All rights reserved.Β·FiveMX is not affiliated with Rockstar Games, Take-Two Interactive, or CFX.re. All trademarks are property of their respective owners.
DiscordDocs
  1. Home
  2. Blog
Add Script FiveM: Step-by-Step Server Guide

How to Add a Script to Your FiveM Server

A practical add script FiveM guide for uploading resources, updating server.cfg, importing SQL, and verifying ESX, QBCore, and QBox installs before players join.

By FiveMX EditorialUpdated June 17, 2026Reviewed for ESX, QBCore, and QBox installs

This guide is written for server owners who need a repeatable, low-risk script install process. It focuses on file placement, dependency order, database changes, rollback planning, and the checks that catch broken resources before players join.

If you manage a live roleplay community, treat every script install like a small release: back up the database, note the previous resource version, test with a staff account, and keep the rollback command ready. Most launch incidents come from skipped dependency order, mismatched item names, or SQL changes applied to the wrong database, not from the script files themselves.

Adding a script to a FiveM server is straightforward once you understand the resource structure. Whether you're adding a police job, inventory, phone, garage, HUD, or economy system, the core process is the same: upload the correct resource folder, start dependencies first, then tell your server to load the script.

This guide covers the full workflow: resource folder checks,server.cfg load order, SQL imports, framework-specific notes, live testing, and rollback. Follow the steps in order, especially if you are installing your first FiveM script on a public server.

Prerequisites

Before You Start
Make sure your FiveM server starts cleanly before adding another script. If the baseline server already throws framework, database, or inventory errors, fix those first so you can tell whether the new resource caused a problem.

Server Requirements

  • A running FiveM server (Windows or Linux)
  • FTP, SFTP, or direct file access to your server
  • txAdmin or console access to run refresh, ensure, restart, and log checks
  • A framework installed: ESX, QBCore, or QBox (check script compatibility)
  • oxmysql or mysql-async installed for database-dependent scripts
  • A fresh backup of your resources folder, database, and server.cfg

Database Setup

Many scripts require database tables. If the script includes a .sql file, import it into your FiveM database before starting the resource. Read the SQL first and confirm it targets the correct database, especially when it changes existing jobs, items, owned vehicles, or inventory tables.

database-setup.sqlsql
1
2
3
4
5
6
7
-- Example SQL import for ESX
CREATE DATABASE fivem_server;
USE fivem_server;

-- Import your framework SQL files
SOURCE es_extended.sql;
SOURCE essentialmode.sql;

Script and Resource Anatomy

In FiveM, a script is a resource. The folder you upload must be the resource folder itself, not an extra wrapper folder from a ZIP download. The fastest preflight check is simple: open the folder and confirm the manifest file is at the top level.

resource-folder.txtbash
1
2
3
4
5
6
7
8
9
10
resources/
|-- my-police-script/
|   |-- fxmanifest.lua
|   |-- config.lua
|   |-- client/
|   |   |-- main.lua
|   |-- server/
|   |   |-- main.lua
|   |-- html/
|       |-- index.html

Client-Side Scripts

Run entirely in the player's game client. These handle visual effects, UI overlays, and HUD elements β€” no database required.

HUDUIVisual

Server-Side Scripts

Run on your server and manage game logic, player data, economy, and jobs. These typically require a database and framework.

DatabaseEconomyJobs

Framework Scripts

Built specifically for ESX, QBCore, or QBox. These extend the framework's core features and must match your installed framework version.

FrameworkUtilities

Script Dependencies

Libraries, database connectors, target systems, inventories, and UI resources that another script expects to be running first.

ox_liboxmysqlInventory

How to Add a Script to FiveM

1

Download, Extract, and Inspect the Script

Download scripts only from a source you trust, then extract the archive locally before uploading anything. Confirm the resource folder contains fxmanifest.lua or a legacy __resource.lua, read the included install notes, and check whether the author lists dependencies such as ox_lib, oxmysql, qb-core, or es_extended.

resource-preflight.txtbash
1
2
3
4
5
# Good
my-police-script/fxmanifest.lua

# Bad: extra wrapper folder uploaded by mistake
my-police-script-main/my-police-script/fxmanifest.lua
2

Upload the Resource Folder

Upload the actual resource folder into your server's resources directory. SFTP works for most hosts, panel file managers are fine for smaller archives, and SSH is useful when you are pulling from a Git repository. Keep the folder name simple: lowercase letters, numbers, dashes, and no spaces.

resource-location.txtbash
1
2
3
4
5
6
# Common server-data layout
server-data/resources/my-police-script

# Optional category grouping
server-data/resources/[jobs]/my-police-script
server-data/resources/[standalone]/ox_lib
Tip
You can group resources in bracket folders such as [jobs], [vehicles], or [standalone]. You can still ensure individual resources, or ensure the whole bracket group when the load order is intentionally managed inside that group.
3

Import SQL Before the First Start

If the script includes .sql files, back up the database and import them into the database your server actually uses. Read the SQL first: job systems, inventories, garages, and housing scripts often add tables or rows that must match your framework's item and job names.

sql-import.shbash
1
2
# Example only - adapt to your database host and file name
mysql -u fivem_user -p fivem_database < install.sql
4

Configure Framework, Items, Jobs, and Permissions

Open the script's configuration files before starting it. Set the framework mode, locale, webhook URLs, permissions, job names, inventory item names, notification system, target system, and any coordinates. Most "script installed but nothing happens" issues come from a config value that does not match the server's existing data.

config.lualua
1
2
3
4
5
6
Config.Framework = "qbcore" -- qbcore, esx, qbox, standalone
Config.Inventory = "ox_inventory"
Config.Target = "qb-target"
Config.Locale = "en"
Config.RequiredJob = "police"
Config.RequiredItem = "police_badge"
5

Add the Script to server.cfg in the Right Order

Open server.cfg and add an ensure line for the script after every dependency it uses. Database connector, libraries, framework core, inventory, target, and menu resources should load before gameplay scripts that call their exports.

server.cfgcfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Database and shared libraries
ensure oxmysql
ensure ox_lib

# Framework core
ensure qb-core
ensure qb-target
ensure ox_inventory

# Jobs and gameplay scripts
ensure qb-policejob
ensure my-police-script

# Optional category folder, only when order inside the folder is safe
# ensure [standalone]
6

Refresh, Ensure, or Restart During a Maintenance Window

For a simple standalone script, you can usually run refresh and then ensure resource-name. For scripts with SQL migrations, inventory changes, framework events, or many dependencies, a full restart during a maintenance window is safer.

Useful Console Commands

  • refresh - rescans the resources folder and manifests
  • ensure [script-name] - starts the resource if stopped, or restarts it if running
  • restart [script-name] - restarts a resource that is already loaded
  • stop [script-name] - stops a running resource for rollback or isolation
7

Test Server Logs, F8 Console, Permissions, and Persistence

Join with at least one staff account and one normal player account. Watch the server console, the player's F8 console, and txAdmin logs. Confirm the script can save data, load after reconnect, respect permissions, and stay below your performance budget in resmon.

Do Not Skip Normal Player Testing
Admins often bypass ACE checks, job restrictions, and inventory conditions. A script that works for staff can still be broken for players.
8

Document the Change and Keep a Rollback Path

Record the resource name, version, source, dependencies, SQL files, config files changed, and test result. If the script causes errors, stop the resource, remove or comment its ensure line, and restore the previous database or config backup before trying a second fix.

rollback-console.txtbash
1
2
3
4
5
# Fast rollback example
stop my-police-script

# Then remove or comment this in server.cfg
# ensure my-police-script

Framework Guides

The load order in server.cfg is critical. Always start your framework core before any scripts that depend on it.

LegacyESX Installation

The original roleplay framework with years of stability and the largest script library.

esx-server.cfgcfg
1
2
3
4
5
6
7
8
9
10
11
# ESX server.cfg order example
ensure oxmysql
ensure es_extended
ensure esx_menu_default
ensure esx_menu_dialog
ensure esx_menu_list

# Your ESX scripts
ensure esx_policejob
ensure esx_mechanicjob
ensure my-custom-esx-script
Browse ESX Scripts

PopularQBCore Installation

The most popular modern framework with excellent performance and beginner-friendly design.

qbcore-server.cfgcfg
1
2
3
4
5
6
7
8
9
# QBCore server.cfg order example
ensure oxmysql
ensure qb-core
ensure qb-target

# Your QBCore scripts
ensure qb-policejob
ensure qb-mechanicjob
ensure my-custom-qb-script
Browse QBCore Scripts

ModernQBox Installation

A modern QBCore-compatible framework with improved architecture and an actively maintained ecosystem.

qbox-server.cfgcfg
1
2
3
4
5
6
7
8
# QBox server.cfg order example
ensure oxmysql
ensure qbx-core
ensure ox_lib

# Your QBox scripts
ensure qbx-police
ensure my-custom-qbox-script
Browse QBox Scripts
Not sure which framework to use?
Read our in-depth comparison to find the right fit for your server. View the Framework Guide

Troubleshooting

Script Not Loading

The resource fails to start, or the server says it cannot find the resource.

  • Check that the folder name in server.cfg matches the actual folder name exactly (case-sensitive on Linux)
  • Verify the folder contains a valid fxmanifest.lua file
  • Run refresh then ensure [name] in the server console and check for errors
  • Make sure you uploaded the actual resource folder, not a nested GitHub wrapper folder

Database Errors on Start

The server console shows SQL or database connection errors when the script starts.

  • Import the script's .sql file into your database if you haven't already
  • Ensure oxmysql is started before the script in server.cfg
  • Confirm the connection string points at the same database where you imported the script tables

Script Starts But Does Not Work In-Game

The resource is running, but menus, commands, markers, items, or jobs do not behave as expected.

  • Confirm the script is designed for your framework: ESX, QBCore, QBox, or standalone
  • Check the script's documentation for minimum framework version requirements
  • Verify job names, item names, ACE permissions, and Discord role settings against your actual server data

Performance Drops After Adding the Script

Players report stutter, hitch warnings, or high client resource time after the new script starts.

  • Use resmon to identify whether the new resource is consuming excessive client time
  • Disable expensive config options such as short polling intervals, long draw distances, or unnecessary markers
  • Test conflicts by stopping recently added resources one at a time instead of changing several scripts at once
Check the Console First
90% of installation issues are visible in the server console. Always check for red error lines immediately after running ensure [script-name].

Best Practices

Stay Organized

Group scripts by purpose and avoid duplicate systems. Two inventories, two phones, or two notification stacks usually create conflicts.

Backup First

Back up the database, resources, and server.cfg before every install that touches player data.

Load Order

Put dependencies first: database, libraries, framework core, inventory, target/menu, then jobs and gameplay scripts.

Test Thoroughly

Test with staff and normal player accounts, then watch txAdmin, server console, F8 console, and resmon.

Official References

The steps above are written for everyday server owners, but the low-level behavior comes from Cfx.re's own documentation. Use these pages when you need to verify manifest syntax, console commands, or txAdmin behavior.

Cfx.re resource manifest

Official documentation for fxmanifest.lua, resource metadata, client scripts, server scripts, and files loaded by a FiveM resource.

Cfx.re server commands

Official command reference for refresh, exec, and other server console commands used when loading resources.

Cfx.re txAdmin

Official txAdmin overview for managing, monitoring, restarting, and inspecting a FiveM server instance.

Turn this tutorial into a launch-ready script stack

Once the install flow is clear, move into the framework hub or commercial path that matches your server build.

Framework hub

Start with the QBCore script stack

If you're launching on a modern framework, move into the QBCore hub for install-ready scripts, compatibility context, and verified premium options.

Open QBCore hub

Framework hub

Review the ESX path

Use the ESX landing page when your server depends on the legacy framework and you want scripts that fit its established ecosystem.

Open ESX hub

Premium catalog

Compare premium scripts

Move from installation theory into the live catalog to compare real products, framework labels, and production-ready resources.

Open premium shop

Launch faster

See curated bundles

Bundles cut setup time when you want a working server foundation instead of choosing every script one at a time.

View bundles

Next Scripts to Add

Ready to add your first script? These are common next-step systems for roleplay servers. Check framework compatibility, dependencies, and SQL requirements before installing any of them.

Advanced Police Job

Full-featured police job with arrest system, evidence handling, MDT, and duty management. Supports ESX and QBCore.

FreeDownload

Custom Vehicle Dealer

Modern vehicle dealership UI with test drive, financing, and inventory management. Fully configurable and framework-agnostic.

PremiumView

Mechanic Job Script

Complete mechanic job with repair system, parts inventory, and customer towing. Works with ESX, QBCore, and QBox.

FreeDownload

Custom Interior MLO Pack

High-quality custom interior MLOs for police stations, hospitals, and shops. Drag-and-drop installation with no SQL required.

PremiumView

Need a complete server setup?

Don't have a server yet? Read how to create a FiveM server β€” a three-path guide that helps you choose between free, template, and manual approaches. Or browse our curated server template bundles:

View Server Templates

Frequently Asked Questions

Do I need to restart the whole server to add a new script?
Not always. For simple standalone scripts, run refresh in the server console, then ensure [script-name]. Use a full restart for scripts with database migrations, framework startup hooks, inventory changes, or complex dependencies.
Can I run ESX and QBCore scripts on the same server?
Generally no β€” framework-specific scripts are built for one framework and rely on its exports and player data structure. Mixing them will cause errors. Standalone scripts (no framework dependency) work on any server regardless of framework.
What does "ensure" mean in server.cfg?
ensure starts a resource if it's not running, or restarts it if it is. It is preferred over start for most server.cfg entries because it is safe to run repeatedly. Put dependencies above scripts that use them.
Why do some scripts require ox_lib?
ox_lib is a shared utility library that provides UI components, callbacks, caching helpers, and more. Many modern scripts depend on it to avoid reinventing the wheel. Install it once and all dependent scripts will use the same shared library.
How do I update a script to a newer version?
Back up your existing script folder (especially config files), then replace the resource folder with the new version. Re-apply your configuration changes, import any new SQL if included, then restart the resource. Never overwrite blindly. Always check the changelog for breaking changes and test on staging before production.
Why does FiveM say my script has no resource manifest?
You probably uploaded the wrong folder level, or the script is missing fxmanifest.lua. Open the uploaded folder directly inside resources. The manifest file should be visible there, not hidden one or two folders deeper.

Ready to Add Better Scripts?

Browse free and premium FiveM scripts with framework labels, install context, and launch-ready categories for ESX, QBCore, and QBox servers.

Browse Free ModsView Premium Scripts

Table of Contents

PrerequisitesScript and Resource AnatomyHow to Add a Script to FiveMFramework GuidesTroubleshootingBest PracticesOfficial ReferencesNext Scripts to AddFAQ