ox_doorlock
Door locking for every door on the map, configured from an in-game menu instead of a config file full of coordinates.
Locking doors used to mean hand-writing hashes and coordinates for every door in every MLO. ox_doorlock replaced that with an in-game creation menu: look at a door, register it, choose who can open it. It stores the result in the database, which means the door layout of a server survives a restart and can be edited by staff rather than by a developer.
At a glance
| Maintainer | Overextended |
| Latest release | v1.22.1 · 2026-04-25 |
| Last code change | 2026-07-03 |
| Licence | GPL-3.0 |
| Written in | TypeScript |
| GitHub stars | 183 |
| Status | Active |
Figures read from the repository on 2026-09-22.
Why servers run it
- In-game door creation. No coordinate hunting, no restart to test.
- Doors are stored in MySQL, so they are data rather than code.
- Per-door access by job, group, item or character id.
- Handles double doors, sliding doors, garages and gates, which the home-made versions usually do not.
Installing ox_doorlock
1. Install oxmysql and ox_lib
Both are required.
2. Import the SQL
The release carries the doorlock table.
3. Give yourself the creation permission
Door creation is ace-gated. Add the ace to server.cfg for your own identifier before you go looking for the menu.
4. Create doors in game
Use the command, look at the door, fill in the form. It is saved immediately.
Working examples
Granting yourself door creation rights
add_ace group.admin command.doorlock allow
add_principal identifier.fivem:1234567 group.adminChecking a door's state from another script
local state = exports.ox_doorlock:getDoorFromName('mrpd_front')
if state and state.state == 1 then
-- locked
endWhat goes wrong
Doors live in the database, not in a config file. Backing up your server means backing up that table; copying the resource folder to a new server brings no doors with it.
MLO doors change with the MLO. Updating an interior can move or replace a door model, which orphans the entry.
Ace permissions are required for the creation menu and are the usual reason the command 'does nothing'.
ox_doorlock — questions people ask
Do locked doors show on the map?
Where are the ox_doorlock docs?
Runs alongside
The shared library half the modern FiveM ecosystem depends on: menus, notifications, progress bars, zones, callbacks and a cache.
The MySQL wrapper the modern FiveM stack runs on: promise-based, prepared-statement aware and a drop-in replacement for mysql-async.
The third-eye interaction system most modern scripts target: look at a thing, get a menu, click an option.