ox_lib is the shared library by Overextended that a large part of the FiveM scripts build on: ox_inventory, ox_target, ox_doorlock, Qbox (qbx_core) and many paid scripts. It provides menus, notifications, progress bars and the lib functions for Lua. Without ox_lib those scripts don't start. In December 2026, ox_lib 3.43.0 is the newest version, with documentation by Overextended.
Did you set up your server with the ESX Legacy or Qbox recipe in txAdmin? Then ox_lib is already installed. Read on for the settings, updates and error messages.
Before you start
- OneSync: ox_lib only starts with OneSync on. txAdmin turns it on by default.
- The release, not the source code: download
ox_lib.zipfrom the newest release on GitHub. The green Code button and Source code give you files without the built interface. - Two folders: since version 3.41 (October 2026) the zip contains
ox_libandcfxlua-require. ox_lib needs both.
Installing ox_lib
- Make a backup of your server.
- Download
ox_lib.zipfrom the newest release. - In the game panel, open Files, go to resources and create a folder
[ox]with Create Directory (or use the folder where your other ox scripts are). - Upload
ox_lib.zipin that folder with Upload. Click the three dots ..., choose Unarchive and delete the .zip file. You now have[ox]/ox_liband[ox]/cfxlua-require, each with anfxmanifest.luadirectly inside. - Go to server.cfg editor, click Manual Edit and add the lines below. Click Save and restart your server.
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 oxmysql
ensure ox_lib
# below this: your framework and every script that uses ox_lib
You don't need an ensure line for cfxlua-require. ox_lib asks for it under the name require, and FXServer starts it by itself. See Install scripts and edit your server.cfg for the basics of ensure.
Why the add_ace lines?
ox_lib hands out permissions for other scripts. /doorlock from ox_doorlock, for example, is given to group.admin that way, and Renewed-Weathersync does the same for its weather and time commands. Without the four add_ace lines your console shows Access denied for command add_ace and admin commands may not work. With Qbox they are already in permissions.cfg.
No server yet? With our FiveM server hosting you install ESX Legacy or Qbox with ox_lib in a few clicks through txAdmin, from €5 a month. You can also try one free for 24 hours.
Settings (convars)
You configure ox_lib with setr lines in your server.cfg (with Qbox in ox.cfg, next to your server.cfg), not in its files:
setr ox:locale "nl"
setr ox:userLocales 0
setr ox:primaryColor blue
setr ox:primaryShade 8
ox:locale: the language of ox_lib's own texts, such asnl,enorde. The language files are inox_lib/locales. Scripts that use ox_lib's language system, such as ox_doorlock, follow this setting too, if they have a file for that language.ox:userLocales: with1(the default) players choose their own language in the game with/ox_lib. With0everyone gets the language fromox:locale./ox_libalso has the position and sound of notifications.ox:primaryColorandox:primaryShade: the accent colour of menus and buttons, a colour name likeblue,redorgreenwith a shade from 0 to 9.
Updating ox_lib
- Stop your server and make a backup.
- Delete the folders
ox_libandcfxlua-require(if you have it) and upload the contents of the newox_lib.zipin the same place. - Start your server.
Updating from 3.40 or older? Then cfxlua-require is new for you: forget that folder and ox_lib won't start. Since 3.42 ox_lib also checks that cfxlua-require is at least version 1.0.2, so always upload both folders from the same zip.
Restart your whole server after an update, not only ox_lib. When ox_lib stops, FXServer also stops every script that depends on it, and they don't start again by themselves.
ox_lib in your own script
Add ox_lib to the fxmanifest.lua of your script:
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
shared_script '@ox_lib/init.lua'
client_script 'client.lua'
Then you can use lib in client.lua, for example for a notification:
RegisterCommand('testlib', function()
lib.notify({ title = 'Test', description = 'ox_lib works', type = 'success' })
end)
New to scripting? Start with your first FiveM script in Lua.
Error messages
ox_lib must be started before this resource.: a script loads ox_lib before ox_lib runs. Putensure ox_libabove that script. Do you start a whole folder with something likeensure [standalone]and is ox_lib in it? Give ox_lib its ownensure ox_libline above it. Also check that ox_lib itself started: the reason is higher up in the console.Could not find dependency require for resource ox_lib.: the foldercfxlua-requireis missing. Upload it from the sameox_lib.zip.Could not find dependency ox_lib for resource ...: ox_lib isn't installed under exactly the nameox_lib. Often the folder is calledox_lib-main(source code) or there is an extra folder level (ox_lib/ox_lib).Could not find dependency /onesync for resource ox_lib.: OneSync is off. Turn it back on in txAdmin's settings and restart.Access denied for command add_ace: the fouradd_acelines forresource.ox_libare missing.- Menus and notifications don't show: you uploaded the source code. Use
ox_lib.zip. Found 2 unsafe convars values.(the number varies): since 3.43.0 ox_lib warns about server settings it finds unsafe, with the value it recommends. It is a warning, your server keeps running. Read what a setting does in the FiveM documentation before you change it:sv_stateBagStrictMode true, for example, blocks scripts that change state bags from the client. More in Advanced server.cfg settings.
After a fix, type refresh and ensure ox_lib in the Live Console of txAdmin, or simply restart your server. More common install steps are in ox_inventory and ox_target and Admins and permissions.
