Skip to content
FIVECRATE

How to Install ox_lib on FiveM: Download, Setup and Errors

Install ox_lib on a FiveM server the right way. Which ox_lib.zip to download, the cfxlua-require folder, server.cfg order, ACE lines and the common errors.

Author: FiveCrate
Published:
Updated:
Read time: 12 min
Applies to
FiveM Legacy and FiveM for GTAV Enhanced; ox_lib v3.42.2 (November 7, 2026) with cfxlua-require 1.0.2; FXServer build 7290 or newer with OneSync; Qbox qbx_core 1.24.1, ESX Legacy 1.16.4, QBCore and servers without a framework
Last verified

Direct Answer

To install ox_lib on a FiveM server, download ox_lib.zip from the latest release (v3.42.2 at the time of writing, December 3, 2026), not the Code button or Source code (zip). Extract it into your resources folder: the zip holds two folders, ox_lib and cfxlua-require, and both must stay, named as they come in the zip. Add ensure ox_lib to server.cfg above every resource that uses it, add the four add_ace resource.ox_lib lines, and restart. ox_lib needs FXServer build 7290 or newer and OneSync. The steps are the same for Qbox, ESX, QBCore and servers without a framework.

What ox_lib is and why scripts ask for it

The ox_lib documentation describes it as “a standalone library for providing easily reusable code as importable modules and exports”. Its manifest calls it “A library of shared functions to utilise in other resources.” Scripts that reuse those functions, from interface elements to its locale module, list ox_lib as a requirement: qbx_core and ox_inventory are two examples, and both name ox_lib in their manifests.

A script uses ox_lib by loading one file from it. The docs tell developers to add @ox_lib/init.lua as a shared script in fxmanifest.lua:

shared_script '@ox_lib/init.lua'

That line is why the folder name matters. @ox_lib/ points to the resource called ox_lib, and FXServer takes a resource’s name from its folder name. A folder called ox_lib-main or ox-3.42.2 is a different resource, and scripts cannot find it.

ox_lib does not depend on a framework. Its repository says it “is designed to work alongside your existing resources and frameworks, including ESX and QBCore, rather than replace or conflict with them.” So it is not a roleplay-only resource: on a racing, PvP, freeroam or zombie server, any script that loads @ox_lib/init.lua needs it just the same.

Which frameworks need ox_lib

SetupDoes the core need ox_lib?What the official files show
QboxYesqbx_core 1.24.1 lists ox_lib in its dependencies and loads @ox_lib/init.lua
ESX LegacyNoes_extended lists esx_lib and oxmysql; the ESX recipe still installs ox_lib into [standalone]
QBCoreNoThe qb-core manifest declares only dependency 'oxmysql'
No frameworkNoInstall it when a script you add requires it

So “how to install ox_lib qbcore” has the same answer as for every other server: QBCore itself runs without it, but the scripts that need it fail until it is installed and started.

ox_lib download: where it lives in December 2026

ox_lib’s GitHub repository was renamed. The old address github.com/overextended/ox_lib now redirects to github.com/overextended/ox, whose README is titled “Ox Framework”. The resource inside is still called ox_lib: its manifest at v3.42.2 says name 'ox_lib' and version '3.42.2'. The documentation stays at overextended.dev/ox_lib, which is also the answer to “ox_lib docs”.

The download link in the README is:

https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip

The latest release at the time of writing is v3.42.2, published November 7, 2026. Both official framework recipes, Qbox and ESX Legacy, download this same ox_lib.zip link.

Release zip, Source code (zip) or a clone

What you downloadWhat you getResult on the server
ox_lib.zip from a releaseox_lib with its built interface, plus cfxlua-requireWorks
Source code (zip) of a release tagThe repository files without web/build, which Git ignores, and without cfxlua-require, which the release workflow checks out from its own repositoryCould not find dependency require for resource ox_lib., then Unable to load UI. Build ox_lib or download the latest release.
Code, Download ZIP or git clone of mainCode from a rewrite in progress, without fxmanifest.luaNot a usable resource: there is no manifest

The last row is new. On November 11, 2026, the main branch received a commit titled “feat: begin internals ts rewrite”. On November 15, 2026, a commit deleted fxmanifest.lua from the branch and added it to .gitignore. The ox_lib docs still show git clone and a bun build as the second route, but a clone of main now gives you that rewrite without a manifest. Take the release zip.

The release workflow explains the two folders. It copies the ox_lib files, including web/build, into ox_lib, copies cfxlua-require next to it, and zips both: zip -r ../ox_lib.zip ./ox_lib ./cfxlua-require.

What cfxlua-require is

cfxlua-require is “A standalone implementation of lua_require for FiveM and RedM”, split out of ox_lib. Its manifest names it require and declares provide 'require', and ox_lib v3.42.2 lists require as a dependency. Since v3.41.0 (October 25, 2026) every release bundles it. The author’s release notes say it “only needs to exist in your resource directory for other resources to find and load it”, and that anyone who clones ox_lib “will also need to clone this new one”. Since v3.42.0 (November 1, 2026), version 1.0.2 is the minimum, after an update that fixed “a bug that affected FiveM Enhanced”.

Requirements of ox_lib v3.42.2

The manifest of v3.42.2 sets these requirements:

dependencies {
	'/server:7290',
	'/onesync',
	'require'
}
EntryMeaning (Cfx.re Resource Manifest reference)If it is not met
/server:7290“A minimum server version (build >= [arg])”Update FXServer
/onesync“State awareness not being disabled.”Turn OneSync on
requireThe cfxlua-require folder, which provides requireCould not find dependency require for resource ox_lib.
fx_dependencies { 'require: 1.0.2' }Checked by ox_lib’s own codeUpdate cfxlua-require

The steps apply to FiveM Legacy and FiveM for GTAV Enhanced alike. Each release publishes a single ox_lib.zip, and the Enhanced-specific problems the sources report were fixed upstream. Enhanced Early Access Hotfix 6 (July 29, 2026) states that “Resources that use ox_lib imports no longer flood the console with Failed to open file errors”, which had hit qbx_core and ox_inventory. If you run Enhanced, keep Cfx Server current as well; the Enhanced server setup guide covers that.

How to install ox_lib step by step

  1. Download ox_lib.zip from the link above. Do not use any other download button on the repository page.

  2. Extract both folders into resources. You can put them straight into resources or into a category folder whose name is in square brackets, such as [ox] or [standalone]: FXServer scans bracketed folders for more resources. Qbox’s recipe unzips into resources/[ox], ESX’s into resources/[standalone]. Check two things after extracting:

    • The folders keep the names they have in the zip: ox_lib and cfxlua-require.
    • fxmanifest.lua sits directly inside each folder, not one level deeper. A non-bracketed folder counts as one resource, so FXServer never looks inside it for a nested copy.
  3. Start it in server.cfg before the scripts that use it. cfxlua-require needs no line of its own, because ox_lib’s dependency on require starts it. The Qbox recipe starts ox_lib right after the base resources:

    ensure ox_lib
    ensure qbx_core
    ensure ox_target
    ensure [ox]

    On ESX, the official recipe starts es_extended and then ensure [standalone], the folder that holds ox_lib, before ensure [esx_addons]. On QBCore and servers without a framework, put ensure ox_lib near the top of your resource list, above every script that loads @ox_lib/init.lua.

  4. Add the ACE permissions. The docs say “You’ll also need to grant ace permissions to the resource”:

    add_ace resource.ox_lib command.add_ace allow
    add_ace resource.ox_lib command.remove_ace allow
    add_ace resource.ox_lib command.add_principal allow
    add_ace resource.ox_lib command.remove_principal allow

    ox_lib’s ACL functions run those four console commands through ExecuteCommand. Qbox’s recipe ships the same lines in permissions.cfg, next to a similar grant for qbx_core commented “Allow qbx_core to execute commands”. How principals and groups work is explained in the ACE permissions guide.

  5. Set the optional convars. “Resource configuration is handled using convars”, so nothing is edited inside the ox_lib folder. The values below are the ones from the docs and the locale page:

    setr ox:locale en
    setr ox:primaryColor blue
    setr ox:primaryShade 8
    setr ox:userLocales 1
    setr ox:progressPropLimit 2
    ConvarWhat it doesDefault in the source
    ox:localeThe server language for ox_lib and scripts using its locale moduleen
    ox:primaryColor, ox:primaryShadeInterface colour (Mantine colour name and shade)Docs example: blue, 8
    ox:userLocales“Allow users to select their locales using /ox_lib”1
    ox:progressPropLimit“Defines the maximum number of spawned props for progressbar”Docs example: 2

    Qbox’s recipe keeps these in a separate ox.cfg, loaded with exec ox.cfg, and sets ox:userLocales to 0.

  6. Restart the server and read the console. On a running server, refresh “Rescans the resources folder” and ensure ox_lib starts it. When other resources already failed without it, restart the whole server so they start again in order.

How to check that ox_lib loaded

FXServer prints Started resource ox_lib in the server console when the resource starts. Check that no red ox_lib error sits near it. In game, the /ox_lib command opens its settings dialog (notification position and sound, plus language when ox:userLocales is 1). ox_lib also checks GitHub one second after it starts and prints An update is available for ox_lib (current version: ...) when a newer release exists.

You may also see a yellow SECURITY WARNING that says sv_stateBagStrictMode is currently DISABLED. That is advice, not an install error. Cfx.re documents sv_stateBagStrictMode as “introduced in server version 12739”; with it set to true, “Only the server can modify the state of networked entities and the player state.” ox_lib’s own warning adds that “Some scripts may break or stop syncing when strict mode is enabled”, so test it on a copy of your server first. To hide the notice, ox_lib names set ox:ignoreSecurityAdvisory ["stateBagStrictMode"]. The code skips the warning when a qb-core resource is present.

How to update ox_lib

  1. Download the new ox_lib.zip.
  2. Replace both folders, ox_lib and cfxlua-require, with the new ones. When a module fails to import, ox_lib’s own warning names a likely cause: “This is likely caused by improperly updating ox_lib.”
  3. Restart the server. Stopping or restarting ox_lib alone stops every resource that lists it under dependencies in its manifest, and FXServer’s own source notes they are “not being started again”.

Scripts check ox_lib’s version too. ox_inventory, for example, requires ox_lib 3.36.4 or newer and reports an older one as ox_inventory requires version '3.36.4' of 'ox_lib' (current version: ...).

Troubleshooting

“Could not find dependency require for resource ox_lib.”

cfxlua-require is missing, or its folder sits where FXServer does not scan. This happens when only the ox_lib folder was copied from the zip, or when ox_lib came from a Source code (zip) download, which does not contain it. Copy cfxlua-require from the same ox_lib.zip next to ox_lib. Every resource that depends on ox_lib fails after it, so fix this line first; the Couldn’t start resource guide explains the chain.

“Could not find dependency ox_lib for resource …”

No resource named ox_lib exists. Either it was never installed, or the folder has another name. Rename it to ox_lib, check that fxmanifest.lua is directly inside, then run refresh and start the resource again.

“Unable to load UI. Build ox_lib or download the latest release.”

ox_lib found no web/build/index.html. The repository does not contain the built interface, so a Source code (zip) download of a release tag always ends here, even after cfxlua-require is added next to it. Replace the folder with the one from ox_lib.zip. Every script that loads ox_lib then fails with the same text, because ox_lib’s init file stops whenever ox_lib has not finished loading.

“ox_lib must be started before this resource.”

A script loaded @ox_lib/init.lua while ox_lib was not running. Move ensure ox_lib above that script in server.cfg, or above the category folder that contains it, and restart. If ox_lib failed to start, fix its own error first.

“ox_inventory requires the ox_lib resource, refer to the documentation.”

This is ox_inventory’s message when ox_lib’s import did not load, which usually means one of the ox_lib errors above. ox_inventory repeats it every 10 seconds and rejects connecting players with the same text. Scroll up to the first ox_lib line in the console and fix that.

“The following resource dependencies do not meet the required version”

ox_lib v3.42.2 checks cfxlua-require against its fx_dependencies entry and lists each failure as - require: required 1.0.2, installed .... An older cfxlua-require folder was left in place. Replace it with the one from the current ox_lib.zip.

“Resource ‘ox_lib’ can’t run”

FXServer lists the unmet runtime constraints under this line. server needs to be 7290 or higher means FXServer is too old; onesync: OneSync needs to be enabled means OneSync is off. Update the server or turn OneSync on.

Errors that mention exports of ox_lib

If a script reports a No such export error for ox_lib, check start order and a failed ox_lib start first; the No such export guide walks through every cause. For how shared_script and dependencies lines behave, see the fxmanifest.lua guide.

Next Steps

Official documentation and repository references