Installation
Install tDB, replace oxmysql, and confirm the database is up.
Prerequisites: a FiveM server on Windows or Linux x86-64,
tLib v1.0 or later ensured before tDB,
and no other database resource running — see Replace oxmysql.
Install tLib
Extract the tLib release zip into
resources/. tDB fails to start without it.
Extract tDB
Put the folder in resources/ and keep the name tDB. A rename breaks the @tDB/...
paths other resources use.
Add it to server.cfg
tDB must start before anything that queries the database.
ensure tLib
ensure tDBStart the server
On first start tDB creates a superuser and writes the credentials into config.local.lua.
Copy the superuser password out of that first startup box. It is shown once, on the run
that generates it, and redacted afterwards. It is also in config.local.lua, which is
gitignored and must stay that way. To pin your own login instead, set
tdb_superuser_email and tdb_superuser_password in server.cfg — see
Configuration.
You are done when the startup box reports the database ready and prints an admin URL. If it says Waiting for tLib's HTTP listener, that is not an error — see the admin UI.
The admin panel in a browser, if you want it
Optional. tDB is fully working without it — queries, migrations and every export run over the server, and no port is involved.
What a port buys is reaching the admin panel from a browser, at
http://<your server>:7777/db/_/, on tLib's tlib_http_port (default 7777). Open and
forward that port if you want that; see
opening tLib's port.
Leave it closed and the database is unaffected. PocketBase's own port is internal and is
never the one to forward.
Replace oxmysql
- Remove
oxmysqlfromserver.cfg. tDB answers theoxmysql,mysql-asyncandghmattimysqlexport names too, soexports.oxmysql:...resolves to tDB with no script edits. - Change any file reference:
server_script '@oxmysql/lib/MySQL.lua'becomesserver_script '@tDB/lib/MySQL.lua'. Scripts that only callexports.oxmysqlneed no change. - If a script ships a
.sqldump, drop it intDB/sql/rather than loading it by hand — see Importing.sqlfiles.
Working from a git clone
A release download contains the PocketBase binary; a source checkout does not, so fetch it once:
bun scripts/fetch-runtime.ts # this platform
bun scripts/fetch-runtime.ts --all # both, for building a releaseChange PB_VERSION at the top of that script to move to a different release.
tDB
Still stuck? Support can answer it directly.
Was this page helpful?
TIMMYG Studios