Installation

Setting up Hookr on top of Oxide Phone — requirements, start order, database tables, getting the app on phones, photo storage, checking it works and updating.

Hookr comes with Oxide Phone. Buying the phone gives you four resources, each its own download in your Cfx Portal assets: oxide-phone (the phone) and its three apps, oxide-hookr, oxide-leakd and oxide-glitch. Set up the phone first with its Installation guide. This page covers what Hookr adds.

Requirements

  • ox_lib, oxmysql and o-link. Hookr needs o-link 1.11.0 or newer: it reaches the phone through o-link's app services, which older versions do not have. Your version is on the version line of o-link/fxmanifest.lua.
  • Oxide Phone (oxide-phone), which hosts the app. Without it Hookr does nothing.
  • QBCore, QBX or ESX (through o-link)
  • Photo storage set up in the phone (see Photos). Without it nobody can make a profile.

Steps

Copy the oxide-hookr folder into your server's resources folder, next to oxide-phone. Keep the folder name oxide-hookr.

Open your server.cfg (the text file that lists the resources your server starts).

Add ensure oxide-hookr on its own line, below ensure oxide-phone:

server.cfg
ensure ox_lib
ensure oxmysql
# your framework and your other scripts
ensure o-link
ensure oxide-phone
ensure oxide-hookr

If you keep your Oxide resources in a folder named [oxide] and start them all with ensure [oxide], you can skip this line. Hookr does not have to start after the phone: it joins the phone whenever the phone starts, and again after the phone restarts.

Save server.cfg.

Start Hookr:

  • If the server is off, start it.
  • If the server is running and oxide-phone was already installed when it last started, type refresh in the server console (so the server notices the new folder), then type ensure oxide-hookr. No restart is needed.
  • If you are installing the phone at the same time, restart the whole server instead. Hookr reaches the phone through o-link, and o-link only finds the phone at the moment o-link itself starts.

Hookr creates its database tables (all named oxide_hookr_...) by itself the first time it starts. You do not need to import anything.

The same tables are in sql/migrations (0001_init.sql) if you would rather create them yourself with your database tool (HeidiSQL, phpMyAdmin and the like). Importing them is safe: they only create tables that are missing. Hookr still checks its tables at every start, so the database user in your oxmysql connection must be allowed to create tables either way.

Getting the app on phones

Players install Hookr themselves from the phone's Store app. You don't need to do anything.

To put Hookr on every phone instead (players can't remove it):

In game, as an admin, type /phone settings.

Open Home & Apps → Store.

Add hookr to Preinstalled apps.

Press Save Changes.

You can also add 'hookr' to Config.Store.preinstalled in oxide-phone/shared/config.lua, but that file only counts before the phone's first start. After that, the list saved in /phone settings is the one used (see the phone's Configuration).

If you turn the Store off (the Store switch in the same place), every app, Hookr included, is on every phone.

Leave Config.App.id as 'hookr'. The phone only serves the app id declared in Hookr's fxmanifest.lua (phone_app 'hookr'), so a different id cuts Hookr off from accounts, photos and location.

Photos

Profile and chat photos come from the phone's Photos and Camera, and are kept in the photo storage you set up for the phone (Fivemanage, or S3 or R2 compatible storage). Hookr needs nothing extra. To set storage up, follow the Photos section of the phone's Installation guide.

Until storage is set up, nobody can add photos. A profile needs at least one photo, so nobody can make a profile either.

Check That It Works

Start the server and watch the console. There should be no red errors from oxide-hookr.

Join the server and open your phone.

Open the Store, find Hookr and install it (skip this if you made it preinstalled).

Open Hookr. You should see the screen for making a profile (or a log-in screen if the phone has no SIM).

If Hookr shows Couldn't reach Hookr and it doesn't go away:

  • Check that o-link is 1.11.0 or newer (see Requirements).
  • Look in the server console for an oxide-hookr error that mentions migrations failed. That means Hookr could not create its tables; check that your database user may create tables.

Updating

Copy your shared/config.lua and any locale files you changed somewhere safe.

Replace the oxide-hookr folder with the new one.

Put your changes back into the new files.

Restart oxide-hookr.

New tables or columns are added at start; your data stays.