ox_lib FiveM Guide 2026: Install, fxmanifest and Examples

Published on | Updated

ox_lib for FiveM in 2026: where releases come from now, the extra cfxlua-require folder v3.42.0 needs, the fxmanifest line and three working Lua examples.

Two players standing between parked cars at night with the Vinewood sign lit up behind them

A script you want to run lists ox_lib as a dependency, or an older guide sent you to a repository that turned out to be read-only. This guide checks where ox lib is maintained today, installs the current release with the extra folder it now ships with, shows the one fxmanifest line every resource needs, and walks through three examples from the official docs: a callback, a context menu and a progress bar. Everything below was checked against GitHub and the Overextended docs on 3 November 2026.

Quick answer: ox_lib is the shared Lua and JavaScript library for FiveM from Overextended. ox_inventory, ox_target, ox_doorlock and Qbox's qbx_core all load it. Releases come from github.com/overextended/ox_lib again: it is not archived, and the newest stable release is v3.42.0 from 1 November 2026. The CommunityOx fork is archived. Download ox_lib.zip from the latest release (not the green Code button), put both folders inside it (ox_lib and cfxlua-require) in your resources folder, add ensure ox_lib above every script that uses it, and add shared_script '@ox_lib/init.lua' to each of those scripts' fxmanifest.lua.

Where ox_lib Is Maintained Now

Overextended's own repository is the place to download from again. Its last release of the first run was v3.30.6 on 6 April 2025, and then nothing came out of overextended/ox_lib until v3.32.5 on 24 April 2026. In that gap the CommunityOx fork published 13 releases, from v3.30.7 (2 May 2025) to v3.32.3 (20 February 2026), with its own docs at coxdocs.dev. From v3.32.5 to v3.42.0 Overextended published 22 releases, and GitHub now marks the CommunityOx repository as archived, which means read-only.

RepositoryStatus on 3 November 2026Newest release
overextended/ox_libActive, not archivedv3.42.0 (1 November 2026), plus a v3.42.1 prerelease (3 November)
CommunityOx/ox_libArchived (read-only)v3.32.3 (20 February 2026)

To see which one your server runs, open ox_lib/fxmanifest.lua in your resources folder. The repository line names either overextended or communityox, and version gives the number. A 3.32.x build from CommunityOx will not get more fixes. Moving to the Overextended release means replacing the folder as shown below; try it on a test copy of your server first, because ten minor versions came out in between.

The documentation lives at overextended.dev/docs/ox_lib.

What Changed in v3.41 and v3.42

Recent releases change how you install and update ox_lib:

  • v3.41.0, 25 October 2026: the module loader behind require moved into its own resource, cfxlua-require. Release ZIPs now bundle it next to ox_lib. The release notes say that if you clone the repository instead, you need to clone cfxlua-require as well.
  • v3.42.0, 1 November 2026: cfxlua-require v1.0.2 is now the minimum, and ox_lib enforces that with a new SemVer module. The same release fixed a cfxlua-require bug that affected FiveM Enhanced, cleans up callback keys when a callback times out, and adds a new logger module that supports only Fivemanage for now. The author writes that docs for the new features will come later.
  • v3.42.1, 3 November 2026: a prerelease that, according to its notes, only touches the TypeScript package. You do not need to update the resource for it.

ox_lib's own manifest also sets two runtime requirements: '/server:7290' and '/onesync'. FiveM's manifest docs explain these constraints: the server build must be 7290 or newer, and OneSync must be on.

How to Install ox_lib on a FiveM Server

  1. Download ox_lib.zip from the latest release. On 3 November 2026 that link served v3.42.0, because GitHub's "latest" skips prereleases.
  2. Unzip it. You get two folders: ox_lib and cfxlua-require. Upload both into your resources folder, for example resources/[ox]/, and keep the folder names as they are.
  3. Add ox_lib to server.cfg, above every resource that uses it. The convars and permissions come from the ox_lib install docs; the colour and locale lines are optional:
# Optional ox_lib settings
setr ox:locale en
setr ox:primaryColor blue
setr ox:primaryShade 8
setr ox:userLocales 1

# Permissions the ox_lib docs ask for
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

ensure ox_lib
# Resources that use ox_lib go below this line
ensure my_resource
  1. Make sure OneSync is on. In txAdmin it is the OneSync option on the FXServer tab under Settings, shown with the advanced options; txAdmin's own hint says most servers should use "OneSync On".
  2. Check your server build. Cfx.re's version API lists 7290 as its critical build, the same number ox_lib asks for; on 3 November 2026 it listed 35245 as recommended and 38182 as latest. Our artifact update guide covers updating it.

You do not need an ensure line for cfxlua-require. Its manifest declares provide 'require', ox_lib lists require as a dependency, and FiveM starts a missing dependency on its own when it can find it in your resources. The v3.41.0 release notes say the same: it only needs to exist in your resource directory.

On our FiveM hosting txAdmin comes pre-installed, and you can upload both folders through the control panel or SFTP. If you deploy Qbox from its txAdmin recipe, the recipe already downloads this same ZIP and unpacks it into resources/[ox].

Why the Code button download fails

The green Code button on GitHub gives you the source code. The built interface folder web/build is not in the repository (it is in .gitignore), so ox_lib stops with Unable to load UI. Build ox_lib or download the latest release. Building it yourself means installing bun and running bun i and bun run build in ox_lib/web, plus cloning cfxlua-require. For a server, the release ZIP is the simpler path.

Updating ox_lib later

Delete the old ox_lib and cfxlua-require folders, copy in the new ones from the same ZIP, then restart the server. Do not copy new files over an old folder: when a module fails to load, ox_lib itself warns that this "is likely caused by improperly updating ox_lib".

The fxmanifest Line ox_lib Needs

Every resource that uses ox_lib loads it as a shared script, so the library is available on both the client and the server side:

fx_version 'cerulean'
game 'gta5'

shared_script '@ox_lib/init.lua'

client_script 'client.lua'
server_script 'server.lua'

dependency 'ox_lib'

If your resource has more shared files, put ox_lib first in the list so your config can already use it:

shared_scripts {
    '@ox_lib/init.lua',
    'config.lua',
}

What the line gives you, according to the docs: a lib global that loads ox_lib modules when you first use them, a require global for your own modules, and a cache table. You can also preload modules with an ox_libs { 'locale', 'math', 'table' } block. The dependency 'ox_lib' line is optional but useful: FiveM then starts ox_lib before your resource, or prints Could not find dependency ox_lib for resource my_resource. if it is missing. You can leave out lua54 'yes': FiveM's manifest docs say Lua 5.3 was deprecated in June 2025 and all Lua scripts now run on 5.4. Our fxmanifest.lua guide covers the other fields.

Three Worked ox_lib Examples

The three examples below follow the official docs pages for callbacks, the context menu and the progress bar. Put them in one test resource called oxdemo with the fxmanifest above, then type the commands in game.

1. Callback: ask the server for data

A callback sends a request from the client to the server and waits for the answer, with no pair of events to wire up. On the server, the handler gets the player's source first, followed by any values the client sent:

-- server.lua
lib.callback.register('oxdemo:getPlayerInfo', function(source)
    return {
        name = GetPlayerName(source),
        ping = GetPlayerPing(source),
    }
end)

On the client, lib.callback.await pauses your code until the server replies. The second argument is a cooldown in milliseconds before the callback can fire again; false means none:

-- client.lua
RegisterCommand('oxinfo', function()
    local info = lib.callback.await('oxdemo:getPlayerInfo', false)

    lib.notify({
        title = info.name,
        description = ('Ping: %d ms'):format(info.ping),
        type = 'inform'
    })
end)

Any client can call a registered callback with any values it likes, so check every argument on the server before you use it for money, items or permissions. Our event security guide goes deeper. To send a notification from the server instead, the docs use TriggerClientEvent('ox_lib:notify', source, data).

2. Context menu

Register a menu once, then open it by its id. Options can run a function (onSelect), open another menu (menu), or trigger an event (event or serverEvent) with args:

-- client.lua
lib.registerContext({
    id = 'oxdemo_menu',
    title = 'ox_lib demo',
    options = {
        {
            title = 'Say hello',
            description = 'Runs a function',
            icon = 'circle',
            onSelect = function()
                lib.notify({ description = 'Hello from ox_lib', type = 'success' })
            end
        },
        {
            title = 'Disabled button',
            icon = 'hand',
            disabled = true
        },
        {
            title = 'More options',
            description = 'Opens a second menu',
            icon = 'bars',
            menu = 'oxdemo_submenu'
        }
    }
})

lib.registerContext({
    id = 'oxdemo_submenu',
    title = 'More options',
    menu = 'oxdemo_menu',
    options = {
        { title = 'Nothing here yet' }
    }
})

RegisterCommand('oxmenu', function()
    lib.showContext('oxdemo_menu')
end)

Because the second menu sets menu = 'oxdemo_menu', it gets a back arrow next to its title. The docs advise against registering a static menu again every time you open it: register it once, as above, and only rebuild menus whose content changes.

3. Progress bar

lib.progressBar returns true when the bar completes and false when the player cancels it, so you can wrap it in an if. This is the docs example with a drinking animation and a water bottle prop:

-- client.lua
RegisterCommand('oxdrink', function()
    if lib.progressBar({
        duration = 2000,
        label = 'Drinking water',
        useWhileDead = false,
        canCancel = true,
        disable = {
            car = true,
        },
        anim = {
            dict = 'mp_player_intdrink',
            clip = 'loop_bottle'
        },
        prop = {
            model = `prop_ld_flow_bottle`,
            pos = vec3(0.03, 0.03, 0.02),
            rot = vec3(0.0, 0.0, -1.5)
        },
    }) then
        lib.notify({ description = 'Done drinking', type = 'success' })
    else
        lib.notify({ description = 'Cancelled', type = 'error' })
    end
end)

lib.progressCircle takes the same options plus position = 'middle' or 'bottom'. The ox:progressPropLimit convar caps how many props a progress bar may spawn.

Common ox_lib Errors and Fixes

Console messageCauseFix
ox_lib must be started before this resource.A script loads @ox_lib/init.lua before ox_lib runsMove ensure ox_lib above it in server.cfg, or add dependency 'ox_lib' to its manifest
Unable to load UI. Build ox_lib or download the latest release.Source code download without web/buildInstall the release ZIP instead
Could not find dependency require for resource ox_lib.The cfxlua-require folder is missingCopy it from the same ZIP into your resources folder
Resource 'ox_lib' can't run: with a reason naming onesync or serverOneSync is off, or the server build is older than 7290Turn on OneSync in txAdmin, or update the server artifact
A warning that ends in "is likely caused by improperly updating ox_lib"Old and new files mixed in one folderDelete both folders and install the ZIP fresh

Related guides: find heavy resources with resmon, pma-voice setup, logging to Fivemanage and ESX vs QBCore vs Qbox.

FAQ

Is ox_lib archived? No. On 3 November 2026 GitHub shows overextended/ox_lib as active, with v3.42.0 released on 1 November and a prerelease on 3 November. The repository that is archived is the CommunityOx fork, whose last release was v3.32.3 on 20 February 2026.

Do I need ox_lib for QBCore or ESX? It depends on your scripts. Qbox's qbx_core lists ox_lib as a dependency, and so do ox_inventory, ox_target and ox_doorlock. For QBCore and ESX servers, open each script's fxmanifest.lua: if you see @ox_lib/init.lua or dependency 'ox_lib', you need it.

Where does the cfxlua-require folder go? In your resources folder next to ox_lib, with its folder name unchanged. It needs no ensure line, because ox_lib lists it as a dependency and FiveM starts it automatically.

How do I change the ox_lib language? Set setr ox:locale followed by a language code in server.cfg, for example setr ox:locale de. The v3.42.0 release has 33 locale files. With setr ox:userLocales 1 players can pick their own language through the /ox_lib command.

Does ox_lib slow down my FiveM server? The library loads a module only when a script first uses it through lib, so a resource that calls two functions does not load the rest. To see what it costs on your own server, run resmon 1 and compare ox_lib with your other resources.

Can I use ox_lib with JavaScript or TypeScript? Yes, through the npm package @overextended/ox_lib. The docs note that it does not cover every Lua function; the supported ones are the functions in the library's resource folder.

Sources

All opened on 3 November 2026: